Skip to content

Commit

Permalink
Fix a bug for description as hours confusion
Browse files Browse the repository at this point in the history
- Pick the index of the last hours to avoid confusions in after-corrections
  • Loading branch information
kagermanov27 committed Jun 19, 2023
1 parent bece03b commit e3711ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/google-local-results-ai-parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def description_as_type_confusion(results, label_order, duplicates)
# Fixes `Closes 12 AM``
def description_as_hours_confusion(results, label_order, duplicates)
description_index = label_order.index("description")
hours_index = label_order.index("hours")
hours_index = label_order.rindex("hours")

# Description may or may not be a duplicate.
# This is a known error from the model, so it has to be handled in any case.
Expand Down

0 comments on commit e3711ca

Please sign in to comment.