diff --git a/py/libs/translate.py b/py/libs/translate.py index de0e652..efd77a9 100644 --- a/py/libs/translate.py +++ b/py/libs/translate.py @@ -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