MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / translate_text

Function translate_text

scripts/postprocess_english_articles.py:17–20  ·  view source on GitHub ↗
(text: str)

Source from the content-addressed store, hash-verified

15
16
17def translate_text(text: str) -> str:
18 if not text.strip() or not re.search(r"[\u4e00-\u9fff]", text):
19 return text
20 return argostranslate.translate.translate(text, "zh", "en").strip()
21
22
23def clean_text(text: str) -> str:

Callers 1

flush_fenceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected