Contract No.: | FP7-ICT-247914 |
---|---|
Project full title: | MOLTO - Multilingual Online Translation |
Deliverable: | D10.2 MOLTO web service, first version |
Security (distribution level): | Public |
Contractual date of delivery: | M3 |
Actual date of delivery: | 2 June 2010 |
Type: | Prototype |
Status & version: | Final |
Author(s): | Krasimir Angelov, Olga Caprotti, Ramona Enache, Thomas Hallgren, Inari Listenmaa, Aarne Ranta, Jordi Saludes, Adam Slaski |
Task responsible: | UGOT |
Other contributors: | UPC, UHEL |
This phrasebook is a program for translating touristic phrases between 14 European languages included in the MOLTO project (Multilingual On-Line Translation): Bulgarian, Catalan, Danish, Dutch, English, Finnish, French, German, Italian, Norwegian, Polish, Romanian, Spanish, Swedish. A Russian version is not yet finished but will be added later. Also other languages may be added.
The phrasebook is implemented by using the GF programming language (Grammatical Framework). It is the first demo for the MOLTO project, released in the third month (by June 2010). The first version is a very small system, but it will extended in the course of the project.
The phrasebook is available as open-source software, licensed under GNU LGPL, at http://code.haskell.org/gf/examples/phrasebook/.
</br/></p/>
The MOLTO phrasebook is a program for translating touristic phrases between 14 European languages included in the MOLTO project (Multilingual On-Line Translation):
The phrasebook is implemented in the GF programming language (Grammatical Framework). It is the first demo for the MOLTO project, released in the third month (by June 2010). The first version is a very small system, but it will be extended in the course of the project.
The phrasebook has the following requirement specification: - high quality: reliable translations to express yourself in any of the languages - translation between all pairs of languages - runnable in web browsers - runnable on mobile phones (via web browser; Android stand-alone forthcoming) - easily extensible by new words (forthcoming: semi-automatic extensions by users)
The phrasebook is available as open-source software, licensed under GNU LGPL. The source code resides in ftp://code.haskell.org/gf/examples/phrasebook/
We consider both the end-user perspective and the content producer perspective.
The phrasebook is available as open-source software, licensed under GNU LGPL. The source code resides in http://code.haskell.org/gf/examples/phrasebook/. Below a short description of the source files.
Sentences
: general syntactic structures implementable in a uniform way. Concrete syntax via the functor SencencesI
.Words
: words and predicates, typically language-dependent. Separate concrete syntaxes.Greetings
: idiomatic phrases, string-based. Separate concrete syntaxes.Phrasebook
: the top module putting everything together. Separate concrete syntaxes.DisambPhrasebook
: disambiguation grammars generating feedback phrases if the input language is ambiguous.Numeral
: resource grammar module directly inherited from the library.The module structure image is produced in GF by
> i -retain DisambPhrasebookEng.gf > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,Numeral,NumeralEng,DisambPhrasebookEng > ! dot -Tpng _gfdepgraph.dot > pgraph.png
The abstract syntax defines the ontology behind the phrasebook. Some explanations can be found in the
ontology document, which is produced from the abstract syntax files
Sentences.gf
and
Words.gf
by make doc
.
Based on this case study, we roughly estimated the effort used in constructing the necessary sources for each new language and compiled the following summarizing chart.
Language | Language skills | GF skills | Informed development | Informed testing | Impact of external tools | RGL Changes | Overall effort |
---|---|---|---|---|---|---|---|
Bulgarian | ### | ### | - | - | ? | # | ## |
Catalan | ### | ### | - | - | ? | # | # |
Danish | - | ### | + | + | ## | # | ## |
Dutch | - | ### | + | + | ## | # | ## |
English | ## | ### | - | + | - | - | # |
Finnish | ### | ### | - | - | ? | # | ## |
French | ## | ### | - | + | ? | # | # |
German | # | ### | + | + | ## | ## | ### |
Italian | ### | # | - | - | ? | ## | ## |
Norwegian | # | ### | + | - | ## | # | ## |
Polish | ### | ### | + | + | # | # | ## |
Romanian | ### | ### | - | - | # | ### | ### |
Spanish | ## | # | - | - | ? | - | ## |
Swedish | ## | ### | - | + | ? | - | ## |
Legend
Language skills
GF skills
Informed Development/Informed testing
Impact of external tools
RGL changes (resource grammars library)
Overall effort (including extra work on resource grammars)
The figure presents the process of creating a Phrasebook using an example-based approach for a language X, in our case either Danish, Dutch, German, Norwegian, for which we had to employ informed development and testing by a native speaker, different from the grammarian.
Remarks : The arrows represent the main steps of the process, whereas the circles represent the initial and final results after each step of the process. Red arrows represent manual work and green arrows represent automated actions. Dotted arrows represent optional steps. For every step, the estimated time is given. This is variable and greatly influenced by the features of the target language and the semantic complexity of the phrases and would only hold for the Phrasebook grammar.
Initial resources :
The first step assumes an analysis of the resource grammar and extracts the information needed by the functions that build new lexical entries. A model is built so that the proper forms of the word can be rendered, and additional information, such as gender, can be inferred. The script applies these rules to each entry that we want to translate into the target language, and one obtains a set of constructions.
The generated constructions are given to an external translator tool (Google translate) or to a native speaker for translation. One needs the configuration file even if the translator is human, because formal knowledge of grammar is not assumed.
The translations into the target language are further more processed in order to build the linearizations of the categories first, decoding the information received. Furthermore, having the words in the lexicon, one can parse the translations of functions with the GF parser and generalize from that.
The resulting grammar is tested with the aid of the testing script that generates constructions covering all the functions and categories from the grammar, along with some other constructions that proved to be problematic in some language. A native speaker evaluates the results and if corrections are needed, the algorithm runs again with the new examples. Depending on the language skills of the grammar writer, the changes can be made directly into the GF files, and the correct examples given by the native informant are just kept for validating the results. The algorithm is repeated as long as corrections are needed.
The time needed for preparing the configuration files for a grammar will not be needed in the future, since the files are reusable for other applications. The time for the second step can be saved if automatic tools, like Google translate are used. This is only possible in languages with a simpler morphology and syntax, and with large corpora available. Good results were obtained for German and Dutch with Google translate, but for languages like Romanian or Polish, which are both complex and lack enough resources, the results are discouraging.
If the statistical oracle works well, the only step where the presence of a human translator is needed is the evaluation and feedback step. An average of 4 hours per round and 2 rounds were needed in average for the languages for which we performed the experiment. It is possible that more effort is needed for more complex languages.
Further work will be done in building a more comprehensive tool for testing and evaluating the grammars, and also the impact of external tools for machine translation from English to various target languages will be analysed, so that the process could be automated to a higher degree for the future work on grammars.
Words
by hand or (semi)automatically for items related to the categories of food, places, and actions will result in immediate increase of the expressiveness of the phrasebook.The basic things "everyone" can do are:
Words
and greetings in Greetings
The missing concrete syntax entries are added to the Words
L.gf
files for each language L. The morphological paradigms of the GF resource library should be used. Actions (prefixed with A
, as AWant
) are a little more demanding, since they also require syntax constructors. Greetings (prefixed
with G
) are pure strings.
Some explanations can be found in the implementation document, which is produced from the concrete syntax files SentencesI.gf
and
WordsEng.gf
by make doc
.
Here are the steps to follow for contributors:
darcs pull
.make present
in gf/lib/src/
.gf/examples/phrasebook/
.make pgf
.darcs record .
(in the phrasebook
subdirectory).darcs send -o my_phrasebook_patch
, which you can send to GF maintainers.gf/src/server/
and follow the instructions in the
project Wiki.
b. Make sure that Phrasebook.pgf
is available to you GF server (see project wiki).
c. Launch lighttpd
(see project wiki).
d. How you can open gf/examples/phrasebook/www/phrasebook.html
and use your phrasebook!Finally, a few good practice recommendations:
The grammarian need not be a native speaker of the language. For many languages, the grammarian need not even know the language, native informants are enough. However, evaluation by native speakers is necessary.
Correct and idiomatic translations are possible.
A typical development time was 2-3 person working days per language.
Google translate helps in bootstrapping grammars, but must be checked. In particular, we found it unreliable for morphologically rich languages.
Resource grammars should give some more support e.g. higher-level access to constructions like negative expressions and large-scale morphological lexica.
Acknowledgments
The user interface is kept slim so as to also be usable from portable devices, e.g. mobile phones. These are the buttons and their functionality:
The symbol &+
means binding of two words. It will disappear in the complete translation.
The translator is slightly overgenerating, which means you can build some semantically strange phrases. Before reporting them as bugs, ask yourself: could this be correct in some situation? is the translation valid in that situation?