Skip to content

Commit

Permalink
Merge pull request #738 from danielhers/master
Browse files Browse the repository at this point in the history
Fix #737: support loading word vectors with " " as a word
  • Loading branch information
honnibal authored Jan 12, 2017
2 parents 7cb3d74 + 99eb494 commit a6d7147
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 a6d7147

Please sign in to comment.