Skip to main content

A general purpose toolkit for word embeddings

Project description

embeddix

GitHub release PyPI release Build MIT License

A small toolkit for processing word embeddings with numpy. You can use embeddix to convert .txt embeddings (such as glove files) to numpy and vice-versa.

Install

pip install embeddix

or, after a git clone:

python3 setup.py install

Use

Extract vocabulary from a txt embeddings file

embeddix extract --embeddings /absolute/path/to/embeddings.txt

Convert from txt to numpy

embeddix convert --to numpy --embeddings /absolute/path/to/embeddings.txt

Convert from numpy to txt

embeddix convert --to txt --embeddings /absolute/path/to/embeddings.npy

Evaluate DSM on intrinsic tasks

Evaluate on lexical similarity (men, simlex, simverb) or concept categorization (essli, ap, battig)

embeddix evaluate \
--embeddings /absolute/path/to/embeddings.npy \
--vocab /absolute/path/to/embeddings.vocab \
--dataset instrinsic_task_dataset_name

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

embeddix-1.16.0.tar.gz (434.1 kB view hashes)

Uploaded Source

Supported by

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