Skip to content

Commit

Permalink
fix util #54
Browse files Browse the repository at this point in the history
  • Loading branch information
aonotas committed Dec 13, 2017
1 parent 96c3126 commit d5764df
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deepcrf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def load_vocab(filename):
vocab = {}
with open(filename) as f:
for l in f:
w, idx = str_to_unicode_python2(l).strip().split(u'\t')
lst = str_to_unicode_python2(l).strip().split(u'\t')
w = lst[0]
idx = lst[-1]
vocab[w] = int(idx)
return vocab

Expand Down

0 comments on commit d5764df

Please sign in to comment.