Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zake7749/Chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
zake7749 committed Dec 26, 2016
2 parents ae4467d + 9b8541b commit d1ae4fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ __pycache__
*.model
*.log
.DS_Store
*log.txt
*log.txt
Taiba/
2 changes: 1 addition & 1 deletion Chatbot/RuleMatcher/rule/alarm_rule.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{
"domain": "其他",
"response": [
"鬧鐘要訂在今天幾點?"
"鬧鐘要訂在幾點?"
],
"concepts": [
"鬧鐘"
Expand Down
1 change: 0 additions & 1 deletion Chatbot/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def get_response(self, rule_id):
"""
rule = self.rb.rules[rule_id]
res_num = rule.has_response()

if res_num == 0:
return None
else:
Expand Down
7 changes: 4 additions & 3 deletions Chatbot/task_modules/module_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ def get_handler(self, domain):
handler = medicine.MedicalListener(self.console)
elif domain=="天氣":
handler = Weather(self.console)
#elif domain=="股票":
# handler = Stock(self.console)

elif domain=="股票":
handler = Stock(self.console)

#elif domain=="購買":
# handler = purchase.PurchaseOperator(self.console)
#elif domain=="吃喝玩樂":
Expand All @@ -34,5 +36,4 @@ def get_handler(self, domain):
# handler = hotel.HotelListener(self.console)
else:
pass
#print("[module_switch]: undefined module name '%s'" % domain)
return handler

0 comments on commit d1ae4fa

Please sign in to comment.