yangdx
commited on
Commit
·
cd7baaa
1
Parent(s):
25a0492
Fix linting
Browse files- lightrag/utils.py +1 -5
lightrag/utils.py
CHANGED
@@ -1385,11 +1385,7 @@ def normalize_extracted_info(name: str, is_entity=False) -> str:
|
|
1385 |
name = re.sub(r"(?<=[a-zA-Z0-9])\s+(?=[\u4e00-\u9fa5])", "", name)
|
1386 |
|
1387 |
# Remove English quotation marks from the beginning and end
|
1388 |
-
if (
|
1389 |
-
len(name) >= 2
|
1390 |
-
and name.startswith('"')
|
1391 |
-
and name.endswith('"')
|
1392 |
-
):
|
1393 |
name = name[1:-1]
|
1394 |
|
1395 |
if is_entity:
|
|
|
1385 |
name = re.sub(r"(?<=[a-zA-Z0-9])\s+(?=[\u4e00-\u9fa5])", "", name)
|
1386 |
|
1387 |
# Remove English quotation marks from the beginning and end
|
1388 |
+
if len(name) >= 2 and name.startswith('"') and name.endswith('"'):
|
|
|
|
|
|
|
|
|
1389 |
name = name[1:-1]
|
1390 |
|
1391 |
if is_entity:
|