gofeco commited on
Commit
eb03d52
1 Parent(s): fcbf96e

Update nand.py

Browse files
Files changed (1) hide show
  1. nand.py +2 -1
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("ECO foot", "ECO Script", ini_text)
 
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)