Package: hfst-dev
Packagehfst_devcontains a development version of Python bindings forHFST(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.RequirementsWe 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 PyPIWe recommend usingpiptool for installation.
Before installation, see that dependencies given under heading ‘Requirements’ are met.For python version 3, thepiptool is usually namedpip3, plainpipbeing used
for python version 2. Basic installation is done with:pip3 install[--upgrade]hfst_devStarting from python 3.4.0, pip is included by default
and can be called via python with option-mpip:python3-mpip install[--upgrade]hfst_devThe 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) withpip.mainthat takes arguments in a list:import pippip.main(['install','--upgrade','hfst_dev'])The option--upgrademakes sure that the newest version of hfst will be installed
replacing any earlier versions installed. The option--verbosewill show what happens during the installation process. This can be useful when compiling from source.DocumentationSee wiki-basedpackage documentationon our Github pages. In python, you can also usedirandhelpcommands, e.g.:dir(hfst_dev)help(hfst_dev.HfstTransducer)LicenseHFST is licensed under Gnu GPL version 3.0.TroubleshootingPip starts to compile from source although there is a wheel available:Try upgrading pip withpip3 install--upgradepiporpython3-mpip install--upgradepip.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 withpip3 install--verbose[--upgrade]hfst_devorpython3-mpip install--verbose[--upgrade]hfst_devto 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 withsudo pip3 install[--upgrade]hfst_devorsudo python3-mpip 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.LinksHFST project main page: more information about
the project