bot-talk

1.0.0 • Public • Published

Bot-Talk

A simple regex based Q&A bot library.

Installation

Using npm

$ npm install bot-talk

Basic Usage

const {bot, r} = require("bot-talk");

bot.addRule(r`My name is ([^\s]+)`, "intro.name");
bot.addAnswer("intro.name", "Hello %1");
bot.train();
const result = bot.process("Hello, my name is John");
console.log(result.answer) // Outputs -> Hello John

License

MIT

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i bot-talk

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    7.8 kB

    Total Files

    6

    Last publish

    Collaborators

    • spiffgreen