aiml

Am trying to built a chat bot using aiml with python

走远了吗. 提交于 2019-12-11 06:06:43
问题 import aiml import os kernel = aiml.kernel() if os.path.isfile("bot_brain.brn"): kernel.bootstrap(brainFile = "bot_brain.brn") else: kernel.bootstrap(learnFiles = "std-startup.xml", commands = "load aiml b") kernel.savebrain("bot_brain.brn") while True: print kernel.respond(raw_input("Enter Your Message")).strip() aiml.kernel() It is throwing an error like Traceback (most recent call last): File " init .py", line 3, in kernel = aiml.kernel() AttributeError: 'module' object has no attribute

AIMLProcessorExtension: tag not working in aiml

怎甘沉沦 提交于 2019-12-08 03:51:22
问题 I am trying to create my own tag in aiml using program tab. The tag is not working. What is the problem? Java code: public class AIMLExtension implements AIMLProcessorExtension{ public Set<String> extensionTagNames = Utilities.stringSet("check"); @Override public Set<String> extensionTagSet() { // TODO Auto-generated method stub return extensionTagNames; } private String contactId(Node node, ParseState ps) { return "Success :P"; } @Override public String recursEval(Node node, ParseState ps) {

PyAIML not loading startup

笑着哭i 提交于 2019-12-05 11:52:08
I am beginning a project on Python that implements PyAIML and I wrote the following code to create a brain for my project: import aiml k=aiml.Kernel() k.learn("std-startup.xml") k.respond("LOAD AIML B") k.saveBrain("jarvis.brn") When I run the program I get this error: WARNING: No match found for input: LOAD AIML B I understand that I needed to download an AIML set to begin development. So I did, but I'm stuck there. Please help. I'm a noob programmer so don't be rough on me for this dumb mistake. Thanks in advance! The .learn() method will not throw an error if the file you pass it does not

Setting BOT properties in AIML

五迷三道 提交于 2019-12-04 21:37:14
In AIML I have seen various files where the Bot properties is being used. For example : <bot name="name" /> Here, the bot name is being used, but I am not able to find the place where to set this property, i.e. where should I define the name. On searching I found that its stored in the .properties ( link ) file, but I cannot find the file anywhere. There is also a github repsitory which has many files and used the bot properties , but here also no .properties file : Repo Link So, where should I store the .properties file and if not then how should I add the bot properties in AIML. As the AIML

Why AIML pattern matching is not working?

☆樱花仙子☆ 提交于 2019-12-02 13:21:31
问题 I'm working on a voice bot, which will get user voice input and executes task based on it. I'm using AIML 1.0. The problem I'm facing is that the pattern matching is not working. <category> <pattern>OPEN SAP</pattern> <template> <random> <li>Sure thing!</li> <li>Right away, sir!</li> <li>On it!</li> </random> <system>start saplogon </system> </template> </category> <category> <pattern>* OPEN SAP</pattern> <srai> OPEN SAP </srai> </category> <category> <pattern>* SAP *</pattern> <srai> OPEN

Why AIML pattern matching is not working?

此生再无相见时 提交于 2019-12-02 04:36:57
I'm working on a voice bot, which will get user voice input and executes task based on it. I'm using AIML 1.0. The problem I'm facing is that the pattern matching is not working. <category> <pattern>OPEN SAP</pattern> <template> <random> <li>Sure thing!</li> <li>Right away, sir!</li> <li>On it!</li> </random> <system>start saplogon </system> </template> </category> <category> <pattern>* OPEN SAP</pattern> <srai> OPEN SAP </srai> </category> <category> <pattern>* SAP *</pattern> <srai> OPEN SAP </srai> </category> When I say 'Can you open SAP', it is not recognizing. What is the problem in the