Remove the single quotation marks that enclose the names of the entities

This commit is contained in:
yangdx
2025-04-23 21:30:07 +08:00
parent 39e7a3c17a
commit 6977db3dd1

View File

@@ -1428,6 +1428,8 @@ def normalize_extracted_info(name: str, is_entity=False) -> str:
# Remove English quotation marks from the beginning and end
if len(name) >= 2 and name.startswith('"') and name.endswith('"'):
name = name[1:-1]
if len(name) >= 2 and name.startswith("'") and name.endswith("'"):
name = name[1:-1]
if is_entity:
# remove Chinese quotes