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

avx_docs
qingqing01 8 years ago committed by luotao1
parent 1c2ebe467b
commit db38043439

@ -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

Loading…
Cancel
Save