Skip to content

Commit

Permalink
Fix #737: support loading word vectors with " " as a word
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhers committed Jan 12, 2017
1 parent 7cb3d74 commit 99eb494
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy/vocab.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ cdef class Vocab:
cdef double norm = 0.0
for line_num, line in enumerate(file_):
pieces = line.split()
word_str = pieces.pop(0)
word_str = " " if line.startswith(" ") else pieces.pop(0)
if vec_len == -1:
vec_len = len(pieces)
elif vec_len != len(pieces):
Expand Down

0 comments on commit 99eb494

Please sign in to comment.