Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LuisRecognizer

Intent recognizer plugin that detects a users intent using Microsofts Language Understanding Intelligent Service (LUIS) The service URLs for multiple LUIS models (apps) can be passed in to support recognition across multiple languages.

Hierarchy

Implements

Index

Constructors

constructor

  • Constructs a new instance of the recognizer.

    Parameters

    • models: string | ILuisModelMap

      Either an individual LUIS model used for all utterances or a map of per/locale models conditionally used depending on the locale of the utterance.

    Returns LuisRecognizer

Methods

onEnabled

  • Registers a function to conditionally enable/disable the recognizer. Multiple handlers can be registered and the new handler will be executed before any other handlers.

    Parameters

    • handler: function

      Function called for every message. You should call callback(null, true) for every message that should be recognized.

        • Parameters

          • context: IRecognizeContext
          • callback: function
              • (err: Error, enabled: boolean): void
              • Parameters

                • err: Error
                • enabled: boolean

                Returns void

          Returns void

    Returns RecognizerFilter

onFilter

onRecognize

recognize

Static recognize

  • recognize(utterance: string, modelUrl: string, callback: function): void
  • Calls LUIS to recognizing intents & entities in a users utterance.

    Parameters

    • utterance: string

      The text to pass to LUIS for recognition.

    • modelUrl: string
    • callback: function

      Callback to invoke with the results of the intent recognition step.

        • Parameters

          • err: Error

            Error that occured during the recognition step.

          • Optional intents: IIntent[]

            List of intents that were recognized.

          • Optional entities: IEntity[]

            List of entities that were recognized.

          Returns void

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method