Skip to content

Commit

Permalink
units grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
manalishah committed Mar 31, 2016
1 parent b5ca9a2 commit ed078f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ target/*
.project
.settings
.classpath
*.egg-info/
3 changes: 1 addition & 2 deletions nltkrest/nltkrest/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def namedEntityRecognizer():
result = {"result" : "success", "names" : names}
if Units:
grammar = '''unit: {<CD><NNS>?<NN.*>?},
unit: {<CD><JJ>?<NN.*>?},
unit: {<CD>}
unit: {<CD><JJ>?<NN.*>}
'''
parser = nltk.RegexpParser(grammar)
units = extract_entity_names(parser.parse(tagged),'unit')
Expand Down

0 comments on commit ed078f0

Please sign in to comment.