TextChunker class

Constructors

TextChunker({int maxChunkSize = 512, int overlapSentences = 1, TokenLengthFunction? lengthFunction})

Properties

hashCode int
The hash code for this object.
no setterinherited
maxChunkSize int
Max size of a chunk (in units determined by lengthFunction, usually tokens or chars)
final
overlapSentences int
Number of sentences to overlap between chunks to preserve context
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

chunk(String text) List<String>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited