A pure Python implementation of HFST for using HFST optimized lookup transducers (with or without weights)
Project description
Pyhfst
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.
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]]
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 Distributions
pyhfst-1.0.0-py3.8.egg
(23.9 kB
view hashes)
pyhfst-1.0.0-py2.py3-none-any.whl
(14.5 kB
view hashes)
Close
Hashes for pyhfst-1.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc4c2102df6d86236b2d4a940f1f72a8d0b5cf8e66d36767c2ed9c52dd30b6f9 |
|
MD5 | 0215c250b6fb6356dc5ab09ba90a51d5 |
|
BLAKE2b-256 | 7cd5ef7dae205683f7cd620ffad05a849db8a9b6ef4f4b29f2c672b994c202c8 |