Add support for Chinese book title marks in normalize_extracted_info
This commit is contained in:
parent
ae65676b4e
commit
2c551cb5db
1 changed files with 6 additions and 0 deletions
|
|
@ -1896,6 +1896,12 @@ def normalize_extracted_info(name: str, remove_inner_quotes=False) -> str:
|
|||
if "‘" not in inner_content and "’" not in inner_content:
|
||||
name = inner_content
|
||||
|
||||
# Handle Chinese-style book title mark
|
||||
if name.startswith("《") and name.endswith("》"):
|
||||
inner_content = name[1:-1]
|
||||
if "《" not in inner_content and "》" not in inner_content:
|
||||
name = inner_content
|
||||
|
||||
if remove_inner_quotes:
|
||||
# Remove Chinese quotes
|
||||
name = name.replace("“", "").replace("”", "").replace("‘", "").replace("’", "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue