# aimlparser
AIML parser for Node.js which supports non-English language based on aimlinterpreter

About **aimlinterpreter**
- https://www.npmjs.com/package/aimlinterpreter
- https://github.com/raethlein/AIML.js

# 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)
})
```

