Interface DictionaryInformation

Use by dictionary authors to help improve the quality of suggestions given from the dictionary.

Added with v5.16.0.

interface DictionaryInformation {
    accents?: string | CharacterSetCosts[];
    adjustments?: PatternAdjustment[];
    alphabet?: string | CharacterSetCosts[];
    costs?: EditCosts;
    hunspellInformation?: HunspellInformation;
    ignore?: string;
    locale?: string;
    suggestionEditCosts?: SuggestionCostsDefs;
}

Properties

accents?: string | CharacterSetCosts[]

The accent characters.

Default: "\u0300-\u0341"

adjustments?: PatternAdjustment[]

A collection of patterns to test against the suggested words. If the word matches the pattern, then the penalty is applied.

alphabet?: string | CharacterSetCosts[]

The alphabet to use.

"a-zA-Z"
costs?: EditCosts

Define edit costs.

hunspellInformation?: HunspellInformation

Used by dictionary authors

ignore?: string

An optional set of characters that can possibly be removed from a word before checking it.

This is useful in languages like Arabic where Harakat accents are optional.

Note: All matching characters are removed or none. Partial removal is not supported.

locale?: string

The locale of the dictionary. Example: nl,nl-be

suggestionEditCosts?: SuggestionCostsDefs

Used in making suggestions. The lower the value, the more likely the suggestion will be near the top of the suggestion list.