Class TextSegment

  • All Implemented Interfaces:

    
    public class TextSegment
    
                        

    Represents a semantically meaningful segment (chunk/piece/fragment) of a larger entity such as a document or chat conversation. This might be a sentence, a paragraph, or any other discrete unit of text that carries meaning. This class encapsulates a piece of text and its associated metadata.

    • Constructor Detail

      • TextSegment

        TextSegment(String text, Metadata metadata)
        Creates a new text segment.
        Parameters:
        text - the text.
        metadata - the metadata.