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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for fasttext_reducer-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f92a5dd8de95f81ff486ab396d9ede60c4a3039b96a32819b9cd323b3527501a |
|
MD5 | 5f131fd2331ba742e971abb5635583a9 |
|
BLAKE2b-256 | 1ad1f8faf3978c070f9ce75b6ff6aa6144478ab315d51d0f34ec8fc632d0c1f2 |