Skip to main content

Pyhfst

DOI

Pyhfst is a pure Python implementation of HFST. The library makes it possible to use HFST optimized lookup FSTs without any C dependencies. Both weighted and unweighted FSTs are supported.

The library will run on all operting systems that support Python 3.

Installation

pip install pyhfst

Pyhfst compiles its faster Cython implementation automatically during installation. If that is not possible (for example, there is no C compiler), it installs and runs the pure Python implementation instead. You can check which one is in use:

import pyhfst
print(pyhfst.CYTHON)  # True: the compiled implementation; False: pure Python

Usage

import pyhfst

input_stream = pyhfst.HfstInputStream("./analyser")
tr = input_stream.read()
print(tr.lookup("voi"))

>> [['voida+V+Act+Ind+Prs+Sg3', 0.0], ['voida+V+Act+Ind+Prs+ConNeg', 0.0], ['voida+V+Act+Ind+Prt+Sg3', 0.0], ['voida+V+Act+Imprt+Prs+ConNeg+Sg2', 0.0], ['voida+V+Act+Imprt+Sg2', 0.0], ['voi+N+Sg+Nom', 0.0], ['voi+Pcle', 0.0], ['voi+Interj', 0.0]]

Citation

Please cite the library as follows:

Alnajjar, K., & Hämäläinen, M. (2023, December). PYHFST: A Pure Python Implementation of HFST. In Lightning Proceedings of NLP4DH and IWCLUL 2023 (pp. 32-35).

@article{pyhfst_2023, 
    title={PyHFST: A Pure Python Implementation of HFST},
    author={Alnajjar, Khalid and H{\"a}m{\"a}l{\"a}inen, Mika},
    booktitle={Lightning Proceedings of NLP4DH and IWCLUL 2023},
    pages={32--35},
    year={2023} 
}

Metadata

Release files for pyhfst 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhfst 1.4.1
File Size Uploaded Provenance Actions
pyhfst-1.4.1.tar.gz 853.1 kB Without provenance Details for pyhfst-1.4.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyhfst 1.4.1
File Actions
pyhfst-1.4.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for pyhfst-1.4.1-cp313-cp313-win_amd64.whl
pyhfst-1.4.1-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for pyhfst-1.4.1-cp313-cp313-musllinux_1_2_x86_64.whl
pyhfst-1.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details for pyhfst-1.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyhfst-1.4.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for pyhfst-1.4.1-cp313-cp313-macosx_11_0_arm64.whl
pyhfst-1.4.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for pyhfst-1.4.1-cp312-cp312-win_amd64.whl
pyhfst-1.4.1-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details for pyhfst-1.4.1-cp312-cp312-musllinux_1_2_x86_64.whl
pyhfst-1.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details for pyhfst-1.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyhfst-1.4.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for pyhfst-1.4.1-cp312-cp312-macosx_11_0_arm64.whl
pyhfst-1.4.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for pyhfst-1.4.1-cp311-cp311-win_amd64.whl
pyhfst-1.4.1-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details for pyhfst-1.4.1-cp311-cp311-musllinux_1_2_x86_64.whl
pyhfst-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for pyhfst-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyhfst-1.4.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for pyhfst-1.4.1-cp311-cp311-macosx_11_0_arm64.whl
pyhfst-1.4.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for pyhfst-1.4.1-cp310-cp310-win_amd64.whl
pyhfst-1.4.1-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details for pyhfst-1.4.1-cp310-cp310-musllinux_1_2_x86_64.whl
pyhfst-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for pyhfst-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyhfst-1.4.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for pyhfst-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
pyhfst-1.4.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for pyhfst-1.4.1-cp39-cp39-win_amd64.whl
pyhfst-1.4.1-cp39-cp39-musllinux_1_2_x86_64.whl CPython 3.9 CPython 3.9 Linux musl 1.2+ x86-64 Details for pyhfst-1.4.1-cp39-cp39-musllinux_1_2_x86_64.whl
pyhfst-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for pyhfst-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
pyhfst-1.4.1-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for pyhfst-1.4.1-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 26.3 MB

Release files / pyhfst-1.4.1.tar.gz

Download URL pyhfst-1.4.1.tar.gz
Size 853.1 kB
Tags Source
SHA-256 checksum
How to use checksums
35158687b4b02c2ea9482882a72affa8a1f8077bdd9897be0e6e91ac30e1bbc0
BLAKE2b-256 checksum
How to use checksums
2c882c404613b42a31527b2bda4297e7fc59d6d733897be780ef226b55a62fda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp313-cp313-win_amd64.whl

Download URL pyhfst-1.4.1-cp313-cp313-win_amd64.whl
Size 305.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
7816a86e0adb96df8d50e261aad43d0924f3354cc593d6eb133a0de4d28f3a00
BLAKE2b-256 checksum
How to use checksums
22b812f37c44ef7c0dece8de468f0b583884af938163c2bd9e5b542c6816faa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL pyhfst-1.4.1-cp313-cp313-musllinux_1_2_x86_64.whl
Size 2.2 MB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
8e56eeca891e8ebef9adda841da259eea7be088ec3d0de34f7b643fdcf94ca5e
BLAKE2b-256 checksum
How to use checksums
d38989698f55d40846e541a2d72eb34e9d8582ffa2d5b78a2652b09767275afd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyhfst-1.4.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
afc8f85b410d64083e6dcda0965f35935abbc930012b77ff114152da1ecba14c
BLAKE2b-256 checksum
How to use checksums
2d68015b6beae0bb83f5911a0edc9d9c8aaf5b0e6e07280f8deb3a4c8615851e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL pyhfst-1.4.1-cp313-cp313-macosx_11_0_arm64.whl
Size 382.0 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b1547cf28f439c2d511b449219628f5815a5b4832557a4c9d97fbddabcdb5243
BLAKE2b-256 checksum
How to use checksums
7e11ddb56d5b6798ae1a2516a90abe0d704a2dc733843bcb9afc19ca8ee7b7bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp312-cp312-win_amd64.whl

Download URL pyhfst-1.4.1-cp312-cp312-win_amd64.whl
Size 311.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
41955cefbdf3e6f038217214b6e82335b44c55e9b1fb7b2d2167e24f9b4fb861
BLAKE2b-256 checksum
How to use checksums
fc07ee8c722d2ca2e1894b63e6724153d8d2a4a053c4a1c20916954dde60b2d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL pyhfst-1.4.1-cp312-cp312-musllinux_1_2_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
274f7986c1e43c714da96be552159a34ad10ae50b7424514753fcce9bcb34f1f
BLAKE2b-256 checksum
How to use checksums
2e345fb63fbc6d278fd6c10c380e8222e1e2c071498dbf5218090b54f4f08533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyhfst-1.4.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
017c5c0e6faaf3659ea07f56c49676c4dd7b0c817339aadaae45e5ae7f648711
BLAKE2b-256 checksum
How to use checksums
84345b602dbafd54e9b43ad33257654a764bec03de2b1ccb03f2b2df58721dc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL pyhfst-1.4.1-cp312-cp312-macosx_11_0_arm64.whl
Size 386.2 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
52e530a8911d9966ea776e033ba4e4df507dde6e7c66dfeff7e68cab608d44fa
BLAKE2b-256 checksum
How to use checksums
aedb24df895b96f689345f9c48501f28aee2425e248f4f25a723539e383a9075
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp311-cp311-win_amd64.whl

Download URL pyhfst-1.4.1-cp311-cp311-win_amd64.whl
Size 311.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
1cebb3ba0656d3367bec6926da30d5ebfd115f6b305982bdcbd465ab8d81f571
BLAKE2b-256 checksum
How to use checksums
bffa85ebc6acc263f6218e3dcf542c6cfa54414a55566bab0e3f7ae467a44183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL pyhfst-1.4.1-cp311-cp311-musllinux_1_2_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
9591b843ce6269af0268b2f83dfde9a5f7fca0f1b14598a06d994eb4522cd095
BLAKE2b-256 checksum
How to use checksums
925b43a7d1b70f9879c422a2990b3264fe9c463cafb006a6e0b143bb507ca79f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyhfst-1.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
dd6d08e1f6c2e3dd03404adc1685a7a5855ad1eea03f135dbd5a77308a1187c0
BLAKE2b-256 checksum
How to use checksums
565b18211e1cc39674035ab10f523d20a007ce0ad8b5fd4d09e3fd8b7d22b263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL pyhfst-1.4.1-cp311-cp311-macosx_11_0_arm64.whl
Size 389.9 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d5ff9ff621f8de32f8b741d361979aeed8ab44163c230779578b8e7df24f0637
BLAKE2b-256 checksum
How to use checksums
a37d36c8cd956fc26e2205347dc334f0ece62d2fd55104ebb41f14677359106b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp310-cp310-win_amd64.whl

Download URL pyhfst-1.4.1-cp310-cp310-win_amd64.whl
Size 313.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
87a6ce267a2586f91bda432c0b32b53124e39c840dcb8699743c85520743842a
BLAKE2b-256 checksum
How to use checksums
2af081e9902f0f184938d2b21ec12246c126a423a2fe0696d17f82cc6dff5af6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL pyhfst-1.4.1-cp310-cp310-musllinux_1_2_x86_64.whl
Size 2.1 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
c782f53488fc85f3ba2cae086639a485d346c4b09a2fac6b62f72f9073f1a147
BLAKE2b-256 checksum
How to use checksums
5391a2cd8ee8e393d15b4b7d711623b33597e16fc5f49f56c5d5be1b32c25921
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyhfst-1.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
bdd84d6e567951036bcf30780aafc53d64c618f007ff9e725e2a422d24828883
BLAKE2b-256 checksum
How to use checksums
c164402f4945bfc88c519c888c5a491444ccdfcc138e2236b56030c68af7ee87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL pyhfst-1.4.1-cp310-cp310-macosx_11_0_arm64.whl
Size 394.6 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5f901aa1f7b009189210c1a7d2ced4b517ffb6a167824187d253fe693573881f
BLAKE2b-256 checksum
How to use checksums
83194dff642872d1c85470e1f14c5625f7024bf5b37b360edbd913ec28809369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp39-cp39-win_amd64.whl

Download URL pyhfst-1.4.1-cp39-cp39-win_amd64.whl
Size 316.2 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
0dd477d87fc5b87ed41b68464d5f5e2a8b5168d077119353b67bb670bcbcfec0
BLAKE2b-256 checksum
How to use checksums
91dfff2a57b9ad2a307879ca8323719f5771a4b07d22becdfe6f75f82782c862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp39-cp39-musllinux_1_2_x86_64.whl

Download URL pyhfst-1.4.1-cp39-cp39-musllinux_1_2_x86_64.whl
Size 2.1 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
5b301cf9a9b61a4cea17689e8e93e88c50d7270c58e768e674dd90ed5ca29d4d
BLAKE2b-256 checksum
How to use checksums
e0a7d84a2a92a336a378a2c36e872aa9d8e3247e921ec3a57251183d359671bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL pyhfst-1.4.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.1 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d72594c2d596d23e520611a1ddfc03dccd2f37adfb23c057708a169665196ea6
BLAKE2b-256 checksum
How to use checksums
bee1d3b7bb6237a11ed9bf4ed3cd76064be9ba1b7838d6c83d2dbf605e5a4f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / pyhfst-1.4.1-cp39-cp39-macosx_11_0_arm64.whl

Download URL pyhfst-1.4.1-cp39-cp39-macosx_11_0_arm64.whl
Size 398.8 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d11eebec52a31d1001d4dc5307077c5715562893215aef5a2ff30b55fa0dbeaf
BLAKE2b-256 checksum
How to use checksums
1faf8586d450a70b97a6e0f9ad73a4d778a1053d90ab67f2f1d8ae27ebe894f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for pyhfst 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page