Skip to content

Commit

Permalink
Fixing order of label importance (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed May 1, 2018
1 parent cf431bd commit 96194d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ingredient_phrase_tagger/training/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@ def _matchUp(token, labels):
decimalToken = _parseNumbers(token)

# Iterate through the labels in descending order of label importance.
# TODO(mtlynch): Reorder this list so that it is in better order of
# importance.
for label_key in ['name', 'qty', 'range_end', 'unit', 'comment']:
for label_key in ['name', 'unit', 'qty', 'comment', 'range_end']:
label_value = labels[label_key]
if isinstance(label_value, basestring):
for n, vt in enumerate(utils.tokenize(label_value)):
Expand Down

0 comments on commit 96194d4

Please sign in to comment.