mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-29 23:24:53 -05:00
fix: Include contents of purpose field when parsing ingredients (#6494)
This commit is contained in:
@@ -133,6 +133,9 @@ class NLPParser(ABCIngredientParser):
|
||||
if ingredient.comment:
|
||||
note_parts.append(ingredient.comment.text)
|
||||
confidences.append(ingredient.comment.confidence)
|
||||
if ingredient.purpose:
|
||||
note_parts.append(ingredient.purpose.text)
|
||||
confidences.append(ingredient.purpose.confidence)
|
||||
|
||||
# average confidence among all note parts
|
||||
confidence = sum(confidences) / len(confidences) if confidences else 0
|
||||
|
||||
Reference in New Issue
Block a user