andelf / andelf/PyAIML

kernel.bootstrap(learnFiles="std-startup.xml", commands="你好")

Aperta
#5 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
346
Fork
170
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

kernel.bootstrap方法不支持中文

Loading std-startup.xml... done (0.03 seconds)
WARNING: No match found for input: 你好

Kernel bootstrap completed in 0.03 seconds
Saving brain to bot_brain.brn... done (0.00 seconds)

简单处理:

```
if isinstance(commands, (list,)):
for command in commands:
command = command.decode(self._textEncoding)
cmds = Utils.sentences(command)
for cmd in cmds:
print self._respond(cmd, self._globalSessionID)
else:
commands = commands.decode(self._textEncoding)
cmds = Utils.sentences(commands)
for cmd in cmds:
print self._respond(cmd, self._globalSessionID)
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.