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.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

fasttext_reducer-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file fasttext_reducer-0.1.2.tar.gz.

File metadata

  • Download URL: fasttext_reducer-0.1.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for fasttext_reducer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 52b35ba0a529adf0fb2dff57f93532fa3bdb987dcd68b0bb788b8e44ed62c354
MD5 3366a2537a9e5a6aeaa21494a6d25003
BLAKE2b-256 a65b961a0a823fd3f3c263277f61b5a5a5d888a07c0a88b6e854928fdc181d5b

See more details on using hashes here.

File details

Details for the file fasttext_reducer-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fasttext_reducer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e24213cd6d83d27355ef8000c619b05e257c9bf938411e069b1731060773d4a
MD5 7ebf3d98e94a9f22597625fa5a3095ad
BLAKE2b-256 239c9d46f0da4a22badc168945d5646692dc0b4219bfd95ee8e662001f5383d9

See more details on using hashes here.

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