Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing order of training label importance #27

Merged
merged 1 commit into from
May 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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