Skip to content

Commit

Permalink
compatible for fasttext
Browse files Browse the repository at this point in the history
  • Loading branch information
rsharmapty committed Apr 12, 2018
1 parent c65e8f9 commit 12b3558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/convert_glove2numpy.py
Expand Up @@ -17,7 +17,7 @@
lines = list(open(glove_path))
embed_matrix = np.zeros((len(lines), args.dim), dtype='float32')
for i, line in enumerate(lines):
parts = line.strip().split()
parts = line.rstrip().split(' ')
word = parts[0]
vec = np.array(parts[1:], dtype='float32')
embed_matrix[i] = vec
Expand Down

0 comments on commit 12b3558

Please sign in to comment.