IRIN (Indent to Recognize for Intelligent Natural language) is a scripting language of chatterbots, make you easier to create chatterbot.
npm install irin-langirin-lang is interpreter for irin language. it's written on coffeescript and make to compatible with javascript in browser side and server side.
.irin file extension. In body use indent to descibe question or answer. You can indent by use Tab or space. Here is example.
Hello
Hi!
`
when you type hello. Don't worry about case sensitive on question. bot will reply Hi!. Line without indent always question. And greater deep level is answer. And next greater level is question.
And irin language has many feature. such as in-line condition. define topic in seperate files information. So please read documentation to find them out.
Installation
irin-lang interpreter is available via NPM you can download by
`
npm install --save irin-lang
`
and available on Bower too. you can download by
`
bower install --save irin-lang
`
Don't worry if you isn't use both NPM and Bower. you can directly download from Github Repo Release
by using Node.js or CommonJS
` javascript
var Irin = require("irin-lang")
`
by using normal browser
` html
`
then you must check for make sure everything work correctly. by create file hello.irin
`
hello
Hello world!
`
and write this javascript to run hello.irin with input hello
` javascript
var bot = new Irin("hello.irin",function(err){
if(err){
throw err;
}
console.log(bot.reply("hello"));
});
`
if everything work fine. you should see Hello world!` from console.