Content translation/cxserver

cxserver is a Nodejs based server powering the Content Translation. It does the following:
 * 1) Fetch the page html for given title and language from a configured parsoid instance, segment the html content to sections and sentences
 * 2) Provide the MT backend. Expose a generic MT API, the backend of that act as bridge to multiple Machine Translation services hosted outside cxserver such as Apertium. It also transfers the mark from source HTML to translated HTML in case MT services are capable of only plain text translation.
 * 3) Provide Dictionary API for dictionary look up - either through the dictd, json dictionary clients bundled in cxserver or by contacting thirdparty services
 * 4) Tools listing api for a language pair - listing what are the translation tools available for the language pair

CXServer does not handle any user information, does not require any authentication. Does not contact any MediaWiki database directly.

API

 * /page/:language/:title - Fetch the page in the given language and title. Return the html with segemtation. See http://cxserver.wmflabs.org/page/en/Masala for example. The HTML is fetched from Parsoid. It is guaranteed that the HTML returned will be valid and wellformed HTML.
 * /mt/:from/:to/:provider? - Get the machine translation of posted content from source language(from) to target language(to) using a the given MT service provider. If the provider is not given the default configured provider will be used. The HTML returned will be wellformed and valid. The translated content will have the annotations/markup from the source html, mapped to appropriate words. Currently one backend provider is configured - Apertium. The input HTML must be valid and well formed since there is a parsing involved before passing to apertium. Note that content to translate must be posted.
 * /dictionary/:word/:from/:to/:provider? - Get the meaning of the given word between the language pairs using the provider. http://cxserver.wmflabs.org/dictionary/egg/en/de is an example. If the provider is not given the default configured provider will be used.
 * /list/:tool/:from/:to -  Get the list of provider for the given tool between two language pairs. http://cxserver.wmflabs.org/list/dictionary/en/hi is an example
 * /languagepairs - List the language pairs supported by the cxserver. Example: http://cxserver.wmflabs.org/languagepairs
 * /version - just get the version of the cxserver. See http://cxserver.wmflabs.org/version