Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nlp-hub-v4

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlp-hub-v4

The hub for natural language processing (nlp) engines. Fork (https://github.com/marcelofelman/nlp-hub.git)

  • 1.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

NLP-Hub

Build Status NPM Coverage

This is a library to connect different recognizers to a bot, currently supports:

  • Regex
  • Luis
  • Rasa

By now, the only strategy supported is that of firsMatch, it goes through the configured recognizers and when the first one passes a certain threshold it returns the common data structure of the response. You must configure a default response as detailed in the example. This library is an open source and anyone who wants to participate will be welcome.

Use example:

const configuration: INlpHubConfiguration = {
    threshold: 0.83,
    recognizers: [
        {
            id: "HolaRegex",
            type: "regex",
            params: {
                intent: "greetings",
                exp: "(^hola$|^holaa$|^holas$|^holi$|^holis$|^hi$|^hello$)"
            }
        },
        {
            id: "recommender",
            type: "regex" ,
            params: {
                intent: "recommender",
                exp: "^Comprar vuelo$"
            }
        },
        {
            id: "Luis-1",
            type: "luis",
            params: {
                "appId": "APP_ID",
                "key": "SUBS_KEY",
                "appHost": "http://westus.api.cognitive.microsoft.com" }
        },
        {
            id: "Rasa-1",
            type: "rasa",
            params: {
                appHost: "http://RASA_HOST" 
            }
        },
        {
            id: "default-1",
            type:"default" ,
            params: {
                intent: "NoneDialog"
            }
        }
    ]
  };

const nlpHub: NlpHub = new NlpHub(configuration);
const utterance: string = 'Hola';
const response: any = await nlpHub.firstMatch(utterance);

FAQs

Package last updated on 05 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc