Skip to content

Commit

Permalink
bug fix for dataprovider for quick start inference (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
qingqing01 authored and luotao1 committed Oct 8, 2016
1 parent 1c2ebe4 commit db38043
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demo/quick_start/dataprovider_bow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion demo/quick_start/dataprovider_emb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit db38043

Please sign in to comment.