Fix a bug

This commit is contained in:
Richard Chien
2017-01-13 12:48:33 +08:00
parent de0a783ecf
commit 4b30979c07
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ def parse_potential_commands(sentence):
processed = False
for regex in processor[0]:
for word, flag in segmentation:
if re.match(regex, word):
if re.search(regex, word):
result = processor[1](sentence, segmentation)
if result:
potential_commands.append(result)