Class: SentenceWindowNodeParser()
Extends
SentenceWindowNodeParser<
Options
>(nodes
,options
?):Promise
<BaseNode
<Metadata
>[]>
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/core/node-parser/dist/index.d.ts:75
Constructors
new SentenceWindowNodeParser()
new SentenceWindowNodeParser(
params
?):SentenceWindowNodeParser
Parameters
• params?
• params.originalTextMetadataKey?: string
• params.windowMetadataKey?: string
• params.windowSize?: number
Returns
Overrides
Defined in
packages/core/node-parser/dist/index.d.ts:84
Properties
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:171
idGenerator()
idGenerator: () =>
string
Returns
string
Defined in
packages/core/node-parser/dist/index.d.ts:83
includeMetadata
includeMetadata:
boolean
Inherited from
Defined in
packages/core/node-parser/dist/index.d.ts:6
includePrevNextRel
includePrevNextRel:
boolean
Inherited from
Defined in
packages/core/node-parser/dist/index.d.ts:7
originalTextMetadataKey
originalTextMetadataKey:
string
Defined in
packages/core/node-parser/dist/index.d.ts:81
sentenceSplitter
sentenceSplitter:
TextSplitterFn
Defined in
packages/core/node-parser/dist/index.d.ts:82
windowMetadataKey
windowMetadataKey:
string
Defined in
packages/core/node-parser/dist/index.d.ts:80
windowSize
windowSize:
number
Defined in
packages/core/node-parser/dist/index.d.ts:79
DEFAULT_ORIGINAL_TEXT_METADATA_KEY
static
DEFAULT_ORIGINAL_TEXT_METADATA_KEY:string
Defined in
packages/core/node-parser/dist/index.d.ts:78
DEFAULT_WINDOW_METADATA_KEY
static
DEFAULT_WINDOW_METADATA_KEY:string
Defined in
packages/core/node-parser/dist/index.d.ts:77
DEFAULT_WINDOW_SIZE
static
DEFAULT_WINDOW_SIZE:number
Defined in
packages/core/node-parser/dist/index.d.ts:76
Methods
buildWindowNodesFromDocuments()
buildWindowNodesFromDocuments(
documents
):TextNode
<Metadata
>[]
Parameters
• documents: Document
<Metadata
>[]
Returns
Defined in
packages/core/node-parser/dist/index.d.ts:86
getNodesFromDocuments()
Parameters
• documents: TextNode
<Metadata
>[]
Returns
Inherited from
NodeParser
.getNodesFromDocuments
Defined in
packages/core/node-parser/dist/index.d.ts:11
parseNodes()
Parameters
• showProgress?: boolean
Returns
Overrides
Defined in
packages/core/node-parser/dist/index.d.ts:85
postProcessParsedNodes()
protected
postProcessParsedNodes(nodes
,parentDocMap
):TextNode
<Metadata
>[]
Parameters
• parentDocMap: Map
<string
, TextNode
<Metadata
>>
Returns
Inherited from
NodeParser
.postProcessParsedNodes
Defined in
packages/core/node-parser/dist/index.d.ts:9