zhangbincheng1997 / chatbot-aiml-webqa Goto Github PK
View Code? Open in Web Editor NEW基于人工智能标记语言 (AIML)和开放域问答(WebQA)的深度智能对话模型
基于人工智能标记语言 (AIML)和开放域问答(WebQA)的深度智能对话模型
help appreciated
我没看到你写的将案例写入aiml文件的代码,可以给我个提示吗
预处理后,在AIML部分,不管输入什么都返回'',然后执行到下一步就报错了,请问该如何解决
def response(self, message):
# 限制字数
if len(message) > 60:
return self.mybot.respond('MAX')
elif len(message) == 0:
return self.mybot.respond('MIN')
# 过滤敏感词
message = self.gfw.filter(message, "*")
if message.find("*") != -1:
return self.mybot.respond('过滤')
# 结束聊天
if message == 'exit' or message == 'quit':
return self.mybot.respond('再见')
# 开始聊天
else:
########
# AIML #
########
result = self.mybot.respond(' '.join(jieba.cut(message))) #此处一直返回''
# 匹配模式
if result[0] != '#':#此处报错
return result
# 搜索模式
elif result.find('#NONE#') != -1:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.