We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f417cd0 commit e0b4d8cCopy full SHA for e0b4d8c
src/memos/mem_reader/simple_struct.py
@@ -78,7 +78,6 @@ def detect_lang(text):
78
chinese_pattern = r"[\u4e00-\u9fff\u3400-\u4dbf\U00020000-\U0002a6df\U0002a700-\U0002b73f\U0002b740-\U0002b81f\U0002b820-\U0002ceaf\uf900-\ufaff]"
79
chinese_chars = re.findall(chinese_pattern, cleaned_text)
80
text_without_special = re.sub(r"[\s\d\W]", "", cleaned_text)
81
- print(text_without_special)
82
if text_without_special and len(chinese_chars) / len(text_without_special) > 0.3:
83
return "zh"
84
return "en"
0 commit comments