Skip to main content

A pure Python FastText model reader

Project description

FastText lite

Latest PyPI version Build status

A pure[^1] Python FastText model reader, 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.

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.

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.

[^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.1.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fasttextlt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13630303353a2d990ce21d417c3e97d5c3aa4ad21068836a4b987eb5ae1b54ab
MD5 29803adafe0dc0aed595d8bf09ff7645
BLAKE2b-256 b6aeb10fe124d9bafbbd1eaa2a04c07503f4b160823e12448b400ffe4fa79bef

See more details on using hashes here.

Provenance

The following attestation bundles were made for fasttextlt-0.1.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