GloVe embedding reader (Gensim)

Path pimlico.modules.input.embeddings.glove
Executable yes

Reads in embeddings from the GloVe format, storing them in the format used internally in Pimlico for embeddings. We use Gensim’s implementation of the format reader, so the module depends on Gensim.

Can be used, for example, to read the pre-trained embeddings offered by Stanford.

Note that the format is almost identical to word2vec’s text format.

Note that this requires a recent version of Gensim, since they changed their KeyedVectors data structure. This is not enforced by the dependency check, since we’re not able to require a specific version yet.

This module does not support Python 2, so can only be used when Pimlico is being run under Python 3

Inputs

No inputs

Outputs

Name Type(s)
embeddings embeddings

Options

Name Description Type
path (required) Path to the GloVe embedding file string

Example config

This is an example of how this module can be used in a pipeline config file.

[my_glove_embedding_reader_module]
type=pimlico.modules.input.embeddings.glove
path=value

Test pipelines

This module is used by the following test pipelines. They are a further source of examples of the module’s usage.