Install Server With Thot And Iatros

The computer aided translation (CAT) server communicates with the machine translation engine to provide services to the CASMACAT Workbench. This version of the server allows to setup advanced CAT features, such as interactive translation prediction (ITP), by means of a configurable plugin system. Plugins can be developed either in Python or C/C++.

In this guide we will use Thot as an engine for ITP, MT, confidence measures and word alignments, among other features.

Install Server

The configurable CAT/ITP server can be downloaded from the following Git repository:

 cd /opt/casmacat
 git clone git://github.com/valabau/itp-server.git itp-server

To compile it you need to install the autotools (autoconf, autoconf-archive, and automake packages in Ubuntu), libboost (libbost-test-dev), python (python-dev), libperl-dev, swig. Then,

 ./autogen.sh
 ./configure
 make

Install Thot

The Thot translation engine can be downloaded from the following Git repository:

 git clone git://github.com/daormar/thot.git thot

Assuming that the autotools have already been installed, the following commands are to be executed in the directory where Thot has been downloaded:

 ./reconf
 ./configure --with-casmacat=/opt/casmacat/itp-server
 make
 make install # Has to be executed as root to store programs and libraries in standard paths

Download demo models

You can download the precomputed models for a demo. Edit the configuration files (eutt2-es-en.cfg and eutt2-es-en-thot.cfg) and replace <THOT> with the directory where Thot is installed, <PLUGINS> with the directory where Thot plugins are installed and <MODELS> with the directory where the models were unpacked.

Run

Currently, the CAT server is set up to only serve one language pair (and system), since it is called with a socket.io request. To start the CAT server just run

 /opt/casmacat/itp-server/server/casmacat-server.py -c eutt2-es-en.cfg [port]

Examples of config files can be found in the server directory.

Test

If you want to test the CAT server with the CasMaCat workbench, edit inc/config.ini in the web-server installation to point to your own CAT server:

 itpserver = "hostname:port_number/casmacat"

Start your CAT server (./casmacat-server.py -c configfile.cfg), reload the web page of the workbench and check if everything still works.