mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-14 23:39:32 -06:00
203 lines
6.5 KiB
Plaintext
203 lines
6.5 KiB
Plaintext
MOLTO Multilingual Phrasebook
|
|
Aarne Ranta
|
|
|
|
|
|
%!postproc(html): #HR <HR>
|
|
%!postproc(html): #BSMALL <font size=-1>
|
|
%!postproc(html): #ESMALL </font>
|
|
|
|
|
|
|
|
|
|
#HR
|
|
#BSMALL
|
|
|
|
History
|
|
- 10 April. Some additions in API, comments in implementation; regenerated clones.
|
|
- 8 April. Added German.
|
|
- 7 April. Added the Clone script, applied to initiate the rest of MOLTO languages.
|
|
- 6 April. Version 0.4: weekdays, nationalities
|
|
- 30 March. Version 0.3: disambiguation grammar for English
|
|
- 28 March. Version 0.2: Swe, Ita; cat Action; small phrases.
|
|
- 26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI.
|
|
|
|
|
|
[Missing constructs missing.txt]
|
|
|
|
[Back to phrasebook http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html]
|
|
|
|
#ESMALL
|
|
#HR
|
|
|
|
|
|
=Purpose=
|
|
|
|
This phrasebook is a program for translating touristic phrases
|
|
between the 15 European languages included in the
|
|
[MOLTO http://www.molto-project.eu] project
|
|
(Multilingual On-Line Translation):
|
|
- Bulgarian, Catalan, Danish, Dutch, English,
|
|
Finnish, French, German, Italian, Norwegian,
|
|
Polish, Romanian, Russian, Spanish, Swedish
|
|
|
|
|
|
It is implemented by using the GF programming language
|
|
([Grammatical Framework http://grammaticalframework.org]).
|
|
It is the first demo for the MOLTO project, released in the third month (by June 2010)
|
|
but to be updated in the course of the project.
|
|
|
|
The phrasebook has the following requirements:
|
|
- high quality: reliable translations to express yourself in any language
|
|
- translation between all pairs of languages
|
|
- runnable in web browsers
|
|
- runnable on mobile phones (also off-line: forthcoming for Android phones)
|
|
- 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
|
|
[``code.haskell.org/gf/examples/phrasebook/`` http://code.haskell.org/gf/examples/phrasebook/]
|
|
|
|
|
|
Current status (8 April 2010):
|
|
- small coverage in abstract syntax
|
|
- reasonable implementations for English, Finnish, French, German, Italian, Romanian, Swedish
|
|
- almost just cloned for the rest of MOLTO languages
|
|
- temporary user interdace
|
|
- works on web browsers calling a server
|
|
- web service not yet released, but preliminarily available in
|
|
[``http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html`` http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html]
|
|
|
|
|
|
|
|
=Points illustrated=
|
|
|
|
Interlingua-based translation.
|
|
|
|
Incremental parsing.
|
|
|
|
The use of resource grammars and functors.
|
|
|
|
Compile-time transfer: especially, in Action in Words.
|
|
|
|
Quasi-incremental translation: many basic types are also used as phrases.
|
|
|
|
Disambiguation, esp. of politeness distinctions.
|
|
|
|
|
|
|
|
=Ontology=
|
|
|
|
The abstract syntax defines the **ontology** behind the phrasebook.
|
|
Some explanations can be found in the
|
|
[ontology document Ontology.html], which is produced from the
|
|
abstract syntax files
|
|
[``Sentences.gf`` http://code.haskell.org/gf/examples/phrasebook/Sentences.gf]
|
|
and
|
|
[``Words.gf`` http://code.haskell.org/gf/examples/phrasebook/Words.gf]
|
|
by ``make doc``.
|
|
|
|
|
|
|
|
|
|
|
|
=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.
|
|
|
|
Here is the module structure as produced in GF by
|
|
```
|
|
> i -retain DisambPhrasebookEng.gf
|
|
> dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DisambPhrasebookEng
|
|
> ! dot -Tpng _gfdepgraph.dot >pgraph.png
|
|
```
|
|
|
|
[pgraph.png]
|
|
|
|
|
|
|
|
=To Do=
|
|
|
|
Improved translation interface
|
|
- a //to// list of languages: either //all//, or just one
|
|
- combined text field/fridge magnet input; filter magnets by started word prefix
|
|
- a nicer way to show disambiguation (maybe hidden by default)
|
|
|
|
|
|
Complete the missing words and phrases
|
|
|
|
Disambiguation grammars for other languages than English
|
|
|
|
Extend the abstract lexicon in ``Words`` by hand or (semi)automatically for
|
|
- food stuff
|
|
- languages
|
|
- places
|
|
|
|
|
|
Link to Google translate, for fall-back and for comparison
|
|
|
|
Feedback facility in the UI
|
|
|
|
Customizable distribution: make your own selection of the 2^15 language subsets
|
|
when downloading the phrasebook to a phone
|
|
|
|
|
|
=How to contribute=
|
|
|
|
The basic things "everyone" can do is
|
|
- complete [missing words missing.txt] in concrete syntaxes
|
|
- add new abstract words in ``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 http://code.haskell.org/gf/lib/doc/synopsis.html#toc78]
|
|
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 Implementation.html], which is produced from the
|
|
concrete syntax files
|
|
[``SentencesI.gf`` http://code.haskell.org/gf/examples/phrasebook/SentencesI.gf]
|
|
and
|
|
[``WordsEng.gf`` http://code.haskell.org/gf/examples/phrasebook/WordsEng.gf]
|
|
by ``make doc``.
|
|
|
|
Here are the steps to follow for contributors:
|
|
+ Make sure you have the latest sources
|
|
from [GF Darcs http://www.grammaticalframework.org/doc/gf-developers.html],
|
|
using ``darcs pull``.
|
|
+ Also make sure that you have compiled the library by ``make present`` in ``gf/lib/src/``.
|
|
+ Work in the directory
|
|
[``gf/examples/phrasebook/`` http://code.haskell.org/gf/examples/phrasebook/].
|
|
+ After you've finished your contribution, recompile the phrasebook by ``make pgf``.
|
|
+ Save your changes in ``darcs record .`` (in the ``phrasebook`` subdirectory).
|
|
+ Make a patch file with ``darcs send -o my_phrasebook_patch``, which you can
|
|
send to GF maintainers.
|
|
+ (Recommended:) Test the phrasebook on your local server:
|
|
+ Go to ``gf/src/server/`` and follow the instructions in the
|
|
[project Wiki http://code.google.com/p/grammatical-framework/wiki/LaunchWebDemos].
|
|
+ Make sure that ``Phrasebook.pgf`` is available to you GF server (see project wiki).
|
|
+ Launch ``lighttpd`` (see project wiki).
|
|
+ How you can open ``gf/examples/phrasebook/www/phrasebook.html`` and use your phrasebook!
|
|
|
|
|
|
- Don't delete anything! But you are free to correct incorrect forms.
|
|
- Don't change the module structure!
|
|
- Don't compromise quality to gain coverage: //non multa sed multum!//
|
|
|