Skip to content

1.4 Compiling libraries (Linux & Mac OS)

Claude Roux edited this page Aug 20, 2019 · 1 revision

Compiling libraries

Tamgu provides different libraries, which can be used in a Tamgu program. Each of these libraries is stored in its own directory and can be compiled once the Tamgu interpreter has been compiled.

  • allmaps: this library provides access to all maps.
  • pytamgu : this library enables tamgu to communicate with python (2 or 3 depending with which version you compile). The library can be both loaded from within Python to handle Tamgu programs or from within Tamgu to execute Python programs.
  • word2vec: this library provides a way to compute and exploit word embeddings.
  • wapiti : this library provides a CRF implementation
  • liblinear: this library provides a linear classifier
  • curl : this library provides ways to handle Web instructions, such as loading a page, download a package etc.
  • sqlite: this library provides an access to SQLite databases.
  • xml: this library based on libxml2 provides methods to handle XML encoded files

Except allmaps, which is a full tamgu library, none of these libraries is mandatory and can be compiled beside tamgu.

curl, sqlite, xml, Python are usually pre-installed on most Linux platforms. If they are missing, you can ask your administrator to install the development version for you. However, if you plan to compile with Python 3 version, note that these versions are not always pre-installed. You will need to provide the exact path the include/library files with -pythoninclude.

word2vec, wapiti, liblinear are external libraries that have been embedded into tamgu libraries. We provide a licence for each of them in their respective directory. These libraries have usually also been modified to communicate with tamgu and might present some slight differences.

Compiling libs

The install.py script detects, which libraries are available on your system and automatically builds a libs target in Makefile.in.

  • In the case of Windows, the libraries are available in the tamgu.sln and tamguraw.sln make files.
  • In the case of Mac OS, the libraries are already all available.
  • In the case of Linux, the libs target will depend on which libraries were found on the machine. Note that the output of install.py displays the list of libraries that are absent on your machine. You may ask your administrator to install them for you.
Clone this wiki locally