Getting started with NLP.js

Jesús Seijas
Published in
7 min readSep 22, 2020

Ever wanted to build a chatbot and encountered some blockers along the way relating to data privacy or supported languages? Do you wish to reduce chatbot response time or run them without an active data connection?

If that’s the case or if you’re just curious and want to learn more, give NLP.js a try.

Natural Language Processing & NLP.js

Natural Language Processing or NLP is a field combining linguistics and computing, as well as artificial intelligence. Correctly understanding natural language is critical for virtual assistants, chatbots, voice assistants, and a wide range of applications based on a voice or text interface with a machine. These applications typically include a Natural Language Processor whose purpose is to extract the interactions and intention, as well as related information and metadata, from a piece of plain natural language and translate them into something a machine can process.

NLP.js is an on-premise open source set of more than 70 libraries, used to tackle and solve the main three areas of NLPs: natural language understanding, language generation, and named entity recognition. The key differentiating feature that NLP.js provides is an enhanced user experience via an improved response time, additional language support and, according to some benchmarks, improved accuracy while leveraging increased data privacy & security controls and choices.

Why have an NLP library?

It isn’t easy to understand how existing NLPs process every sentence and why specific behavior results as an output. This black box effect, due to the lack of visibility on why the chatbot has answered in a specific way without being able to dig into the source of the problem, causes frustration to chatbot managers. Having the NLP as an open-source library provides more visibility and understanding of the low-level natural language processing. It would enable technical people to better comprehend the processing of the conversation for managing language-specific strategies to achieve the expected accuracy level. Even if having a specific strategy per country isn’t a mandatory approach, it’s highly recommended when you target high-performance chatbots in languages other than the most-commonly used.

The main features of NLP.js

1. Language support

Jesús Seijas

New Tech Team Lead at AXA Group Operations. Chatbot and voice agent expert, AI advocate.