### What problem does this PR solve?

### Type of change

- [x] Refactoring
This commit is contained in:
Kevin Hu
2025-01-15 14:06:46 +08:00
committed by GitHub
parent 713f38090b
commit e478586a8e
5 changed files with 6 additions and 10 deletions

View File

@ -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)