Class: TokenTextSplitter()
Extends
TokenTextSplitter<
Options
>(nodes
,options
?):BaseNode
<Metadata
>[]
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/core/node-parser/dist/index.d.ts:106
Constructors
new TokenTextSplitter()
new TokenTextSplitter(
params
?):TokenTextSplitter
Parameters
• params?: SplitterParams
& Partial
<object
>
Returns
Overrides
MetadataAwareTextSplitter
.constructor
Defined in
packages/core/node-parser/dist/index.d.ts:112
Properties
backupSeparators
backupSeparators:
string
[]
Defined in
packages/core/node-parser/dist/index.d.ts:111
chunkOverlap
chunkOverlap:
number
Defined in
packages/core/node-parser/dist/index.d.ts:109
chunkSize
chunkSize:
number
Defined in
packages/core/node-parser/dist/index.d.ts:108
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:172
includeMetadata
includeMetadata:
boolean
Inherited from
MetadataAwareTextSplitter
.includeMetadata
Defined in
packages/core/node-parser/dist/index.d.ts:6
includePrevNextRel
includePrevNextRel:
boolean
Inherited from
MetadataAwareTextSplitter
.includePrevNextRel
Defined in
packages/core/node-parser/dist/index.d.ts:7
separator
separator:
string
Defined in
packages/core/node-parser/dist/index.d.ts:110
Methods
getMetadataString()
protected
getMetadataString(node
):string
Parameters
Returns
string
Inherited from
MetadataAwareTextSplitter
.getMetadataString
Defined in
packages/core/node-parser/dist/index.d.ts:21
getNodesFromDocuments()
Parameters
• documents: TextNode
<Metadata
>[]
Returns
Inherited from
MetadataAwareTextSplitter
.getNodesFromDocuments
Defined in
packages/core/node-parser/dist/index.d.ts:11
parseNodes()
Parameters
Returns
Inherited from
MetadataAwareTextSplitter
.parseNodes
Defined in
packages/core/node-parser/dist/index.d.ts:22
postProcessParsedNodes()
protected
postProcessParsedNodes(nodes
,parentDocMap
):TextNode
<Metadata
>[]
Parameters
• parentDocMap: Map
<string
, TextNode
<Metadata
>>
Returns
Inherited from
MetadataAwareTextSplitter
.postProcessParsedNodes
Defined in
packages/core/node-parser/dist/index.d.ts:9
splitText()
splitText(
text
):string
[]
Split text into chunks.