From d005f28d14c9153f7af76d4cc689612e057295ee Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 2 Jun 2010 08:27:48 +0000 Subject: [PATCH] finishing phrasebook documentation ; changed doc name --- examples/phrasebook/Makefile | 3 +- .../{phrasebook.html => doc-phrasebook.html} | 248 ++++++++++-------- .../{phrasebook.txt => doc-phrasebook.txt} | 179 +++++++------ examples/phrasebook/help-phrasebook.html | 46 ++++ examples/phrasebook/help-phrasebook.txt | 26 ++ 5 files changed, 303 insertions(+), 199 deletions(-) rename examples/phrasebook/{phrasebook.html => doc-phrasebook.html} (93%) rename examples/phrasebook/{phrasebook.txt => doc-phrasebook.txt} (95%) create mode 100644 examples/phrasebook/help-phrasebook.html create mode 100644 examples/phrasebook/help-phrasebook.txt diff --git a/examples/phrasebook/Makefile b/examples/phrasebook/Makefile index 4e36e2988..e1c536e44 100644 --- a/examples/phrasebook/Makefile +++ b/examples/phrasebook/Makefile @@ -29,7 +29,8 @@ doc: rm -f Ontology.gf cat SentencesI.gf WordsEng.gf >Implementation.gf gfdoc Implementation.gf - txt2tags -thtml --toc phrasebook.txt + txt2tags -thtml --toc doc-phrasebook.txt + txt2tags -thtml help-phrasebook.txt rm -f Ontology.gf Implementation.gf upload:: Phrasebook.pgf diff --git a/examples/phrasebook/phrasebook.html b/examples/phrasebook/doc-phrasebook.html similarity index 93% rename from examples/phrasebook/phrasebook.html rename to examples/phrasebook/doc-phrasebook.html index 2d36e5fc0..cee644a66 100644 --- a/examples/phrasebook/phrasebook.html +++ b/examples/phrasebook/doc-phrasebook.html @@ -17,14 +17,18 @@ Showcase for project FP7-ICT-247914, Deliverable D10.2.

@@ -65,7 +69,7 @@ History Missing constructs

-Back to phrasebook +Back to the phrasebook

@@ -86,7 +90,10 @@ between 14 European languages included in the

-It is implemented by using the GF programming language +A Russian version is not yet finished but is projected 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. @@ -95,10 +102,10 @@ The first version is a very small system, but it will extended in the course of The phrasebook has the following requirement specification:

@@ -109,6 +116,8 @@ The source code resides in

Points illustrated

+ +

From the user perspective

Interlingua-based translation

@@ -124,28 +133,10 @@ Incremental parsing

-The use of resource grammars and functors +Mixed modalities

- -

-Example-based grammar writing and grammar induction from statistical models -(Google translate) -

- - -

-Compile-time transfer: especially, in Action in Words -

-

@@ -174,7 +165,34 @@ Fall-back to statistical translation Feed-back from users

+ + +

From the programmer's perspective

+

+The use of resource grammars and functors +

+ + +

+Example-based grammar writing and grammar induction from statistical models +(Google translate) +

+ + +

+Compile-time transfer: especially, in Action in Words +

+

@@ -191,7 +209,7 @@ Grammar testing

  • use of treebanks with guided random generation for initial evaluation and regression testing - +

    Ontology

    The abstract syntax defines the ontology behind the phrasebook. @@ -203,7 +221,7 @@ and Words.gf by make doc.

    - +

    Files

    Sentences: general syntactic structures implementable in a uniform way. @@ -233,91 +251,16 @@ Here is the module structure as produced in GF by

         > i -retain DisambPhrasebookEng.gf
    -    > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,DisambPhrasebookEng
    +    > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,Numeral,NumeralEng,DisambPhrasebookEng
         > ! dot -Tpng _gfdepgraph.dot >pgraph.png
     

    - +

    - -

    To Do

    -

    -Disambiguation grammars for other languages than English -

    -

    -Extend the abstract lexicon in Words by hand or (semi)automatically for -

    - - -

    -Customizable phone 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 -

    - - -

    -The missing concrete syntax entries are added to the WordsL.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: -

    -
      -
    1. Make sure you have the latest sources - from GF Darcs, - using darcs pull. -
    2. Also make sure that you have compiled the library by make present in gf/lib/src/. -
    3. Work in the directory - gf/examples/phrasebook/. -
    4. After you've finished your contribution, recompile the phrasebook by make pgf. -
    5. Save your changes in darcs record . (in the phrasebook subdirectory). -
    6. Make a patch file with darcs send -o my_phrasebook_patch, which you can - send to GF maintainers. -
    7. (Recommended:) Test the phrasebook on your local server: -
        -
      1. Go to gf/src/server/ and follow the instructions in the - project Wiki. -
      2. Make sure that Phrasebook.pgf is available to you GF server (see project wiki). -
      3. Launch lighttpd (see project wiki). -
      4. How you can open gf/examples/phrasebook/www/phrasebook.html and use your phrasebook! -
      -
    - - -

    Effort and cost

    - +
    @@ -359,7 +302,7 @@ Here are the steps to follow for contributors: - + @@ -598,6 +541,81 @@ round and 2 rounds were needed in average for the languages for which we perform the experiment. It is possible that more effort is needed for more complex languages.

    +

    To Do

    +

    +Disambiguation grammars for other languages than English +

    +

    +Extend the abstract lexicon in Words by hand or (semi)automatically for +

    + + +

    +Customizable phone 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 +

    + + +

    +The missing concrete syntax entries are added to the WordsL.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: +

    +
      +
    1. Make sure you have the latest sources + from GF Darcs, + using darcs pull. +
    2. Also make sure that you have compiled the library by make present in gf/lib/src/. +
    3. Work in the directory + gf/examples/phrasebook/. +
    4. After you've finished your contribution, recompile the phrasebook by make pgf. +
    5. Save your changes in darcs record . (in the phrasebook subdirectory). +
    6. Make a patch file with darcs send -o my_phrasebook_patch, which you can + send to GF maintainers. +
    7. (Recommended:) Test the phrasebook on your local server: +
        +
      1. Go to gf/src/server/ and follow the instructions in the + project Wiki. +
      2. Make sure that Phrasebook.pgf is available to you GF server (see project wiki). +
      3. Launch lighttpd (see project wiki). +
      4. How you can open gf/examples/phrasebook/www/phrasebook.html and use your phrasebook! +
      +
    + + + +

    Conclusions (tentative)

    The grammarian need not be a native speaker of the language. @@ -630,7 +648,7 @@ Resource grammars should give some more support

  • large-scale morphological lexica - +

    Acknowledgements

    The Phrasebook has been built in the MOLTO project funded by the European Commission. @@ -646,6 +664,6 @@ Willard Rafnsson, Nick Smallbone.

    - - + + diff --git a/examples/phrasebook/phrasebook.txt b/examples/phrasebook/doc-phrasebook.txt similarity index 95% rename from examples/phrasebook/phrasebook.txt rename to examples/phrasebook/doc-phrasebook.txt index d7bfa162d..b6b4588bd 100644 --- a/examples/phrasebook/phrasebook.txt +++ b/examples/phrasebook/doc-phrasebook.txt @@ -41,7 +41,7 @@ History [Missing constructs missing.txt] -[Back to phrasebook http://www.grammaticalframework.org/demos/phrasebook/] +[Back to the phrasebook http://www.grammaticalframework.org/demos/phrasebook/] #ESMALL #HR @@ -58,16 +58,18 @@ between 14 European languages included in the Polish, Romanian, Spanish, Swedish -It is implemented by using the GF programming language +A Russian version is not yet finished but is projected later. Also other languages may be added. + +The phrasebook 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). The first version is a very small system, but it will extended in the course of the project. The phrasebook has the following requirement specification: -- high quality: reliable translations to express yourself in any language +- 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 (forthcoming: Android phones) +- runnable on mobile phones (via web browser; Android stand-alone forthcoming) - easily extensible by new words (forthcoming: semi-automatic extensions by users) @@ -79,6 +81,9 @@ The source code resides in =Points illustrated= + +==From the user perspective== + Interlingua-based translation - we translate meanings, rather than words @@ -87,20 +92,8 @@ Incremental parsing - the user is at every point guided by the list of possible next words -The use of resource grammars and functors -- the translator was implemented on top of an earlier linguistic knowledge base, - the [GF Resource Grammar Library http://grammaticalframework.com/lib] - - -Example-based grammar writing and grammar induction from statistical models -([Google translate http://translate.google.com]) -- many of the grammars were created semi-automatically by generalization from - examples - - -Compile-time transfer: especially, in Action in Words -- the structural differences between languages are treated at compile time, - for maximal run-time efficiency +Mixed modalities +- selection of words ("fridge magnets") combined with text input Quasi-incremental translation: many basic types are also used as phrases @@ -117,7 +110,26 @@ Fall-back to statistical translation Feed-back from users -- you are welcome to send comments, bug reports, and better translation suggestions! +- users are welcomed to send comments, bug reports, and better translation suggestions + + + +==From the programmer's perspective== + +The use of resource grammars and functors +- the translator was implemented on top of an earlier linguistic knowledge base, + the [GF Resource Grammar Library http://grammaticalframework.com/lib] + + +Example-based grammar writing and grammar induction from statistical models +([Google translate http://translate.google.com]) +- many of the grammars were created semi-automatically by generalization from + examples + + +Compile-time transfer: especially, in Action in Words +- the structural differences between languages are treated at compile time, + for maximal run-time efficiency The level of skills involved in grammar development @@ -167,72 +179,11 @@ 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 + > dg -only=Phrasebook*,Sentences*,Words*,Greetings*,Numeral,NumeralEng,DisambPhrasebookEng > ! dot -Tpng _gfdepgraph.dot >pgraph.png ``` -[pgraph.png] - - - -=To Do= - -Disambiguation grammars for other languages than English - -Extend the abstract lexicon in ``Words`` by hand or (semi)automatically for -- food stuff -- places -- actions - - -Customizable phone 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!// +[npgraph.png] @@ -241,7 +192,7 @@ Here are the steps to follow for contributors: || Language | Grammarian's language skills | Grammarian's GF skills | Informant used for development | Informant used for testing | Use of external tools | Impact of external tools | Changes on the resource grammar | Development time || | Bulgarian | ### | ### | - | - | - | ? | # | ## | | Catalan | ### | ### | - | - | - | ? | # | # | -| Danish | - | ### | + | + | + | ## | ## | ## | +| Danish | - | ### | + | + | + | ## | # | ## | | Dutch | - | ### | + | + | + | ## | # | ## | | English | ## | ### | - | + | - | - | _ | # | | Finnish | ### | ### | - | - | - | ? | # | ## | @@ -344,6 +295,68 @@ round and 2 rounds were needed in average for the languages for which we perform the experiment. It is possible that more effort is needed for more complex languages. +=To Do= + +Disambiguation grammars for other languages than English + +Extend the abstract lexicon in ``Words`` by hand or (semi)automatically for +- food stuff +- places +- actions + + +Customizable phone 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!// + + + + =Conclusions (tentative)= The grammarian need not be a native speaker of the language. diff --git a/examples/phrasebook/help-phrasebook.html b/examples/phrasebook/help-phrasebook.html new file mode 100644 index 000000000..31cf83e15 --- /dev/null +++ b/examples/phrasebook/help-phrasebook.html @@ -0,0 +1,46 @@ + + + + +MOLTO Phrasebook Help + +

    MOLTO Phrasebook Help

    + +
    + +

    +To start: klick at a word or start typing. +

    +

    +From: source language +

    +

    +To: target language (either a single one or "All" simultaneously) +

    +

    +Del: delete last word +

    +

    +Clear: start over +

    +

    +Random: generate a random phrase +

    +

    +Google translate: the current input and language choice; opens in a new window or tab. +

    +

    +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? +

    +

    +Back to the phrasebook +

    + + + + diff --git a/examples/phrasebook/help-phrasebook.txt b/examples/phrasebook/help-phrasebook.txt new file mode 100644 index 000000000..a7f5d6f95 --- /dev/null +++ b/examples/phrasebook/help-phrasebook.txt @@ -0,0 +1,26 @@ +MOLTO Phrasebook Help + + + +To start: klick at a word or start typing. + +**From**: source language + +**To**: target language (either a single one or "All" simultaneously) + +**Del**: delete last word + +**Clear**: start over + +**Random**: generate a random phrase + +Google translate: the current input and language choice; opens in a new window or tab. + +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? + +[Back to the phrasebook http://www.grammaticalframework.org/demos/phrasebook/] +
  • Language Grammarian's language skills+ + ##### ##