未验证 提交 fda276b1 编写于 作者: K KP 提交者: GitHub

Update dependencies of machine translation modules

上级 a7e44e88
...@@ -16,14 +16,7 @@ import re ...@@ -16,14 +16,7 @@ import re
from typing import List from typing import List
import codecs import codecs
try: from sacremoses import MosesTokenizer, MosesDetokenizer
import nltk
nltk.data.find('misc/perluniprops')
nltk.data.find('corpora/nonbreaking_prefixes')
except LookupError:
nltk.download('perluniprops')
nltk.download('nonbreaking_prefixes')
from nltk.tokenize.moses import MosesTokenizer, MosesDetokenizer
from subword_nmt.apply_bpe import BPE from subword_nmt.apply_bpe import BPE
......
...@@ -21,14 +21,7 @@ import jieba ...@@ -21,14 +21,7 @@ import jieba
jieba.setLogLevel(logging.INFO) jieba.setLogLevel(logging.INFO)
try: from sacremoses import MosesTokenizer, MosesDetokenizer
import nltk
nltk.data.find('misc/perluniprops')
nltk.data.find('corpora/nonbreaking_prefixes')
except LookupError:
nltk.download('perluniprops')
nltk.download('nonbreaking_prefixes')
from nltk.tokenize.moses import MosesDetokenizer
from subword_nmt.apply_bpe import BPE from subword_nmt.apply_bpe import BPE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册