Skip to main content

A pure Python FastText model reader

Project description

FastText lite

Latest PyPI version Build status

A pure[^1] Python FastText interface, to ensure that FastText model stay usable for as long as possible.

  • This is slower than the original FastText, for some methods by orders of magnitude. It's the price to pay for not using Cython or compiled code. These methods are also not usually bottlenecks in standard uses of FastText.
  • Support for training is not planned, if you want to train new models, I would advise starting a new library from scratch to avoid being stuck in FastText's historical cruft, and take inspiration from Floret instead. You can save models using FastText lite, but you'll have to change the weights etc manually.

FastText has been in maintenance mode for some time, with no indication that it will ever change. In the absence of further releases, it will stay stuck in increasingly obsolete Python versions and get increasingly hard to rebuild. Gensim has a working re-implementation that is easier to use, but it too has a relatively slow release pace and does not necessarily keep up with the rest of the Python ecosystem. This project provides a path to keep using FastText models for longer and at low cost, by extracting the relevant parts from Gensim and converting the Cython parts back to pure Python (and optimising them as well as I can). So far it supports loading the binary models and use them for word embedding purposes.

[^1]: The only non-pure Python dependency is NumPy 2, which can reasonably be expected to be available.

Licence

This software is released under the LGPL v2.1 Licence, see LICENCE.md for the details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fasttextlt-0.2.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file fasttextlt-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: fasttextlt-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fasttextlt-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ca4ff2f0986e85670770e758f064392f7b1e07977b6219207ab0791e60b8dcb
MD5 db35c2c86cf83d78ac9be41a6afaf6d0
BLAKE2b-256 82cded87d2cdd3ec7ecfa51d7ca49f8952faa3152e8821c3bab74f062ad84613

See more details on using hashes here.

Provenance

The following attestation bundles were made for fasttextlt-0.2.0-py3-none-any.whl:

Publisher: ci.yml on LoicGrobol/fasttextlt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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