Skip to content

Commit

Permalink
Fix example block for gensim.models.Word2Vec (piskvorky#1876)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzw0301 authored and sj29-innovate committed Feb 21, 2018
1 parent 772ea52 commit b349756
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gensim/models/word2vec.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
array([-0.00449447, -0.00310097, 0.02421786, ...], dtype=float32)
The word vectors can also be instantiated from an existing file on disk in the word2vec C format
as a KeyedVectors instance::
as a KeyedVectors instance.
NOTE: It is impossible to continue training the vectors loaded from the C format because hidden weights,
vocabulary frequency and the binary tree is missing::
NOTE: It is impossible to continue training the vectors loaded from the C format because hidden weights,
vocabulary frequency and the binary tree is missing::
>>> from gensim.models import KeyedVectors
>>> word_vectors = KeyedVectors.load_word2vec_format('/tmp/vectors.txt', binary=False) # C text format
>>> word_vectors = KeyedVectors.load_word2vec_format('/tmp/vectors.bin', binary=True) # C binary format
>>> from gensim.models import KeyedVectors
>>> word_vectors = KeyedVectors.load_word2vec_format('/tmp/vectors.txt', binary=False) # C text format
>>> word_vectors = KeyedVectors.load_word2vec_format('/tmp/vectors.bin', binary=True) # C binary format
You can perform various NLP word tasks with the model. Some of them
Expand Down

0 comments on commit b349756

Please sign in to comment.