Wrapper for Google word2vec


Keywords
NLP, word2vec, doc2vec, python
License
Apache-2.0
Install
pip install word2vec==0.11.1

Documentation

word2vec

PyPI Testing Coverage Status License

Python interface to Google word2vec.

Training is done using the original C code, other functionality is pure Python with numpy.

Installation

pip install word2vec

The installation requires to compile the original C code:

Compilation

In order to compile the original C code a gcc compiler is needed.

You can override the compilation flags if needed:

WORD2VEC_CFLAGS='-march=corei7' pip install word2vec

Windows: There is basic some support for this support based on this win32 port.

Usage

Example notebook: word2vec

The default functionality from word2vec is available from the command line:

  • word2vec
  • word2phrase
  • word2vec-distance
  • word2vec-word-analogy
  • word2vec-compute-accuracy

Experimental functionality on doc2vec can be found in this other example: doc2vec