Update nand.py
Browse files
nand.py
CHANGED
@@ -171,7 +171,8 @@ def toEn(intxt):
|
|
171 |
if pattern.search(intxt):
|
172 |
translator = pipeline(task="translation", model="Helsinki-NLP/opus-mt-zh-en")
|
173 |
ini_text = translator(intxt, max_length=500)[0]['translation_text']
|
174 |
-
out_text = re.sub("
|
|
|
175 |
out_text = re.sub("web-based", "netlist", out_text)
|
176 |
out_text = re.sub(r"\bweb\b", "netlist", out_text)
|
177 |
out_text = re.sub(r"\bwebsheet\b", "netlist", out_text)
|
|
|
171 |
if pattern.search(intxt):
|
172 |
translator = pipeline(task="translation", model="Helsinki-NLP/opus-mt-zh-en")
|
173 |
ini_text = translator(intxt, max_length=500)[0]['translation_text']
|
174 |
+
out_text = re.sub(r"\bfoot\b", "script", ini_text)
|
175 |
+
out_text = re.sub("self-eco", "automatic eco", out_text)
|
176 |
out_text = re.sub("web-based", "netlist", out_text)
|
177 |
out_text = re.sub(r"\bweb\b", "netlist", out_text)
|
178 |
out_text = re.sub(r"\bwebsheet\b", "netlist", out_text)
|