NlpModels are used to provide the VoiceML NLP engine information about how the transcript of the input audio should be processed. BaseNlpModels is the abstract base class all NlpModels (NlpKeywordModel, NlpIntentModel) inherit from.

You can specify multiple NlpModels to process the same audio, all of their results will be returned in ListeningUpdateEventArgs

interface BaseNlpModel {
    addParam(key: string, value: string): void;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Methods

  • Adds additional params to set in the ML engine.

    Parameters

    • key: string
    • value: string

    Returns void

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean