mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Refactor. (#4487)
### What problem does this PR solve? ### Type of change - [x] Refactoring
This commit is contained in:
@ -44,7 +44,7 @@ def baike(cid, default_v=0):
|
||||
|
||||
def corpNorm(nm, add_region=True):
|
||||
global CORP_TKS
|
||||
if not nm or isinstance(nm, str):
|
||||
if not nm or not isinstance(nm, str):
|
||||
return ""
|
||||
nm = rag_tokenizer.tradi2simp(rag_tokenizer.strQ2B(nm)).lower()
|
||||
nm = re.sub(r"&", "&", nm)
|
||||
|
||||
Reference in New Issue
Block a user