Home

Awesome

Hunpos is an open source reimplementation of TnT, the well known part-of-speech tagger by Thorsten Brants.

Features

How to install

The suggested building procedure is by use cmake tool.

On Linux or MacOSX:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=install
make
make install

This will build hunpos binaries, hunpos modules and C binding and install them in build/install. With respect to hunpos modules, only hmm_tagger and morphtable interfaces are installed. If you need to access other interfaces from the installed version, please update the install_ocaml_interfaces call in CMakeLists.txt accordingly and re-run the build procedure.

Notes on building

Traditionally hunpos have been compiled using ./build.sh script, that is using ocamlbuild to perform compilation of the trainer.native and tagger.native binaries. This building strategy is working with most OCaml versions for Linux, Windows and Mac OS X.

When the C binding have been introduced build.sh script has not been updated accordingly and a Makefile has been added. Unfortunately building the C binding is not cross platform and it conflicts with building the binaries, so that users have to compile binaries, clean the sources and then compile the binging.

Neither of these building support out-of-tree compilation, that can be very useful while building the software for several platforms (using cross compilation) or with several configurations.

In order to be able to build both binaries and C binding, and solve most of the above mentioned issues, a new CMake building procedure has been introduced. The procedure is in its early stage and still requires some work, however it is currently able to handle:

Compilation on Mac OSX requires OCaml compiler 4.06 or later (which, at the time of writing has not yet been released; the development version of the compiler can also be used).

Compilation on Windows is tricky and has only been tested using MSVC and the OCaml compiler from https://github.com/fdopen/opam-repository-mingw and a Unix-like shell (Cygwin) to configure the OCaml compiler and Opam, as well to run CMake and to compile Hunpos. Theoretically, once CMake has been run, it should be possible to compile Hunpos without a Unix-like shell, but this has not been tested.