node-nlp-neo
v6.0.1
Published
Library for NLU (Natural Language Understanding) done in Node.js
Maintainers
Readme

node-nlp-neo
node-nlp-neo is the batteries-included package of
NLP.js Neo, a refreshed and maintained fork of
axa-group/nlp.js. It bundles every language and the
NLU, NER, NLG, sentiment and language-guesser features behind the NlpManager class.
The packages are ESM only, written in TypeScript with bundled type declarations, and require Node.js 22.12 or later.
What it does
- Guess the language of a phrase
- Fast Levenshtein distance of two strings, and the best matching substring of a string
- Stemmers and tokenizers for 40 languages, tokenization for any other
- Sentiment analysis, with negation support
- Named entity recognition, multi-language, tolerant of misspellings
- Intent classification with a neural network
- Answer generation from intents, conditions and context
Installation
pnpm add node-nlp-neoThere is no CommonJS build, so use import:
import { NlpManager } from 'node-nlp-neo';From a CommonJS file, load it with a dynamic import:
const { NlpManager } = await import('node-nlp-neo');If you only need part of the suite, install the individual packages instead —
@nlpjs-neo/basic for a backend bot, @nlpjs-neo/nlu for the classifiers,
@nlpjs-neo/similarity for the Levenshtein utilities, and one @nlpjs-neo/lang-* package
per language.
Example of use
import { NlpManager } from 'node-nlp-neo';
const manager = new NlpManager({ languages: ['en'], forceNER: true });
manager.addDocument('en', 'goodbye for now', 'greetings.bye');
manager.addDocument('en', 'bye bye take care', 'greetings.bye');
manager.addDocument('en', 'okay see you later', 'greetings.bye');
manager.addDocument('en', 'bye for now', 'greetings.bye');
manager.addDocument('en', 'i must go', 'greetings.bye');
manager.addDocument('en', 'hello', 'greetings.hello');
manager.addDocument('en', 'hi', 'greetings.hello');
manager.addDocument('en', 'howdy', 'greetings.hello');
manager.addAnswer('en', 'greetings.bye', 'Till next time');
manager.addAnswer('en', 'greetings.bye', 'see you soon!');
manager.addAnswer('en', 'greetings.hello', 'Hey there!');
manager.addAnswer('en', 'greetings.hello', 'Greetings!');
await manager.train();
manager.save();
const response = await manager.process('en', 'I should go now');
console.log(response.intent); // greetings.bye
console.log(response.answer); // one of the answers registered for the intentWhat is exported
| Export | What it is |
| ------ | ---------- |
| NlpManager | The manager that trains and processes utterances, the API most applications need |
| NlpExcelReader | Loads languages, entities, intents and answers from an Excel workbook |
| Language | The language guesser |
| SentimentAnalyzer, SentimentManager | Sentiment analysis for one or several languages |
| NeuralNetwork | The classifier on its own |
| NlgManager, ActionManager | Answer generation and intent actions |
| BrainNLU | The classifier with the v3-style API |
| Recognizer, ConversationContext, MemoryConversationContext | Conversation context helpers |
| SpellCheck, Evaluator, Handlebars, removeEmojis, NlpUtil | Utilities |
| XDoc, XTable, XTableUtils | Excel table reading |
Documentation
The documentation lives in the repository:
Contributing
You can read the guide of how to contribute at Contributing.
Code of Conduct
You can read the Code of Conduct at Code of Conduct.
Who is behind it
NLP.js was created and developed by AXA Group Operations Spain S.A., with Jesus Seijas as its main author; AXA Group is no longer involved in maintaining it. nlpjs-neo is a fork of that project, currently maintained by Igor Savin and the contributors to the fork.
License
Copyright (c) AXA Group Operations Spain S.A.
Copyright (c) 2026 Igor Savin
Released under the MIT License.
