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
@@ -289,6 +289,7 @@ def persist_engine_error(
|
||||
"detect_partial_discarded",
|
||||
"contract_violation",
|
||||
"invalid_entity_type",
|
||||
"omitted_non_identity_types",
|
||||
"generate_called",
|
||||
):
|
||||
if merged.get(key) is None:
|
||||
|
||||
Reference in new issue
Block a user