Parsing AIML syntax error in PYTHON 2.7?

I am running learn.aiml in my python AIML interpreter but its throwing a damn parsing error, error "

 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

      

and the lines responsible for the error are

<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>

      

The line number starts at 69 line number.

AIML file source http://alicebot.wikidot.com/learn-aiml

+3
python aiml


source to share


No one has answered this question yet

Check out similar questions:

5504
Does Python have a ternary conditional operator?
5231
What are metaclasses in Python?
4473
Calling an external command in Python
3790
How can I safely create a subdirectory?
3602
Does Python have a substring method "contains"?
3119
What is the difference between Python list methods that are appended and expanded?
2818
Finding the index of an element by specifying the list that contains it in Python
2601
How can I make a time delay in Python?
2568
How to find the current time in Python
2005
How do I parse a string to float or int?



All Articles
Loading...
X
Show
Funny
Dev
Pics