Content translation/Machine Translation/Apertium/Service

Background
With, https://gerrit.wikimedia.org/r/#/c/157787 (this is just POC) in Content Translation server configuration, we are introducing our "first" service - Apertium. This is very critical components for Content Translation (Machine Translation).

Why Apertium as service?
1. WMF LE team works with Apertium developers closely in reporting bugs and getting Apertium improved. This require WMF LE using Apertium's latest code and fixes and keep it up to date and make same as the apertium.org's Apertium instance. This collaboration and communication loop work only if LE team has full control on software running on http://apertium.wmflabs.org

2. Apertium on Ubuntu/Debian are outdated.

3. Updating them on Ubuntu/Debian is extra effort and there is no guarantee that it will be up-to-date on distro as packages (despite of I work closely with Debian Science team and we have proposed up-to-date package to team with help of Apertium upstream).

4. We are using Apertium-Apy (http://wiki.apertium.org/wiki/Apertium-apy) to serve MT requests.

5. #4 will make sure that user is getting decent result while requesting MT from Apertium, which is the only (Free and) Open Source Machine Translation service available at moment. Work on Google/Bing MT services will take some time and bring similar situation (we will handle it via LCA team first) to us without any control over it.

Current scenario
We are pointing mt.apertium configuration to apertium.wmflabs.org which is running on Labs. Details of this instance is below:


 * Size: m1.large, 4 cores, 8GB RAM
 * It has Apertium and language pairs from the apt repo that apertium developers maintain.
 * The server runs APY - a Python Tornado based webserver, that preloads the Machine translation pipelines. The MT is processor intensive and require multi core machines.

Proposals
We require to replicate similar setup for Beta and later in Production to utilize power of Apertium. This is only possible with latest upstream code or packages from Apertium. We are ready to invest time and effort from LE team for this being critical component of project.

The following work need to be done by team in order to setup Apertium as service for Content Translation:


 * 1) Review packages from Apertium upstream.
 * 2) Package Apertium APY.
 * 3) Package dependencies (Python packages, list to be finalized)
 * 4) Puppetize Apertium packages and dependencies.
 * 5) Setup relevant Debian repositories.
 * 6) Hardware provision.

Links

 * 1) Content Translation technical architecture: https://www.mediawiki.org/wiki/Content_translation/Technical_Architecture
 * 2) Apertium: https://www.mediawiki.org/wiki/Content_translation/Apertium