GloveVocab

Vocab object prepopulated with Glove embeddings by Pennington, Socher, and Manning. This is a subclass of Vocab. For details, see:

http://nlp.stanford.edu/projects/glove/.

This only supports the 50-d wikipedia/Giga-word version.

The download is from:

https://dl.dropboxusercontent.com/u/9015381/datasets/torchnlp/glove.6B.50d.t7

GloveVocab:load_words()

View source

Retrieves the word list and populates the vocabulary.

GloveVocab:embeddings()

View source

Returns:

  • (torch.Tensor) pretrained embeddings for words in the vocabulary

GloveVocab:__tostring__()

View source

Returns:

  • (string) string representation