Add support for handling non-identity entity types in detection logic
- Introduced a new set of non-identity entity types (FOOD, DISH, MEAL, CUISINE, FOODSTUFF, INGREDIENT) that are omitted from detection results without causing contract violations. - Updated the `DetectionStats` class to track omitted non-identity types. - Modified validation logic to ensure that food-related mentions are not treated as identity types, preserving the context of mentions as either PERSON or omitted. - Enhanced tests to verify the correct handling of food homonyms and ensure that invalid entity types are recorded appropriately without causing errors. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
79e4fd0d4b
commit
dd7858347c
7 files changed
+170
-22
No files matched your search
@@ -96,6 +96,7 @@ COMPACT_DIAGNOSTIC_KEYS = (
|
||||
"detect_attempts",
|
||||
"contract_violation",
|
||||
"invalid_entity_type",
|
||||
"omitted_non_identity_types",
|
||||
"detect_cost_unknown",
|
||||
"generation_selection",
|
||||
"style_application",
|
||||
|
||||
Reference in new issue
Block a user