提交 db380434 编写于 作者: Q qingqing01 提交者: luotao1

bug fix for dataprovider for quick start inference (#168)

上级 1c2ebe46
......@@ -79,6 +79,6 @@ def predict_initializer(settings, dictionary, **kwargs):
def process_predict(settings, file_name):
with open(file_name, 'r') as f:
for line in f:
comment = line.strip()
comment = line.strip().split()
word_vector = [settings.word_dict.get(w, UNK_IDX) for w in comment]
yield word_vector
......@@ -47,6 +47,6 @@ def predict_initializer(settings, dictionary, **kwargs):
def process_predict(settings, file_name):
with open(file_name, 'r') as f:
for line in f:
comment = line.strip()
comment = line.strip().split()
word_slot = [settings.word_dict.get(w, UNK_IDX) for w in comment]
yield word_slot
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册