naria-brain
naria-brain is a framework to facilitate building bots and other tools that require natural language processing. It's build around natural
an awesome natural language processing library.
Disclaimer: this is still a work in progress so no warranties are granted. We hope you can help identify any issues, make suggestions or even implement them!
TABLE OF CONTENTS
Getting Started
You can install naria-brain with NPM or Yarn by issuing:
npm install naria-brain
or
yarn add naria-brain
Basic usage:
import NariaBrain, {Reactor} from 'naria-brain';
// Author is a reactor that identifies questions about who developed naria-brain
// and replies with the author's name.
class Author extends Reactor {
constructor() {
super();
this.train([
{token: 'Author', text: 'who made you?'},
{token: 'Author', text: 'who created you?'}
]);
}
react() {
return 'A damn human from OutLimits!!';
}
}
let brain = new NariaBrain({
reactors: {Author}
});
console.log(brain.intercept('who made you, machine???'));
// A damn human from OutLimits!!
NariaBrain
Will be updated soon...
Reactor
Will be updated soon...
Examples
Check example folder for a basic example of how to use naria-brain
.
Development
If you want to help out, just fork this repository and submit your PRs.