我有一个网页,我只是在其中玩弄 HTML、CSS 和 Javascript。 我决定在那里创建一个聊天机器人。
AIML 似乎是可行的方法,而且我已经知道如何编写它了。
问题是:获得 bot.aiml 文件后,我该如何处理它? 我假设我需要某种 javascript 函数来与之交互。
最佳答案
如果您只能访问 HTML、CSS 和 JavaScript 而不能访问某些服务器端技术,那么您将需要一个 JavaScript AIML 解释器。
快速搜索会发现以下内容:
AIML Interpreter用 node.js 编写
AIMLInterpreter is a module that allows you to parse AIML files and to find the correct answer to a given message.
aiml-high用 node.js 编写。基于 aimlinterpreter 构建。
aiml-high is a module that allows you to parse AIML files and to find the correct answer to a given message.
a half-complete node.js AIML interpreter with a bad attitude.
Surly2 is a remake from the ground up of Surly using Node 5 and using as much asynchronicity as possible.
Burly is a fork of Surly2
关于javascript - 如何在网页中集成 AIML 聊天机器人,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14568192/