Splits text into sentence-level chunks using the Alignment.Tokenizer.
Sentence boundary rules:
- A
:punctuationtoken of.,!, or?ends a sentence, unless it forms a known abbreviation with the preceding word token. - After sentence-ending punctuation, trailing closing punctuation
(
",',),],},»,”,’) is consumed into the same sentence. - A
:whitespacetoken containing\nfollowed by an uppercase-starting:wordtoken starts a new sentence.
Summary
Functions
Splits text into chunks respecting sentence boundaries.
Functions
@spec chunk( String.t(), keyword() ) :: [LangExtract.Chunker.Chunk.t()]
Splits text into chunks respecting sentence boundaries.
Options
:max_chunk_chars— maximum characters per chunk (required)