Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RegExpRecognizer

Intent recognizer plugin that detects a users intent using a regular expression. Multiple expressions can be passed in to support recognizing across multiple languages.

Hierarchy

Implements

Index

Constructors

constructor

  • Constructs a new instance of the recognizer.

    Parameters

    • intent: string

      The name of the intent to return when the expression is matched.

    • expressions: RegExp | IRegExpMap

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

    Returns RegExpRecognizer

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

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