@elizaos/core v1.0.0-beta.51 / BM25Options
Interface: BM25Options
BM25 Options Interface. Extends TokenizerOptions and adds BM25 specific parameters.
Extends​
TokenizerOptions
Properties​
stopWords?​
optional
stopWords:Set
<string
>
A set of words to be ignored during tokenization. Defaults to an empty set.
Inherited from​
TokenizerOptions.stopWords
Defined in​
packages/core/src/search.ts:770
minLength?​
optional
minLength:number
The minimum length for a token to be kept. Defaults to 2. Numeric tokens are always kept.
Inherited from​
TokenizerOptions.minLength
Defined in​
packages/core/src/search.ts:772
stemming?​
optional
stemming:boolean
Whether to apply stemming to tokens. Defaults to false.
Inherited from​
TokenizerOptions.stemming
Defined in​
packages/core/src/search.ts:774
stemmingRules?​
optional
stemmingRules:StemmingRule
[]
Custom stemming rules to apply before the default Porter2 stemmer. Defaults to an empty array.
Inherited from​
TokenizerOptions.stemmingRules
Defined in​
packages/core/src/search.ts:776
k1?​
optional
k1:number
Term frequency saturation parameter (k1). Controls how quickly term frequency saturates. Higher values mean TF contributes more significantly even for high counts. Typical values are between 1.2 and 2.0. Default: 1.2.
Defined in​
packages/core/src/search.ts:1000
b?​
optional
b:number
Document length normalization parameter (b). Controls the influence of document length. 0 means no length normalization, 1 means full normalization. Typical values are around 0.75. Default: 0.75.
Defined in​
packages/core/src/search.ts:1006
fieldBoosts?​
optional
fieldBoosts:object
A dictionary defining boost factors for specific document fields.
Terms found in fields with higher boost factors will contribute more to the score.
Example: { title: 2, body: 1 }
. Default: {}
(no boosts).
Index Signature​
[key
: string
]: number