Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

小白的疑问 #6

Open
JonathanZcl opened this issue Aug 25, 2016 · 13 comments
Open

小白的疑问 #6

JonathanZcl opened this issue Aug 25, 2016 · 13 comments

Comments

@JonathanZcl
Copy link

现在我直接用你的包(aiml),但是在你的例子中还是无法识别中文。

import simple
Loading cn-startup.xml... done (0.00 seconds)
Loading cn-test.aiml... done (0.00 seconds)
你好
我怎么称呼你?
你 好
很高兴见到你, ����.
王毛毛
你多大了?
34
34 岁, 我比你年轻好多好多.
再见
你最喜欢什么颜色?
红色
��ɫ, 我也喜欢, 不过我更喜欢透明色.

@andelf
Copy link
Owner

andelf commented Aug 29, 2016

因为很久没有维护,猜测是目前的Python版本处理unicode和当时不太相同。
其他原因还可能是不同操作系统的默认编码问题。我想想怎么整。预计周末前给你回复

@JonathanZcl
Copy link
Author

你中文处理那一页是放在 AimlParser.py这个文件的吗?

@JonathanZcl
Copy link
Author

您好,请问AimlParser.py文件您更新了吗?

@andelf
Copy link
Owner

andelf commented Sep 5, 2016

英文处理是没问题的,因为英文可以按照空格分割。
但是中文就不太容易整,所以之前的处理方法是按照中文,把每个单字之间加上空格。
相关代码的确是在 AimlParser.py

@sunzejian
Copy link

image
为什么有时候不回复啊

@andelf
Copy link
Owner

andelf commented Mar 4, 2017

诶?不应该啊。。可以尝试print下规则列表

@andelf
Copy link
Owner

andelf commented Mar 4, 2017

或者是输入时候的编码没有办法识别?

@sunzejian
Copy link

在spyder里面粘贴 代码里面的汉语 是有回复的,但 用输入法打字 又不回复了
image
我正在想是不是输入的问题,但半角输入和全角输入都是一个操行。

@sunzejian
Copy link

我想了两天还是只能在spyder里面靠粘贴进行输入,菜鸟一个

@andelf
Copy link
Owner

andelf commented Mar 6, 2017

噗。。可能是shell有点问题。输入的编码?

@sunzejian
Copy link

我在网上看到很多人在utf-8编码条件下,载cmd里面无法输入中文,或输入中文回复却只能看到乱码,只有你截图里面cmd界面实现了中文交互,你用的是什么版本啊

@sunzejian
Copy link

是用半角还是全角,用什么输入法,用什么编码实现的啊

@andelf
Copy link
Owner

andelf commented Mar 9, 2017

我平时 linux 服务器下没有问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants