Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@jnv/node-nlp
Advanced tools
Readme
"NLP.js" is a general natural language utilities for nodejs. Currently supporting:
If you're looking to use NLP.js in your node application, you can install via NPM like so:
npm install node-nlp
You can see a great example of use at the folder /examples/console-bot
. This example is able to train the bot and save the model to a file, so when the bot is started again, the model is loaded instead of trained again.
You can start to build your NLP from scratch with few lines:
const { NlpManager } = require('node-nlp');
const manager = new NlpManager({ languages: ['en'] });
// Adds the utterances and intents for the NLP
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');
// Train also the NLG
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!');
// Train and save the model.
(async() => {
await manager.train();
manager.save();
const response = await manager.process('en', 'I have to go');
console.log(response);
})();
This will show this result in console:
{ locale: 'en',
localeIso2: 'en',
language: 'English',
utterance: 'I have to go',
classification:
[ { label: 'greetings.bye', value: 0.9791293407583773 },
{ label: 'greetings.hello', value: 0.020870659241622735 } ],
intent: 'greetings.bye',
score: 0.9791293407583773,
entities: [],
sentiment:
{ score: 0.5,
comparative: 0.125,
vote: 'positive',
numWords: 4,
numHits: 1,
type: 'senticon',
language: 'en' },
answer: 'Till next time' }
You can read the guide of how to contribute at Contributing.
You can read the Code of Conduct at Code of Conduct.
This project is developed by AXA Shared Services Spain S.A.
If you need to contact us, you can do it at the email jesus.seijas@axa.com
Copyright (c) AXA Shared Services Spain S.A.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
Library for NLU (Natural Language Understanding) done in Node.js
The npm package @jnv/node-nlp receives a total of 7 weekly downloads. As such, @jnv/node-nlp popularity was classified as not popular.
We found that @jnv/node-nlp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.