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 Distribution

fasttextlt-0.0.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

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

fasttextlt-0.0.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file fasttextlt-0.0.0.tar.gz.

File metadata

  • Download URL: fasttextlt-0.0.0.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for fasttextlt-0.0.0.tar.gz
Algorithm Hash digest
SHA256 2d043610d2064b11347852a9059be9e7c203dd4d852085b9de711653feaaef37
MD5 25bafe841d28565f72fe0cd59c3c25e7
BLAKE2b-256 7de494756d4b592a936252653295e1531b730285bf723f6c270235388d99ba6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fasttextlt-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for fasttextlt-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 502fd4a2f26d2f11b1f42d20cbb69391dfac22e20b8d0e520c0faf39f535c336
MD5 c109e68172eff26a5c1b529e6784bd5d
BLAKE2b-256 8912a4fd113a252810cd98345e3c0af5f3bc49aab7eca958fbcbaccfb29893b3

See more details on using hashes here.

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