Package dev.langchain4j.data.document.splitter
package dev.langchain4j.data.document.splitter
-
ClassDescriptionSplits the provided
Document
into characters and attempts to fit as many characters as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Splits the providedDocument
into lines and attempts to fit as many lines as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Splits the providedDocument
into paragraphs and attempts to fit as many paragraphs as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Splits the providedDocument
into parts using the providedregex
and attempts to fit as many parts as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Splits the providedDocument
into sentences and attempts to fit as many sentences as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Splits the providedDocument
into words and attempts to fit as many words as possible into a singleTextSegment
, adhering to the limit set bymaxSegmentSize
.Base class for hierarchical document splitters.