fix(regulatory): 修复无标签文档适用条件回显
This commit is contained in:
@@ -156,7 +156,7 @@ def _clean_fields(fields: dict[str, Any]) -> dict[str, str]:
|
||||
value = fields.get(label)
|
||||
if not isinstance(value, str):
|
||||
continue
|
||||
normalized = " ".join(value.strip().split())
|
||||
normalized = " ".join(value.strip().split()).replace("(", "(").replace(")", ")")
|
||||
if normalized:
|
||||
clean[label] = normalized
|
||||
return clean
|
||||
@@ -200,4 +200,6 @@ def _better_product_name(candidate: str, current: str) -> bool:
|
||||
def _invalid_field_value(value: str) -> bool:
|
||||
if not value:
|
||||
return True
|
||||
if "<EFBFBD>" in value:
|
||||
return True
|
||||
return any(keyword in value for keyword in ["第1章", "第2章", "第3章", "监管信息", "综述资料", "章节目录"])
|
||||
|
||||
Reference in New Issue
Block a user