mcbopomofoweb
    Preparing search index...

    The main language model.

    Implements

    Index

    Constructors

    Methods

    • Adds user phrases.

      Parameters

      • key: string

        The key.

      • phrase: string

        The phrase.

      Returns void

    • Sets the string converter.

      Parameters

      • Optionalconverter: (input: string) => undefined | string

      Returns void

    • Sets the string converter.

      Parameters

      • Optionalconverter: (input: string) => undefined | string

      Returns void

    • Sets the string converter.

      Parameters

      • Optionalconverter: (input: string) => undefined | string

      Returns void

    • Sets the excluded phrases.

      Parameters

      • input: string | Map<string, string[]>

      Returns void

    • Sets the string converter.

      Parameters

      • Optionalconverter: (input: string) => undefined | string

      Returns void

    • Sets a callback to be invoked when the excluded phrases collection changes.

      Parameters

      • callback: (map: Map<string, string[]>) => void

        A function that will be called when the excluded phrases change. The function receives a Map where keys are phrases and values are arrays of strings representing the excluded phrases.

      Returns void

    • Sets a callback function to be invoked whenever the user phrases change.

      Parameters

      • callback: (map: Map<string, string[]>) => void

        A function that receives a Map of phrases. The Map contains string keys mapped to arrays of strings (representing the phrases).

      Returns void

      void

    • Sets the user phrases.

      Parameters

      • input: string | Map<string, string[]>

      Returns void

    • Converts to an absolute-order key if needed.

      Parameters

      • key: string

        a key that KeyHandler uses

      Returns string

      an absolute-order key if it's not a punctuation key.