Skip to content

Commit f33bf82

Browse files
author
Russell
committed
Added markdown to README.
1 parent 6e9df02 commit f33bf82

File tree

2 files changed

+45
-22
lines changed

2 files changed

+45
-22
lines changed

README

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
## GloVe: Global Vectors for Word Representation
2+
3+
<em>frog</em> nearest neighbors | Litoria | Leptodactylidae | Rana | Eleutherodactylus
4+
-------------------------|:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|
5+
<li> frogs <li> toad <li> litoria <li> leptodactylidae <li> rana <li> lizard <li> eleutherodactylus | ![](http://nlp.stanford.edu/projects/glove/images/litoria.jpg) | ![](http://nlp.stanford.edu/projects/glove/images/leptodactylidae.jpg) | ![](http://nlp.stanford.edu/projects/glove/images/rana.jpg) | ![](http://nlp.stanford.edu/projects/glove/images/eleutherodactylus.jpg)
6+
7+
We provide an implementation of the GloVe model for learning word representations. Please see the [project page](http://nlp.stanford.edu/projects/glove/) for more information.
8+
9+
man -> woman | city -> zip | comparative -> superlative
10+
:-------------------------:|:-------------------------:|:-------------------------:|:-------------------------:|
11+
![](http://nlp.stanford.edu/projects/glove/images/man_woman_small.jpg) | ![](http://nlp.stanford.edu/projects/glove/images/city_zip_small.jpg) | ![](http://nlp.stanford.edu/projects/glove/images/comparative_superlative_small.jpg)
12+
13+
## Download pre-trained word vectors
14+
Pre-trained word vectors are made available under the <a href="http://opendatacommons.org/licenses/pddl/">Public Domain Dedication
15+
and License</a>
16+
<div class="entry">
17+
<ul style="padding-left:0px; margin-top:0px; margin-bottom:0px">
18+
<li> <a href="http://dumps.wikimedia.org/enwiki/20140102/">Wikipedia 2014</a> + <a href="https://catalog.ldc.upenn.edu/LDC2011T07">Gigaword 5</a> (6B tokens, 400K vocab, uncased, 50d, 100d, 200d, &amp; 300d vectors, 822 MB download): <a href="http://nlp.stanford.edu/data/glove.6B.zip">glove.6B.zip</a> </li>
19+
<li> Common Crawl (42B tokens, 1.9M vocab, uncased, 300d vectors, 1.75 GB download): <a href="http://nlp.stanford.edu/data/glove.42B.300d.zip">glove.42B.300d.zip</a> </li>
20+
<li> Common Crawl (840B tokens, 2.2M vocab, cased, 300d vectors, 2.03 GB download): <a href="http://nlp.stanford.edu/data/glove.840B.300d.zip">glove.840B.300d.zip</a> </li>
21+
<li> Twitter (2B tweets, 27B tokens, 1.2M vocab, uncased, 25d, 50d, 100d, &amp; 200d vectors, 1.42 GB download): <a href="http://nlp.stanford.edu/data/glove.twitter.27B.zip">glove.twitter.27B.zip</a> Ruby <a href="preprocess-twitter.rb">script</a> for preprocessing Twitter data </li>
22+
</ul>
23+
</div>
24+
25+
## Train word vectors on a new corpus
26+
27+
$ git clone http://github.com/stanfordnlp/glove
28+
$ cd glove && make
29+
$ ./demo.sh
30+
31+
The demo.sh scipt downloads a small corpus, consisting of the first 100M characters of Wikipedia. It collects unigram counts, constructs and shuffles cooccurrence data, and trains a simple version of the GloVe model. It also runs a word analogy evaluation script in python. Continue reading for further usage details and instructions for how to run on your own corpus.
32+
33+
### Package Contents
34+
This package includes four main tools:
35+
#### 1) vocab_count
36+
Constructs unigram counts from a corpus, and optionally thresholds the resulting vocabulary based on total vocabulary size or minimum frequency count. This file should already consist of whitespace-separated tokens. Use something like the Stanford Tokenizer (http://nlp.stanford.edu/software/tokenizer.shtml) first on raw text.
37+
#### 2) cooccur
38+
Constructs word-word cooccurrence statistics from a corpus. The user should supply a vocabulary file, as produced by 'vocab_count', and may specify a variety of parameters, as described by running './build/cooccur'.
39+
#### 3) shuffle
40+
Shuffles the binary file of cooccurrence statistics produced by 'cooccur'. For large files, the file is automatically split into chunks, each of which is shuffled and stored on disk before being merged and shuffled togther. The user may specify a number of parameters, as described by running './build/shuffle'.
41+
#### 4) glove
42+
Train the GloVe model on the specified cooccurrence data, which typically will be the output of the 'shuffle' tool. The user should supply a vocabulary file, as given by 'vocab_count', and may specify a number of other parameters, which are described by running './build/glove'.
43+
44+
### License
45+
All work contained in this package is licensed under the Apache License, Version 2.0. See the include LICENSE file.

0 commit comments

Comments
 (0)