PYTHON 2.7 中的 AIML 解析错误?
AIML parsing error in PYTHON 2.7?
我是 运行 我的 python AIML 解释器中的 learn.aiml 但它抛出该死的解析错误错误是 '
python demo.py
Loading std-startup.xml... done (0.01 seconds)
PARSE ERROR: Unexpected <category> tag (line 74, column 4)
PARSE ERROR: Unexpected </learn> tag (line 82, column 6)
PARSE ERROR: Unexpected <learn> tag (line 83, column 6)
PARSE ERROR: Unexpected <eval> tag (line 86, column 8)
PARSE ERROR: Unexpected </learn> tag (line 92, column 6)
PARSE ERROR: Unexpected </template> tag (line 94, column 2)
PARSE ERROR: Unexpected </category> tag (line 95, column 0)
Loading learn.aiml... done (0.00 seconds)
Enter your message >> ^CTraceback (most recent call last):
File "demo.py", line 10, in <module>
print kernel.respond(raw_input("Enter your message >> "))
KeyboardInterrupt
导致错误的行是
<category>
<pattern>XEDUCATE * XSPLIT * XSPLIT *</pattern>
<template>
<learn>
<category>
<pattern>
<eval><uppercase><star index="1"/><star index="3"/></uppercase></eval>
</pattern>
<template>
<eval><star index="2"/></eval>
</template>
</category>
</learn>
<learn>
<category>
<pattern>
<eval><uppercase><star index="1"/><star index="2"/></uppercase></eval>
</pattern>
<template>
<eval><star index="3"/></eval>
</template>
</category>
</learn>
</template>
</category>
行号以69行号开头..
Pandorabots 是它自己的解释器。您需要在 http://www.pandorabots.com 设置一个帐户才能使用它
我是 运行 我的 python AIML 解释器中的 learn.aiml 但它抛出该死的解析错误错误是 '
python demo.py
Loading std-startup.xml... done (0.01 seconds)
PARSE ERROR: Unexpected <category> tag (line 74, column 4)
PARSE ERROR: Unexpected </learn> tag (line 82, column 6)
PARSE ERROR: Unexpected <learn> tag (line 83, column 6)
PARSE ERROR: Unexpected <eval> tag (line 86, column 8)
PARSE ERROR: Unexpected </learn> tag (line 92, column 6)
PARSE ERROR: Unexpected </template> tag (line 94, column 2)
PARSE ERROR: Unexpected </category> tag (line 95, column 0)
Loading learn.aiml... done (0.00 seconds)
Enter your message >> ^CTraceback (most recent call last):
File "demo.py", line 10, in <module>
print kernel.respond(raw_input("Enter your message >> "))
KeyboardInterrupt
导致错误的行是
<category>
<pattern>XEDUCATE * XSPLIT * XSPLIT *</pattern>
<template>
<learn>
<category>
<pattern>
<eval><uppercase><star index="1"/><star index="3"/></uppercase></eval>
</pattern>
<template>
<eval><star index="2"/></eval>
</template>
</category>
</learn>
<learn>
<category>
<pattern>
<eval><uppercase><star index="1"/><star index="2"/></uppercase></eval>
</pattern>
<template>
<eval><star index="3"/></eval>
</template>
</category>
</learn>
</template>
</category>
行号以69行号开头..
Pandorabots 是它自己的解释器。您需要在 http://www.pandorabots.com 设置一个帐户才能使用它