
Just check inside node_modules/natural/lib/natural/stemmers/. By default we use the PorterStemmerPt for portuguese, but you can find english, russian, italian, french, spanish and other stemmers in NaturalNode libs, or even write your own based on those. You should set the stemmer to define your language. There is also more than one kind of stemmer. It just came with better results in our tests. By default, HubotNatural uses the LogisticRegressionClassifier. The NaturalNode library comes with two kinds of classifiers, the Naive Bayes classifier known as the BayesClassifier and the LogisticRegressionClassifier functions. You may want to use the function stringElseRandomKey to get a random element of a list, if it's parameter is a list, and use the function sendMessages to send messages to an user.

It's base constructor is the node so you can have access to all attributes inside an interaction just using Here you can parse texts, call APIs, read files, access databases, and everything else you need. They receives the interaction object and parse the message, like this:Ĭlass respond constructor: -> process: (msg) => msg) module.exports = respond event: is the name of the CoffeeScript or JavaScript Class inside scripts/events, without the file extension.Įvent classes can be written to extend the chatbot skills.

By default HubotNatural comes with $user, $bot and $room variables. In order to use multiline strings inside your YAML, you must follow the YAML Multiline Strings syntax. The ssage will be parsed and sent by event class. answer: the messages that will be sent to the user, if the classifiers get classified above the trust level.They can be strings or keywords vectors, like. expect: Those are the sentences that will be given to the bots training.Do not create more than one interaction with the same node.name attribute. name: that's the unique name of the interaction by which it will be identified.Every interaction designed to your chatbot must be under an interaction.node object structure. interactions: An vector with lots of interaction nodes that will be parsed.If a classifier returns a value of certainty minor than trust, the bots responds with and error interaction node. trust: the minimum level of certain that must be returned by the classifier in order to run this interaction.Hey there, nice to see you! event: respond

The YAML corpus is located in training_data/corpus.yml and it's basic structure looks like this: The YAML file is loaded in scripts/index.js, parsed and passed to chatbot bind, which will be found in scripts/bot/index.js, the cortex of the bot, where all information flux and control are programmed. By writing your own event classes you can give your chatbot the skills to interact with any services you need. So what you have to understand basically is that it has an YAML corpus, where you can design your chatbot interactions using nothing but YAML's notation.Īll YAML interactions designed in corpus can have it's own parameters, which will be processed by an event class.Įvent classes give the possibility to extend HubotNatural. HubotNatural is made to be easy to train and extend. We hope you enjoy the project and find some time to contribute. Welcome to HubotNatural, a new an exciting chatbot framework based in Hubot and NaturalNode libs, with an simple and extensible architecture designed by Digital Ocean's HeartBot Team, made with love and care by Rocket.Chat Team. So, we've found a really charming project to initiate from, the Digital Ocean's Heartbot a shot of love to for your favorite chat client =)īased on Heartbot, we introduced some NLP power from NaturalNode team, an impressive collections of Natural Language Processing libs made to be used in NodeJS. Inspired by that, we wanted to provide the same simplicity to our community to develop chatbots that can actually process natural language and execute tasks, as easy as building RegExp oriented bots.

That's a great contribution to ChatOps culture. If you can define your commands in a RegExp param, basically you can do anything with Hubot. Hubot is one of the most famous bot creating framework on the web, that's because github made it easy to create.
