andelf / andelf/PyAIML

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

未關閉
#5 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
346
分支
170
PR 合併指標
30 天內沒有已合併 PR

描述

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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。