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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fasttext_reducer-0.1.3.tar.gz.
File metadata
- Download URL: fasttext_reducer-0.1.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49cf2fc214bd82138a174a833085ea0741f912c50fefd43dc91c684779672e44
|
|
| MD5 |
6feef765d7026e17461f635eff25ba36
|
|
| BLAKE2b-256 |
164d62a336d4a5656b2db8066bdd052a34476b617cd6346fd06268e42c105616
|
File details
Details for the file fasttext_reducer-0.1.3-py3-none-any.whl.
File metadata
- Download URL: fasttext_reducer-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4763c7a6f8babe4074d2849a1c6f10c3e4fe885f32cdb72bbf2640407e97a126
|
|
| MD5 |
3fcba0ea0bf646c9fe78e1bb9dec042e
|
|
| BLAKE2b-256 |
126accd38b5ba9ca2e422c4c7f3a31d966419ab04c8fa72428d1ea71ffdccb72
|