Class TextSegment

java.lang.Object
dev.langchain4j.data.segment.TextSegment

public class TextSegment extends Object
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.