Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hungtraan committed Aug 8, 2016
1 parent bcb2cd6 commit 9441349
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Utils/NLP.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ def hasWifi(sentence):
return False

def isGetNews(sentence):
# Solve special case when "Get" at the beginning of sentence is recognized as
# a proper noun
if "get news about" in sentence.string.lower() or "get information about" in sentence.string.lower():
return True

m = search('{VP} {VBG+? JJ+?} {news | information} about {NP+}', sentence)
if len(m) > 0:
if m[0].group(1).string.lower() in ['get', 'find', 'tell', 'show', 'fetch', 'search']:
Expand Down

0 comments on commit 9441349

Please sign in to comment.