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.
aice.js
Advanced tools
Readme
Features • How To install • Usages example • NLX syntax • Contributing • More
Artificial Intelligence Conversational Engine (AICE)
AIce is an opensource Javascript natural language processing (NLP) and conversational framework without any dependencies.
We want to build a sustainable solution able to guess several languages, to understand the intention of the user, to give the best response in order to satisfy the user's intent. Also, we hope for providing both text-based conversational interface as well as form-based conversational interface. We desire to give a flexible NLP API to better fit various use case.
It can be installed directly from NPM to be integrated in node.js application.
npm install aice.js
How to import
import { AICE } from 'aice.js';
const { AICE } = require('aice.js');
Simple use case
const aice = new AICE();
aice.addInput('en', 'hello', 'Hello');
aice.addOutput('en', 'hello', "Hello. What's up ?");
aice.train();
// now you can use process to get the answer
const response = await aice.process('Hello', {}, 'en');
{
"answer":"Hello. What's up ?",
"score":1,
"intent":"hello",
"context":{}
}
Conditions use case
const nlp = new AICE();
nlp.addInput('en', 'test.conditions', 'Test conditions');
nlp.addOutput(
'en',
'test.conditions',
"This is a test of the conditions",
undefined,
[{
type: 'LeftRightExpression',
operande: 'eq',
Lvalue: { type: 'VARIABLE', value: 'state' },
Rvalue: 'STATE_0',
}]);
nlp.train();
// now you can use process to get the answer
const response = await aice.process('Test condition', { state: 'STATE_0'}, 'en');
{
"answer":"This is a test of the conditions",
"score":1,
"intent":"test.conditions",
"context":{"state":"STATE_0"}
}
Callable use case
const nlp = new AICE();
// Add an input to the intent 'match.email'
nlp.addInput('en', 'match.email', '{{userEmail=@email}}');
// Add an output to the intent 'match.email'
nlp.addOutput('en', 'match.email', "Thanks for your email. I'll send you some thing", undefined, undefined,
async context => {
const { userEmail } = context;
const text = 'Example of email body';
const mail = {
to: userEmail,
subject: 'Example of send mail',
text,
html: text,
};
await emailSender.sendMessage(mail);
return {};
});
nlp.train();
This will send a mail to userEmail catched by the entity @email. In this example the service emailSender as been created using node-mailer.
INPUT
TEXT I'm a text
INLINE_CODE {{ }} // Expression syntax
SET namevar=@entityName
SET namevar=*
SET namevar=^
ANY *
ANYORNOTHING ^
ENTITY @name // modify currentContext as entityName=@entityName
OUTPUT
INLINE_CODE {{ }} // rendered
CODE << >> // not rendered
SET namevar='value'
SET namevar=varName
GET namevar
Please, see the CONTRIBUTING.md file.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See CODE_OF_CONDUCT.md file.
This project is developed by Opla.
It is still a WIP, but you could contribute, test, report bugs.
How to pronounce it ? "A-Ice" /eɪ/ /ʌɪs/
FAQs
Artificial Intelligence Conversational Engine
The npm package aice.js receives a total of 16 weekly downloads. As such, aice.js popularity was classified as not popular.
We found that aice.js 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.