Merge pull request #302 from yolain/v1.2.2-beta
Fix filtering embedding carries chinese #299
This commit is contained in:
@@ -80,7 +80,7 @@ def has_chinese(text):
|
||||
_text = text
|
||||
_text = re.sub(r'<.*?>', '', _text)
|
||||
_text = re.sub(r'__.*?__', '', _text)
|
||||
_text = re.sub(r'embedding:.*?(\d+)?', '', _text)
|
||||
_text = re.sub(r'embedding:.*?$', '', _text)
|
||||
for char in _text:
|
||||
if '\u4e00' <= char <= '\u9fff':
|
||||
has_cn = True
|
||||
|
||||
Reference in New Issue
Block a user