jessica-ai

2.0.0 • Public • Published

Jess

a work in progress virtual assistant

Installation and usage

npm install --save jessica-ai

basics

// requiring the module
var Jessica = require('jessica-ai');
 
// make the Jessica instance
var Jess = new Jessica({
  storageDir: "data" // directory to store any data Jessica needs
});
 
// Jess comes with a default intents such as a math intent "whats 4 x 4"
// Returns {intent: "math", question: 4 x 4, result: 16}
 
// But to extend jess its pretty easy. just add some training data
// Using a weather command for example
 
// Make a few sentences for it to train on
var weather = ["how's the weather in Birmingham",
  "what's the weather like in Paris"]
 
// train it on the weather data
Jess.train(weather, "weather");
 
// Set the classifier up to use
Jess.start(); // do this whether you add your own commands or not
 
// Start classifying objects
Jess.classify("whats it look like in london")
.then(function(obj) => {
  console.log(obj);
  // {intent: "weather"}
 
  // do your code to get the weather
})
 

contributing

PR's are welcomed :P

Readme

Keywords

Package Sidebar

Install

npm i jessica-ai

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kingcosmic