Portál AbcLinuxu, 25. dubna 2024 12:45
#!/usr/bin/env python # -*- coding: utf-8 -*- import aiml import os k = aiml.Kernel() homedir=os.getcwd() os.chdir('./aaa') list=os.listdir('./'); for item in list: k.learn(item) k.setPredicate("name","omegle_bot") k.setPredicate("master","ravi") os.chdir(homedir) k.saveBrain("brain.brn")Jenze se stale potykam s problemem. Po spusteni mi skript zahlasi nasledujici chyby:
./aiml.py Loading Adverbs.aiml... done (0.67 seconds) Loading Humor.aiml... done (0.01 seconds) PARSE ERROR: Unexpected html:br tag (line 21, column 27) PARSE ERROR: Unexpected html:br tag (line 32, column 25) PARSE ERROR: Unexpected html:br tag (line 62, column 100) PARSE ERROR: Unexpected html:br tag (line 93, column 160) PARSE ERROR: Unexpected html:br tag (line 371, column 62) Loading Luckyslots.aiml... done (0.24 seconds) PARSE ERROR: Unexpected html:br tag (line 15, column 257) PARSE ERROR: Unexpected html:br tag (line 839, column 405) PARSE ERROR: Unexpected html:br tag (line 909, column 399) PARSE ERROR: Unexpected html:br tag (line 942, column 254) PARSE ERROR: Unexpected html:a tag (line 1038, column 104) PARSE ERROR: Unexpected html:a tag (line 1420, column 62) PARSE ERROR: Unexpected html:a tag (line 1425, column 80) PARSE ERROR: Unexpected html:br tag (line 2996, column 64) PARSE ERROR: Unexpected html:a tag (line 3974, column 59) PARSE ERROR: Unexpected html:a tag (line 4097, column 90) ...Proste syntax errory v onech aiml souborech. Pritom je vice projektu, ktere pouzivaji kombinaci pyAIML a Annotated A.L.I.C.E. AIML files a nemaji s tim problemy. Prikladam skript rovnou se stazenym pyAIML a Annotated A.L.I.C.E. AIML files. Staci pouze spustit skript ./pyaiml.py Muzete mi prosim napsat, zda vam to ty errory haze take, pripadne kde tedy delam chybu? Diky.
... Loading Integer.aiml... done (0.09 seconds) Loading Philosophy.aiml... done (0.00 seconds) Loading Music.aiml... done (0.01 seconds) Loading Stories.aiml... done (0.29 seconds) Loading Blackjack.aiml... done (0.33 seconds) PARSE ERROR: Unexpected thastar tag (line 145, column 32) PARSE ERROR: Required "name" attribute missing in get element (line 753, column 53) PARSE ERROR: Unexpected peron tag (line 1380, column 16) Loading update.aiml... done (0.36 seconds) Loading Psychology.aiml... done (0.33 seconds) Loading Human.aiml... done (0.07 seconds) Loading Literature.aiml... done (0.01 seconds) Loading Utilities.aiml... done (0.01 seconds) Loading Science.aiml... done (0.01 seconds) Loading Xfind.aiml... done (0.01 seconds) Loading Multiple.aiml... done (0.02 seconds) Loading Salutations.aiml... done (0.06 seconds) Loading Interjection.aiml... done (0.06 seconds) Loading Inquiry.aiml... done (0.01 seconds) PARSE ERROR: Unexpected get tag (line 74, column 16) PARSE ERROR: Unexpected get tag (line 74, column 33) PARSE ERROR: Unexpected get tag (line 75, column 21) PARSE ERROR: Unexpected get tag (line 75, column 43) PARSE ERROR: Unexpected get tag (line 76, column 21) PARSE ERROR: Unexpected get tag (line 76, column 44) PARSE ERROR: Unexpected get tag (line 77, column 19) PARSE ERROR: Unexpected get tag (line 77, column 40) ...
Tiskni Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.