/flow-recognizer

Intent Recognizers for Microsoft Bot Framework SDK. It includes a recognizer for LUIS.ai, API.ai and WIT.ai

Primary LanguageJavaScriptMIT LicenseMIT

Flow Recognizer

Intent recognizers for the Flow Bot Framework. Provides NLP integration for the Microsoft Bot Builder SDK for different providers:

  • LUIS.ai
  • API.ai
  • WIT.ai

Installation

npm install --save flow-recognizer

Usage

import { FlowRecognizerWit } from 'flow-recognizer';
import { FlowRecognizerApiai } from 'flow-recognizer';
import { FlowRecognizerLuis } from 'flow-recognizer';
import { IntentDialog } from 'botbuilder';

let witRecognizer = new FlowRecognizerWit({ models: 'Your access token'});
let apiaiRecognizer = new FlowRecognizerApiai({ models: 'Your access token'});
let luisRecognizer = new FlowRecognizerLuis({ models: 'Your luis url'});
let intents = new IntentDialog({ recognizers: [witRecognizer, apiaiRecognizer, luisRecognizer ]});
intents.matches('intent.name', (session, args) => {...});

bot.dialog('/', intents);

Note about Wit.ai

Wit.ai provides entity recognition, but not intent one. Make sure that for each utterance you add an entity called 'intent' with the value of the intent name for this utterance.