aimlparser

1.0.5 • Public • Published

aimlparser

AIML parser for Node.js which supports non-English language based on aimlinterpreter

About aimlinterpreter

Sample

test-aiml.xml

<?xml version="1.0" encoding="UTF-8"?>
<aiml version="2.0">
    <category>
        <pattern>ดีจ้า</pattern>
        <template>สวัสดี</template>
    </category>

    <category>
        <pattern>HELLO</pattern>
        <template>Hello!</template>
    </category>
</aiml>

app.js

This will return 'Hello!'

const AIMLParser = require('aimlparser')
const aimlParser = new AIMLParser({ name:'HelloBot'})
aimlParser.load(['./test-aiml.xml'])
aimlParser.getResult('Hello', (answer, wildCardArray, input) => {
    console.log('Result = '+ answer)
})

Readme

Keywords

Package Sidebar

Install

npm i aimlparser

Weekly Downloads

7

Version

1.0.5

License

BSD

Unpacked Size

21.8 kB

Total Files

3

Last publish

Collaborators

  • ingkwan