



\section{
\label{overview.tex}
Overview}


\subsection{
Technology}


Moses is an implementation of the {\bf statistical} (or data-driven) approach to machine translation (MT). This is the dominant approach in the field at the moment, and is employed by the online translation systems deployed by the likes of Google and Microsoft. In statistical machine translation (SMT), translation systems are {\bf trained} on large quantities of {\bf parallel} data (from which the systems learn how to translate small segments), as well as even larger quantities of monolingual data (from which the systems learn what the 
target language should look like). Parallel data is a collection of sentences in two different languages, which is {\bf sentence-aligned}, in that each sentence in one language
is matched with its corresponding translated sentence in the other language. It is also known as a {\bf bitext}.



The training process in Moses takes in the parallel data and uses coocurrences of words and segments (known as {\bf phrases}) to infer translation correspondences between 
the two languages of interest. In {\bf phrase-based machine translation}, these correspondences are simply between continuous sequences of words, whereas in 
{\bf hierarchical phrase-based machine translation} or {\bf syntax-based translation}, more structure is added to the correspondences. For instance a hierarchical MT system
could learn that the German {\em hat X gegessen} corresponds to the English {\em ate X}, where the {\em X}s are replaced by any German-English word pair. The extra structure used
in these types of systems may or may not be derived from a linguistic analysis of the parallel data. Moses also implements an 
extension of phrase-based machine translation know as {\bf factored translation} which enables extra linguistic information to be added to a phrase-based systems.



For more information about the Moses translation models, please refer to the tutorials on phrase-based MT (Section \ref{tutorial.tex}), syntactic MT (Section \ref{syntax-tutorial.tex}) or factored MT (Section \ref{factored-tutorial.tex}).



Whichever type of machine translation model you use, the key to creating a good system is lots of good quality data. There are many free sources of parallel data\footnote{\sf http://www2.statmt.org/moses/?n=Moses.LinksToCorpora} which you can use to train sample systems, but (in general) the closer the data you use is to the type of data you want to translate, the better the results will be. This is one of the advantages to using on open-source tool like Moses, if you have your own data then you can tailor the system to your needs and potentially get better performance than a general-purpose translation system. Moses needs sentence-aligned data for its training process, but if data is aligned at the document level, it can often be converted to sentence-aligned data using a tool like hunalign\footnote{\sf http://mokk.bme.hu/resources/hunalign/}



\subsection{
Components}


The two main components in Moses are the {\bf training pipeline} and the {\bf decoder}. There are also a variety of contributed tools and utilities. The training pipeline is really a collection of tools (mainly written in perl, with some in C++) which take the raw data (parallel and monolingual) and turn it into a machine translation model. The 
decoder is a single C++ application which, given a trained machine translation model and a source sentence, will translate the source sentence into the target language.



\subsubsection*{
The Training Pipeline}


There are various stages involved in producing a translation system from training data, which are described in more detail in the training documentation (Section \ref{training-intro.tex}) and in the baseline system guide (Section \ref{baseline.tex}). These are implemented as a pipeline, which can be controlled by the Moses
experiment management system (Section \ref{experiment-perl.tex}), and Moses in general makes it easy to insert different types of external tools into the training pipeline.



The data typically needs to be prepared before it is used in training, tokenising the text and converting tokens to a standard case. Heuristics are used to remove sentence pairs which look to be misaligned, and long sentences are removed. The parallel sentences are then {\bf word-aligned}, typically using  GIZA++\footnote{\sf http://code.google.com/p/giza-pp/}, which implements a set of statistical models developed at IBM in the 80s. These word alignments are used to extract phrase-phrase translations, or hierarchical rules as required, and corpus-wide statistics on these rules are used to estimate probabilities.



An important part of the translation system is the {\bf language model}, a statistical model built using monolingual data in the target language and used by the decoder to try to ensure the fluency of the output. Moses relies on external tools (Section \ref{language-models.tex})  for language model building.



The final step in the creation of the machine translation system is {\bf tuning}\footnote{\sf http://www.statmt.org/moses/?n=FactoredTraining.Tuning}, where the different statistical models are weighted against each other to produce the best possible translations. Moses contains implementations of the most popular tuning algorithms.



\subsubsection*{
The Decoder}


The job of the Moses decoder is to find the highest scoring sentence in the target language (according to the translation model) corresponding to a given source sentence. It is also possible for the decoder to output a ranked list of the translation candidates, and also to supply various types of information about how it came to its decision (for instance the phrase-phrase correspondences that it used).



The decoder is written in a modular fashion and allows the user to vary the decoding process in various ways, such as:

\begin{compactitem}
\item {\bf Input:} This can be a plain sentence, or it can be annotated with xml-like elements to guide the translation process, or it can be a more complex structure like a lattice or confusion network (say, from the output of speech recognition)

\item {\bf Translation model:} This can use phrase-phrase rules, or hierarchical (perhaps syntactic) rules. It can be compiled into a binarised form for faster loading. It can be supplemented with  {\bf features} to add extra information to the translation process, for instance features which indicate the sources of the phrase pairs in order to weight their reliability.

\item {\bf Decoding algorithm:} Decoding is a huge search problem, generally too big for exact search,  and Moses implements several different strategies for this search, such as stack-based, cube-pruning, chart parsing etc.

\item {\bf Language model:} Moses supports several different language model toolkits (SRILM, KenLM, IRSTLM, RandLM) each of which has there own strengths and weaknesses, and adding a new LM toolkit is straightforward.

\end{compactitem}

The Moses decoder also supports multi-threaded decoding (since translation is {\em embarassingly parallelisable}\footnote{\sf http://en.wikipedia.org/wiki/Embarrassingly\_parallel}),
and also has scripts to enable multi-process decoding if you have access to a cluster.



\subsubsection*{
Contributed Tools}


There are many contributed tools in Moses which supply additional functionality over and above the standard training and decoding pipelines. These include:

\begin{compactitem}
\item {\bf Moses server:} which provides an xml-rpc interface to the decoder

\item {\bf Web translation:} A set of scripts to enable Moses to be used to translate web pages

\item {\bf Analysis tools:} Scripts to enable the analysis and visualisation of Moses output, in comparison with a reference.

\end{compactitem}

There are also tools to evaluate translations, alternative phrase scoring methods, an implementation of a technique for weighting phrase tables, a tool to reduce the size of the phrase table, and other contributed tools.



\subsection{
Development}


Moses is an open-source project, licensed under the LGPL\footnote{\sf http://www.gnu.org/copyleft/lesser.html}, which incorporates contributions from many sources. There is no formal management structure in Moses, so if you want to contribute then just mail support\footnote{\sf http://www2.statmt.org/moses/?n=Moses.MailingLists} and take it from there. There is a list (Section \ref{get-involved.tex}) of possible projects on this website, but any new MT techiques are fair game for inclusion into Moses. 



In general, the Moses administrators are fairly open about giving out push access to the git repository, preferring the approach of removing/fixing bad commits, rather than vetting commits as they come in. This means that trunk occasionally breaks, but given the active Moses user community, it doesn't stay broken for long. The nightly builds and tests of trunk are reported on the cruise control\footnote{\sf http://www.statmt.org/moses/cruise/} web page, 
but if you want a more stable version then look for one of the releases (Section \ref{releases.tex}).



\subsection{
Moses in Use}


The liberal licensing policy in Moses, together with its wide coverage of current SMT technology and complete tool chain, make it probably the most widely used open-source SMT system. It is used in teaching, research, and, increasingly, in commercial settings. 



Commercial use of Moses is promoted and tracked by TAUS\footnote{\sf http://www.translationautomation.com/user-cases/machines-takes-center-stage.html}. The most common current use for SMT in commercial settings is {\bf post-editing} where machine translation is used as a first-pass, with the results then being edited by human translators. This can often reduce the time (and hence total cost) of translation. There is also work on using SMT in {\bf computer-aided translation}, which is the research topic of two current EU projects, Casmacat\footnote{\sf http://www.casmacat.eu/} and MateCat\footnote{\sf http://www.matecat.com/}. 



\subsection{
History}

\begin{center}\begin{tabular}{llllllllll} {\bf 2005} & Hieu Hoang (then student of Philipp Koehn) starts Moses as successor to Pharoah & \\ 
{\bf 2006} & Moses is the subject of the JHU workshop, first check-in to public repository & \\ 
{\bf 2006} & Start of Euromatrix, EU project which helps fund Moses development & \\ 
{\bf 2007} & First machine translation marathon held in Edinburgh & \\ 
{\bf 2009} & Moses receives support from EuromatrixPlus, also EU-funded & \\ 
{\bf 2010} & Moses now supports hierarchical and syntax-based models, using chart decoding & \\ 
{\bf 2011} & Moses moves from sourceforge to github, after over 4000 sourceforge check-ins & \\ 
{\bf 2012} & EU-funded MosesCore launched to support continued development of Moses & \\ 
\end{tabular}\end{center}





\begin{center}\textit{\small Subsection last  modified on August 13, 2013, at 10:38 AM}\end{center}
