Python interface for HFST
Project description
Package hfst_dev contains a development version of Python bindings for HFST (Helsinki Finite-State Technology) C++ library. HFST toolkit is intended for processing natural language morphologies. The toolkit is demonstrated by wide-coverage implementations of a number of languages of varying morphological complexity.
Requirements
We offer binary wheels for Linux and Mac OS X. Wheels for Windows are experimental.
Wheels for Linux are compiled with a 64-bit docker image (quay.io/pypa/manylinux1_x86_64) for python versions 3.5, 3.6 and 3.7.
Wheels for Mac are compiled as universal binaries for python versions 3.5, 3.6 and 3.7. OS X must be 10.7 or higher.
Wheels for Windows are experimental. They are 32-bit and also require a 32-bit python to work correctly. Wheels are available for python versions 3.5 and 3.6; earlier versions would need an older compiler that does not support C++11 features. Wheels for version 3.7. may be added to future releases.
Compiling hfst_dev from source requires at least C++ compiler (tested with gcc 5.4.0), readline and getline libraries and setuptools package for python (tested with version 28.8.0). Swig is no longer needed as pre-generated files are included in source distribution.
Installation via PyPI
We recommend using pip tool for installation. Before installation, see that dependencies given under heading ‘Requirements’ are met.
For python version 3, the pip tool is usually named pip3, plain pip being used for python version 2. Basic installation is done with:
pip3 install [--upgrade] hfst_dev
Starting from python 3.4.0, pip is included by default and can be called via python with option -m pip:
python3 -m pip install [--upgrade] hfst_dev
The commands above are run in a shell/terminal/command prompt, but they can also be run on python command line or via a graphical user interface (e.g. IDLE) with pip.main that takes arguments in a list:
The option --upgrade makes sure that the newest version of hfst will be installed replacing any earlier versions installed. The option --verbose will show what happens during the installation process. This can be useful when compiling from source.
Documentation
See wiki-based package documentation on our Github pages. In python, you can also use dir and help commands, e.g.:
dir(hfst_dev)
help(hfst_dev.HfstTransducer)
License
HFST is licensed under Gnu GPL version 3.0.
Troubleshooting
Pip starts to compile from source although there is a wheel available:
Try upgrading pip with
pip3 install --upgrade pip
or
python3 -m pip install --upgrade pip.
Another reason for this can be that the source package on PyPI is newer (i.e. has a higher version number) than the corresponding wheel for the given environment.
Error message “command … failed with error code …”:
Try rerunning pip in verbose mode with
pip3 install --verbose [--upgrade] hfst_dev
or
python3 -m pip install --verbose [--upgrade] hfst_dev
to get more information.
Error message “error: could not delete … : permission denied”:
You do not have sufficient rights to install packages. On Mac and Linux, try installing as super user with
sudo pip3 install [--upgrade] hfst_dev
or
sudo python3 -m pip install [--upgrade] hfst_dev.
On Windows, reopen Command Prompt/Python command line/IDLE by right-clicking and choose “Run as administrator”, then run pip again.
Links
HFST project main page: more information about the project
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 Distributions
Built Distributions
File details
Details for the file hfst_dev-3.15.0.10b0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 53.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a8901d146ddea8830e0f47dac438b8abbeaff1e3b44ec5094610b8891e3c06 |
|
MD5 | 0d0ed0edcdc3119cbe9921ffd4bbc2f4 |
|
BLAKE2b-256 | 63a8a4959272f7420152292d2454a25a6588d320b74160409510650f3f5d4a3e |
File details
Details for the file hfst_dev-3.15.0.10b0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 31.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.8.0 urllib3/1.26.12 tqdm/4.19.5 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e92537c098501883fceb4bdfdc2178392525e13dbbbc0c1af8e3b0b7014ab5c2 |
|
MD5 | a43ecfa969bf9ebe583ebc2ddbc1ff2f |
|
BLAKE2b-256 | 1fcbb45c0d4fc5bb48e53abfc2898e11625d828ff0f3ebe947ab5921ccd5acdc |
File details
Details for the file hfst_dev-3.15.0.10b0-cp38-cp38-manylinux1_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp38-cp38-manylinux1_x86_64.whl
- Upload date:
- Size: 31.8 MB
- Tags: CPython 3.8
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 765ceff554edc1a192140f0f510d9c6a344e64ca0ca69df7fb5324136ca25a56 |
|
MD5 | 9fcbf4480c7a77ea73f3e076ce761540 |
|
BLAKE2b-256 | 9aa45c39ddfb2eeae0274a2ec8b8af8da6cd63d4cb7009694557b4de5bfec2ce |
File details
Details for the file hfst_dev-3.15.0.10b0-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79780916ed75fa371168ee876ad1bffee67155c64a4321c79e6f3d0009a79b3f |
|
MD5 | 9ed449334f17482324130cfbedc9492a |
|
BLAKE2b-256 | d007c03d573fcbad910ee52407f316d015a3780a0ac0dbd9fa413f54be401d19 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp37-cp37m-manylinux1_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp37-cp37m-manylinux1_x86_64.whl
- Upload date:
- Size: 31.7 MB
- Tags: CPython 3.7m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0307b02a5c9fec2a47c0256fedc2aa72e3330086da733a4d3965b84d22c7c198 |
|
MD5 | 467076868b002eae32e3e58215913418 |
|
BLAKE2b-256 | 8e7e73159ac09d53fdc896372a461a6b7bcd6d3923faa39b88e80b99ea94bd59 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80740124136fc923d56fc08fcf2328df88d45997e6dc49f2144b74819f4e9666 |
|
MD5 | 4e28e672c5cd3a2d7504bcd39256d5c7 |
|
BLAKE2b-256 | 485d6db3cc1158f29f9a22ed1871ec35998bdc75410c7b20f1e88c838e0c8909 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 31.7 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd23ed8fb01a9505dfec1d97d2ab2aa8c83e1cad202ffde62c4c9f7153e54405 |
|
MD5 | f662eb9aab3ecc2229cca64072f880f7 |
|
BLAKE2b-256 | 63d10639ef6ea0908b933c6cbc0472636514c3ec4ef6fd315f7b76624d263f89 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 7.2 MB
- Tags: CPython 3.6m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524dee745a99eb94d61b4f12d9e1c915fb75f1e9e4f94e0dccb35f40f6d8e408 |
|
MD5 | d3e3cb449a2c1dbd5b3eb12f573c9ef6 |
|
BLAKE2b-256 | e6343bb7edb26493fea966031b2e17899ba16d2fd4a971c14819b051dbe73234 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 31.7 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a585ca4e838a9595a747e1b042bb8f922f44c7e050e65262a45833449f8d74a |
|
MD5 | d3d3623c70dfed0daacfccd08e89ccc3 |
|
BLAKE2b-256 | 4e7b0ca2fb73fb509a06bc135f57c9d76e43de719fca1ac410fc41a70e665cd9 |
File details
Details for the file hfst_dev-3.15.0.10b0-cp35-cp35m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: hfst_dev-3.15.0.10b0-cp35-cp35m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 7.2 MB
- Tags: CPython 3.5m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32e62fb5b647f4d5d48bd4fb99fe55926e4a3b1d60c994f948ce80547ad474c0 |
|
MD5 | 6f38b91bff804c817f5242c8d331fd0c |
|
BLAKE2b-256 | 4e0ba700a0e075471b530fb259ddc5faa616ae3eef5eeabd834de688576dda3d |