floret Python bindings
Project description
floret: fastText + Bloom embeddings for compact, full-coverage vectors with spaCy
floret is an extended version of fastText that can produce word representations for any word from a compact vector table. It combines:
- fastText's subwords to provide embeddings for any word
- Bloom embeddings ("hashing trick") for a compact vector table
Installation
pip install floret
Usage
Train floret vectors using the options:
mode
:"floret"
, storing both words and subwords in the same compact hash tablehashCount
: store each entry in 1-4 rows in the hash table (recommended:2
)bucket
: in combination withhashCount>1
, the size of the hash table can be greatly reduced (recommended:25000
--100000
, reduced from the fastText default of2000000
)minn
: min length of char ngram (default:3
)maxn
: max length of char ngram (default:6
)
import floret
# train vectors
model = floret.train_unsupervised(
"data.txt",
model="cbow",
mode="floret",
hashCount=2,
bucket=50000,
minn=3,
maxn=6,
)
# query vector
model.get_word_vector("broccoli")
# save full model
model.save_model("vectors.bin")
# export standard word-only vector table
model.save_vectors("vectors.vec")
# export floret vector table
model.save_floret_vectors("vectors.floret")
Note: with the default setting mode="fasttext"
, floret
trains original
fastText vectors.
Use floret vectors in spaCy
Import floret vectors into spaCy v3.2+:
spacy init vectors LANG vectors.floret spacy_vectors_model --mode floret
Notes
floret
contains all features of the original fasttext
module. See the fasttext
docs for more information.
The fasttext
and floret
binary formats saved with
model.save_model("model.bin")
are not compatible.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
floret-0.10.5.tar.gz
(70.9 kB
view hashes)
Built Distributions
floret-0.10.5-cp39-cp39-win_amd64.whl
(236.7 kB
view hashes)
floret-0.10.5-cp38-cp38-win_amd64.whl
(242.0 kB
view hashes)
Close
Hashes for floret-0.10.5-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e074b9e731504191e366f5f21f2f419a2dc3194d6d17ef26ced7edceefac3f79 |
|
MD5 | bd59b3e2eea82bc7aaac3f27ffc45238 |
|
BLAKE2b-256 | e625297f47eab2fb42cb9bea8c1eadeece3bcdd3af185448dd90eed6baa8e106 |
Close
Hashes for floret-0.10.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfea32120951b8781c318e5ee9847eb9895ff7a18dd49c5d466ad8951589a0f5 |
|
MD5 | b67b13769a7bcb6e12a7d312c7cc8f0b |
|
BLAKE2b-256 | 2f68f5c6dc90acf6ddf8203fb79d5ff4e6f2bf93f1ec4987ff1094f22ce6f2c1 |
Close
Hashes for floret-0.10.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c3d1d189fd12f75bc2f4229a5fd4f6eb333f598063609ff050c6a1296568e98 |
|
MD5 | 370ea6f0021e96906ad3949c2876dd0e |
|
BLAKE2b-256 | c699a4b611ac73b1232e5afc7e412ad3e1511ea1971f3608ce359b277a5e9a03 |
Close
Hashes for floret-0.10.5-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96de360cf7f93f21e28641f74c309e3207ceab3856b2cf4867f9135788f02115 |
|
MD5 | 6a198d7df8471b61850ae8a58c1d9af7 |
|
BLAKE2b-256 | 790a3fef8be2c708a15208fe9e95ac5a71cf501eba0e95f675ed27d6229493f5 |
Close
Hashes for floret-0.10.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87bb2d7a44c6ac2572ca4aeed6a7780f184c2cebe67a6cf3e3b8d3005da360b4 |
|
MD5 | b42ded6b08a038999f4328e822b28a49 |
|
BLAKE2b-256 | 46d0cb9662031bfaf867ee832d1ec086fa909d79b295f4b06096d93f6fdc13cd |
Close
Hashes for floret-0.10.5-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 020317dac154caff1e03cdb8dd1e5d013cb0749d5913e264834017386f905655 |
|
MD5 | bd26012cedc3f36b4140b71d80074481 |
|
BLAKE2b-256 | f67cda990fa09047a6c3da37d4612f4af822877b4378b0fe579c85d9c8f54e23 |
Close
Hashes for floret-0.10.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 237e2eeee54147bf893aef8b1297631f53127b888c2978b1957d9a96af9b769c |
|
MD5 | 1a009442db2dae2f76d8974b1dea91be |
|
BLAKE2b-256 | 47b4c76e49ad7d0e8ec7dae57a16ac129bcf0e8fff49d8ab9e61244955ccc891 |
Close
Hashes for floret-0.10.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17d12b5e195a1220b9b173647ba215cb680fd82f5f5f9e68a34a9dc16c27d491 |
|
MD5 | 4bad0ba8d5cc3a9f3befb52d8922699d |
|
BLAKE2b-256 | b57fdc276d4de64ccd92195150a3bc5b5ffa481482301e21c690dc6f6061a88b |
Close
Hashes for floret-0.10.5-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6c7cec76c545a181f1b4987988871dba8fd5966b760b66f7e79f4c4565ef94 |
|
MD5 | 06551916012afe594b64ee6ad7a5f58d |
|
BLAKE2b-256 | 152a536c4257c1519bd68221e5cc21a585fc744c1c858e5aa05dc95c872716f9 |
Close
Hashes for floret-0.10.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b7b9a6aaf807a0ed0a0d3615206b67f46b56f52a94dcdc50d7412b40b76418a |
|
MD5 | 577a112ddf377aa26e5eba6a6183e06a |
|
BLAKE2b-256 | f1123147e44627f95c07a398b4651bdf350edef2acc82b090c94413f0ccd0dd1 |
Close
Hashes for floret-0.10.5-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 009a80bd3d92915c02d2c2cc985fc602fa6ccb9e012a9d17b77a0d9baeb14dc2 |
|
MD5 | 2bd5fe1afa58d16cb531d3f141b6bf31 |
|
BLAKE2b-256 | 5022fe0097ee88ae38283f5cd6dd92a5932ddd7faee23799d896ecd0021e80e5 |
Close
Hashes for floret-0.10.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a6dc625a66f3fe4fa2976585cb33f90584f58995197325ac179a01a3faa4fea |
|
MD5 | 51e4e2aa00238be6a11e4a7e8518433f |
|
BLAKE2b-256 | 16ee388a5c76c9292f4bef85d7ef895005bb39a0899f8004e9daceb57b2bb0c9 |
Close
Hashes for floret-0.10.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f70107549c9811a3d36d7ad184ee2eb69800d5fd652ed09e7ec9e9b51b82ab9a |
|
MD5 | 64bb2ecdedfdca2d9e683037b698c862 |
|
BLAKE2b-256 | a8beda6d20c2f5a3748bde29b0af6aedaea3638a18eb04e69cfb499f1b9635d6 |
Close
Hashes for floret-0.10.5-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3d78f7a0da75a7d6481db1a6b6d5c495caa558f52fcaa7800b05b013518732f |
|
MD5 | 0fa999dd535ec8d756372d85aad32926 |
|
BLAKE2b-256 | 6edc91dc97dcf65536547ba34f85a86fc89fd609d77bec1b35f994b93864a9ce |
Close
Hashes for floret-0.10.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c2f950dbfffd6ff32525a4dc902cff94c9530d68bc14b6a7d27e363ffaf8df |
|
MD5 | 5608f6b9d889b91d757e5f9d07eb449c |
|
BLAKE2b-256 | eb755069dc538630ec26297af1b09822c27588d251deaef6943d795e14845161 |
Close
Hashes for floret-0.10.5-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f777dddfb4c2de9eec60bda92a1c4d4aea811a4d566ffe28ec4f56dacaaf139 |
|
MD5 | 61dbb13ee0a03b7d626e6d5b0b68931a |
|
BLAKE2b-256 | dff31cb87bdcce63cbe5e3def66505aff523e29c50fbfd739c4cd7313266f0e4 |
Close
Hashes for floret-0.10.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e1920a658a709f1366d0536d0e848b1bfb1370d16126480dc670ddd52626773 |
|
MD5 | 9231431acc89e95622a82fc5c34e24bb |
|
BLAKE2b-256 | 5146bf93327bf39f8e00f9fdf5ada0e13e49c1134a626d450bf960d38ebbe645 |
Close
Hashes for floret-0.10.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d8efe2add424b711ff6021f670498e9e0298dd92131553e52570558ec8b4c7c |
|
MD5 | 6c31cffdbd9361316bcaa2b61d337aec |
|
BLAKE2b-256 | 0b57361a7920007d4ae00e36ec19c199969faac18ab3c1dabbcdfeb7a3b5a488 |
Close
Hashes for floret-0.10.5-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c24db59a80883e15361c3c23c16f9f50bb5df47cec5a5253510e1cff97e49970 |
|
MD5 | 02c1255aef2451dbd9ca957bc991487f |
|
BLAKE2b-256 | ec7b38e6438e846226dc23fcd0a5426d5c65ca02562a8889586aa012579f54f0 |
Close
Hashes for floret-0.10.5-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 620bc8218a8586f56f2ddcc9e21657cdefa03c255d9e85a0f0cd2346ef1acc56 |
|
MD5 | 2e6a42a2b7cf1ab41a6c0d425863566e |
|
BLAKE2b-256 | 0d191e54513a974cc33c9d311bed6d9942330db9da4bc82097b4821a35f214f6 |
Close
Hashes for floret-0.10.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 217dc18c3cbd2491c2c49fc7cfb9b55eb94af19930bbef65f24037e28af59ea8 |
|
MD5 | f17c82e2b4a43154cd264f5b5aa135b3 |
|
BLAKE2b-256 | 1d3c7cba3dc4b552ebe024f4b080254e04df1dabc7165dacfbefd097a7617ba2 |
Close
Hashes for floret-0.10.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 101620e4b94e671b45b7c1e7c3c532cf45b3e37561c8e3b656d451c13e0a6f3a |
|
MD5 | 119dd17209409c6c403fac60b081ced2 |
|
BLAKE2b-256 | 77bee24697c0d9570e54218d7a8b6a5df847d5b21a0209f59b00c1359af09927 |
Close
Hashes for floret-0.10.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8486d383a077f4b41f78293d29a81afeee0f7fc4865b8cf39b218ff2135afa9 |
|
MD5 | 9fe2ffde4e140d0217e73d6fb32be98d |
|
BLAKE2b-256 | 573b1146f0ad480f03dde72398e2002cee099dd0e1c98c003699a93cabc5df27 |
Close
Hashes for floret-0.10.5-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f213a01af2bd9f1f151cd633d35f8561341214c8c4a3828c6dbad170e846c605 |
|
MD5 | 7d51919fbf812cbc28017ccc5dc83450 |
|
BLAKE2b-256 | 7643089931263cdd25eabd0bef47080b23b71219c098953b62adb8f3e21882e1 |
Close
Hashes for floret-0.10.5-cp38-cp38-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63c649375187e3ae5fa7921527f6c44eedba618ab9d2b4047d05a1d501e93dd4 |
|
MD5 | 0b97c112e5be680a8d0a1c56e794acf3 |
|
BLAKE2b-256 | 8cb898dfa14cca8ac78c22f8b2c6f5ed0bd399e19d68ca1b4f4aee99eb1dc6a0 |
Close
Hashes for floret-0.10.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5b58fac25bab7b513e350a122270ed5637da6179a98e36939f934d82385ac6b |
|
MD5 | 76bd2599e4e6dbc10ed6058a6c2c5e89 |
|
BLAKE2b-256 | 668047862ae02b12364db535e6f8d173b08c823f40d1104032b706014a352e36 |
Close
Hashes for floret-0.10.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a29128c874c3c453729e89783f667d62235d609c926c644f3d48503fed93ff61 |
|
MD5 | f1347dde302759b832cf8dd8354e3b49 |
|
BLAKE2b-256 | e8a6de37fcf5edc00b0ce4eb388a801694303b3e920e7bf68a90c0822a012240 |
Close
Hashes for floret-0.10.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b438963856a4903732309a3319f0681806a3bf084651354daa5b3265f4c64380 |
|
MD5 | 7eac549999400324187e5bb25f099617 |
|
BLAKE2b-256 | 644bffb7e475a9ff9a0557bf9ac493b1ab60e4c99d7017d28aa00a17c722faf3 |
Close
Hashes for floret-0.10.5-cp37-cp37m-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 088006325cba178fd725745ea2d935985723f7bc40762bbbd9e518188774de40 |
|
MD5 | 664b264f26678356daa7d4bb273ab6b0 |
|
BLAKE2b-256 | 09d47e232994fc7b868a98a0775cae40309b1faa7b49587d876dfb4e88adafa2 |
Close
Hashes for floret-0.10.5-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea662bab1db425c07a969a0efc41747e05daf50fe24fffeb7661360961ce44f |
|
MD5 | 34916c4240cbba308a6b1d576f219d14 |
|
BLAKE2b-256 | 4e31b8ece93aac950526e45d930ec131e62ba5c9b6f911eba5d5ac2ee28abd6d |
Close
Hashes for floret-0.10.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 994993a16675c33eeec561f32b2233dff8e39267c426a510c01158612fbde4b8 |
|
MD5 | 598b322a39d0734b11eed7d3ce068d1f |
|
BLAKE2b-256 | 66df1b2bc3a8bf8715a4da9fada02129e162a69e866f79c87ce41ab8f558195f |
Close
Hashes for floret-0.10.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9a905fe7e46e48634835681256afa3e296b6b7350c1939c70e73c221f009d99 |
|
MD5 | cc2dc713d9a890e652eadf37ce5d2e85 |
|
BLAKE2b-256 | 16c7081541a12e8fce81c49dab450f6edbbd87e9760f52f96a8fb3162f28dfc0 |
Close
Hashes for floret-0.10.5-cp36-cp36m-macosx_10_16_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2ba155ce1dd704c0424fa2ce0118ffde4418ee3785d7dbeda3a1a0e13f009ac |
|
MD5 | 58f8dde8a094a19a621f0180023aea7a |
|
BLAKE2b-256 | 6bb5a6fa30b2bb1235f31fda9734b67a4da34d31a93b11db2285f9aa43a86725 |