Class: KeywordExtractor()
Extract keywords from a list of nodes.
Extends
KeywordExtractor<
Options
>(nodes
,options
?):Promise
<BaseNode
<Metadata
>[]>
Extract keywords from a list of nodes.
Type Parameters
• Options extends Record
<string
, unknown
>
Parameters
• options?: Options
Returns
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:28
Constructors
new KeywordExtractor()
new KeywordExtractor(
options
?):KeywordExtractor
Constructor for the KeywordExtractor class.
Parameters
• options?: KeywordExtractArgs
Returns
Throws
If keywords is less than 1.
Overrides
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:48
Properties
disableTemplateRewrite
disableTemplateRewrite:
boolean
=false
Inherited from
BaseExtractor
.disableTemplateRewrite
Defined in
packages/llamaindex/src/extractors/types.ts:16
id
id:
string
Inherited from
Defined in
packages/core/schema/dist/index.d.ts:171
inPlace
inPlace:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:17
isTextNodeOnly
isTextNodeOnly:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:13
keywords
keywords:
number
=5
Number of keywords to extract.
Default
5
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:40
llm
llm:
LLM
<object
,object
>
LLM instance.
Defined in
packages/llamaindex/src/extractors/MetadataExtractors.ts:33
metadataMode
metadataMode:
MetadataMode
=MetadataMode.ALL
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:15
numWorkers
numWorkers:
number
=4
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:18
showProgress
showProgress:
boolean
=true
Inherited from
Defined in
packages/llamaindex/src/extractors/types.ts:14
Methods
extract()
extract(
nodes
):Promise
<ExtractKeyword
[] |object
[]>
Parameters
Nodes to extract keywords from.
Returns
Promise
<ExtractKeyword
[] | object
[]>
Keywords extracted from the nodes.