-
Notifications
You must be signed in to change notification settings - Fork 22
Using NLP.js
NLP.js is a NLP library for building bots, with entity extraction, sentiment analysis, automatic language identify, etc.
We can use nlp.js as an intent recognition provider for Xatkit. Compared to our DialogFlow integration, nlp.js natively supports a broader set of languages and it is executed locally instead of relying on ane external cloud-based API.
At the technical level, the connector is implemented as a Node app that uses Express to expose a REST API that can manipulate an NLP.js engine. Then, we have added a new Intent Recognition Provider (the component in charge of classifying user utterances in intents and responsible for extracting the entities in the text) that communicates with the nlp.js server to process the user inputs.
As always our flexible and modular architecture will let you run the same bot in DialogFlow, Nlp.js, or whatever without changing the code of the bot. You just need to define the configuration properties of the engine you would like to use. So, go ahead and give it a try!
We recommend using Docker for this. Our NLP.js server is available at Docker hub. Follow the instructions below to download it and run it:
docker pull xatkit/xatkit-nlp.js-server:latest docker run -p 8080:8080 -d xatkit/xatkit-nlp.js-server This will run the server on the port 8080. Check the installation at http://localhost:8080. The server exposes a default agent called “default” that you can use in your bot (you can create additional ones). Then, just add the following properties to your bot configuration file (‘ca’ is the standard language code for Catalan): xatkit.nlpjs.agentId = default xatkit.nlpjs.language = ca xatkit.nlpjs.server = http://localhost:8080
- Getting Started
- Configuring your bot
- Integrating an Intent Recognition Provider
- Adding a bot to your website
- Deploying on Slack
- Basic concepts
- Intents and Entities
- States, Transitions, and Context
- Default and Local Fallbacks
- Core Library