This package has been deprecated

Author message:

Please use @botsfactory/botframework-watson-recognizer instead

botframework-watson-recognizer
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

botframework-watson-recognizer

An Intent Recognizer to use IBM's Watson Conversation service with Misocroft's Bot Framework

NPM Version

Install

npm i -S botframework-watson-recognizer

Usage

Usage is the same as with LuisRecognizer, only Watson's service credential and Workspace Id are needed.

Now Watson recognizer has multi language support.

import { WatsonRecognizer, IWatsonModelMap, IWatsonModel } from 'botframework-watson-recognizer';
 
//Map all your language models here, you can set only one, it's ok
let watsonModelMap: IWatsonModelMap = {
    en: { username: '<user_en>', password: '<password_en>', workspaceId: '<workspace-id_en>' },
    es: { username: '<user_es>', password: '<password_es>', workspaceId: '<workspace-id_es>' }
};
 
let recognizer = new WatsonRecognizer(watsonModelMap, process.env.INTENT_THRESHOLD);
 
let intents = new builder.IntentDialog({ recognizers: [recognizer] });
 
bot.dialog(`/`, intents)
 
intents.matches('greeting', '/greeting');
    
bot.dialog(`/greeting`,
    [
        (session: Session) => {
            session.send(`Hi!`)
            session.endDialog();
        }
    ]);

NOTE

This Recognizer only supports Intents and Entities extraction, Watson's Dialogs are not implemented yet.

Todo

  • Unit tests
  • MAYBE support Watson's Dialog

Check us out!

https://www.thebotmakers.com

License

MIT

Package Sidebar

Install

npm i botframework-watson-recognizer

Weekly Downloads

10

Version

1.0.2

License

ISC

Last publish

Collaborators

  • cesarvarela
  • pdcp1