Skip to main content

Python implementation of the GloVe algorithm for word embedding

Project description

# GlovePy

A Python implementation with Cython of the [GloVe](http://www-nlp.stanford.edu/projects/glove/) algorithm with multi-threaded training. this Python package mainly contains two Python classes. The first Python class (Corpus) builds the co-occurrence matrix given a collection of documents; while the second Python class (Glove) will generate vector representations for words.

GloVe is an unsupervised learning algorithm for generating vector representations for words developed by Stanford NLP lab. The paper describing the model is [here](http://nlp.stanford.edu/projects/glove/glove.pdf). In contrast with [Word2Vec](https://code.google.com/p/word2vec/) (there is a great Python implementation in [gensim](http://radimrehurek.com/gensim/models/word2vec.html)) which is often referred as prediction method, GloVe is called counting method which the embedding is produced by factorizing the logarithm of the corpus word co-occurrence matrix.

The original implementation for this Machine Learning model can be [found here](http://nlp.stanford.edu/projects/glove/). This work is based on the work of [glove-python](https://github.com/maciejkula/glove-python) and [glove](https://github.com/JonathanRaiman/glove).

## Installation

### Build on Windows

If you are installing this package on Windows (tested on Windows 10), you will need to install Visual C++ 2015 Build Tools. If you have already installed Microsoft Visual Studio, you cannot install the Visual C++ Build Tools. It will ask you to uninstall your existing VS when you tried to install the Visual C++ build tools using the standalone installer. However, since you already have the VS, you can go to Control Panel—Programs and Features and right click the VS item and Change-Modify, then check the option of those components that relates to the Visual C++ Build Tools, like Visual C++, Windows SDD, then install them. Please also make sure the Build tools path has been added to the system path.

Once you have the Visual C++ Build Tools, you can build the package as follows:

`python python setup.py build_ext --inplace --compiler=msvc python setup.py install `

### Linux

Install from the source code:

`python python setup.py install `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glovepy-0.0.3.tar.gz (145.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glovepy-0.0.3-py3.5-linux-x86_64.egg (510.2 kB view details)

Uploaded Egg

File details

Details for the file glovepy-0.0.3.tar.gz.

File metadata

  • Download URL: glovepy-0.0.3.tar.gz
  • Upload date:
  • Size: 145.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for glovepy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1ac723a058b00df3425bea75734047ed3eacfbe81557243f2cca6784627df1b7
MD5 32513dd4efddeb8f0e2e389c5dbefff5
BLAKE2b-256 0d59b1a51767841b03a0897c305b7dfb044e81840c8efd419525b513d63d5415

See more details on using hashes here.

File details

Details for the file glovepy-0.0.3-py3.5-linux-x86_64.egg.

File metadata

File hashes

Hashes for glovepy-0.0.3-py3.5-linux-x86_64.egg
Algorithm Hash digest
SHA256 254e594ab37db433b38ebe3fb813eab18c8d4f27e7920637c7d357233adb7fbc
MD5 cdb0de7bab514e57be03759b515892a4
BLAKE2b-256 73a984e8e998f3516c8e4ad78c07816dc58bf003f4bf0c8ee8f8685567eb11db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page