Skip to content

Commit

Permalink
use statement.text instead of object
Browse files Browse the repository at this point in the history
  • Loading branch information
이연리 authored and gunthercox committed Jun 21, 2019
1 parent 78d969e commit b0828cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chatterbot/logic/specific_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, chatbot, **kwargs):
self.response_statement = Statement(text=output_text)

def can_process(self, statement):
if statement == self.input_text:
if statement.text == self.input_text:
return True

return False
Expand Down
3 changes: 2 additions & 1 deletion chatterbot/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def train(self, *corpus_paths):

statements_to_create.append(statement)

self.chatbot.storage.create_many(statements_to_create)
if statements_to_create:
self.chatbot.storage.create_many(statements_to_create)


class UbuntuCorpusTrainer(Trainer):
Expand Down

0 comments on commit b0828cb

Please sign in to comment.