hfst-optimized-lookup
A pip-installable library version of hfst-optimized-lookup, originally built for itwêwina.
Install
pip install hfst-optimized-lookup
This requires that the machine running pip have a working C++ compiler. If
enough people ask for us to upload binary ‘wheels’ so that you don’t need a
compiler at install time, we could start doing so.
Usage
Import the library:
>>> import hfst_optimized_lookup
Then load an FST!
>>> fst = hfst_optimized_lookup.TransducerFile('../crk-relaxed-analyzer-for-dictionary.hfstol')
Hint: Download
crk-relaxed-analyzer-for-dictionary.hfstolby cloning https://github.com/UAlbertaALTLab/cree-intelligent-dictionary/tree/main/src/crkeng/resources/fst to follow along! The file itself is stored in Git LFS so is tricky to link to directly.
Do an ordinary lookup, to get a list of concatenated analyses for a wordform:
>>> fst.lookup('atim')
['atim+N+A+Sg', 'atimêw+V+TA+Imp+Imm+2Sg+3SgO']
Or get each parsed analysis from the wordform
>>> analysis = fst.lookup_lemma_with_affixes('atim')[0]
>>> analysis.lemma
'atim'
>>> analysis.suffixes
('+N', '+A', '+Sg')
You can also lookup the analyses with symbols separated:
>>> fst.lookup_symbols('atim')
[['a', 't', 'i', 'm', '+N', '+A', '+Sg'], ['a', 't', 'i', 'm', 'ê', 'w', '+V', '+TA', '+Imp', '+Imm', '+2Sg', '+3SgO']]
Releasing
Run ./release.py --help for details of the release process.
A typical release is:
-
Make sure the “Unreleased” section of
CHANGELOG.mdis up-to-date -
Run the script:
./release.py --release-timezone=America/Edmonton --push --release
Metadata
Release files for hfst-optimized-lookup 0.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hfst_optimized_lookup-0.0.14.tar.gz | 91.8 kB | Without provenance | Details for hfst_optimized_lookup-0.0.14.tar.gz |
Release files / hfst_optimized_lookup-0.0.14.tar.gz
| Download URL | hfst_optimized_lookup-0.0.14.tar.gz |
|---|---|
| Size | 91.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
667b150ddcc991aee3eb74f0d908c19af3cd65aae3f67cbb3b8a60e7eb1d10c3
|
|
BLAKE2b-256 checksum How to use checksums |
aa8231723c3ecacda41c921edbca1e6e6aba643d83937069bb58ca10f421a040
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for hfst-optimized-lookup 0.0.14
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.