Interface LexicalIndexConfig

What a LexicalIndex is made with.

interface LexicalIndexConfig {
    k1?: number;
    b?: number;
    tokenize: ((text) => string[]);
}

Properties

Properties

k1?: number

Term saturation.

Default

1.2
b?: number

Length normalization, 0 to 1.

Default

0.75
tokenize: ((text) => string[])

The words of a text. The same function must be given when a saved index is restored.

Type declaration

    • (text): string[]
    • Parameters

      • text: string

      Returns string[]