diff --git a/examples/vectors_fast_text.py b/examples/vectors_fast_text.py index 4e5640f0d..41edf79b8 100644 --- a/examples/vectors_fast_text.py +++ b/examples/vectors_fast_text.py @@ -30,7 +30,7 @@ def main(vectors_loc, lang=None): nlp.vocab.reset_vectors(width=int(nr_dim)) for line in file_: line = line.rstrip().decode('utf8') - pieces = line.rsplit(' ', nr_dim) + pieces = line.rsplit(' ', int(nr_dim)) word = pieces[0] vector = numpy.asarray([float(v) for v in pieces[1:]], dtype='f') nlp.vocab.set_vector(word, vector) # add the vectors to the vocab