简体   繁体   中英

AIML parsing error in PYTHON 2.7?

I am running the learn.aiml in my python AIML interpretor but its throwing damn parsing error the error is '

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

Line number starts with 69 line number..

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

Pandorabots is its own interpreter. You need to set up an account at http://www.pandorabots.com to use it

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM