NLP.js NLU Integration
Learn how to use the open source NLP.js library as natural language understanding (NLU) integration with the Jovo Framework.
Being open source, you can host NLP.js on your own servers without any external API calls.
You can use the Jovo NLP.js integration for projects where you receive raw text input that needs to be translated into structured meaning to work with the Jovo intent structure. Patforms like the Jovo Core Platform (e.g. in conjunction with the Jovo Web Client), Facebook Messenger, and Google Business Messages are some examples where this would work.
Smaller NLP.js language models are fast to train and can even be used on serverless infrastructure like AWS Lambda without having to use any additional server infrastructure. We recommend taking a close look at the execution times though, as larger models can take quite some time to build.
To get started, download the package:
As mentioned above, NLP.js works with platforms that provide raw text input. You can add the integration to the platform using the
The below example uses the Jovo Core Platform as an example:
You can add languages to your integration like this:
You can add languages by installing their NLP.js packages:
You can add a callback function to train your model:
You can use the Jovo Model to turn the language model files in your
models folder into an NLP.js model. Learn more about the NLP.js Jovo Model integration here.
Here is an example how to extend the Jovo Model with a custom input type for NLP.js.