Skip to main content

Lightweight package that allows for downloading fasttext models to any location and reducing their dimensions through a one-liner.

Project description

fasttext-reducer

A tiny package (and standalone script) for downloading any pretrained fasttext word vector model to any desired location and then reducing its number of dimensions.

Installation

Either run the following to install from PyPI:

pip install fasttext-reducer

Or clone the repository and install the package using pip install .

Example usage

To download the English pretrained model, reduce it to 30 dimensions, and save it to /Users/admin/, you can run the following command:

fasttext-reduce --root_dir /Users/admin --lang en --dim 30

You can also use the package within Python:

from fasttext_reducer.reduce_fasttext_models import reduce_fasttext_models

reduce_fasttext_models('/Users/admin', 'en', 30)

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

fasttext_reducer-0.1.1.tar.gz (3.4 kB view hashes)

Uploaded Source

Built Distribution

fasttext_reducer-0.1.1-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

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