mcbopomofoweb
    Preparing search index...

    Represents a language model interface for retrieving unigrams. A language model provides access to unigram data based on string keys.

    The interface is used to abstract different implementations of language models that can provide unigram lookup functionality.

    LanguageModel

    interface LanguageModel {
        getUnigrams(key: string): Unigram[];
        hasUnigrams(key: string): boolean;
    }

    Implemented by

    Index

    Methods

    • Retrieves an array of Unigram objects for the specified key.

      Parameters

      • key: string

        The string key to look up unigrams for

      Returns Unigram[]

      An array of Unigram objects matching the key

    • Whether Unigrams exist for the specified key.

      Parameters

      • key: string

        The string key to look up unigrams for

      Returns boolean

      Whether Unigrams exist for the key