removed Roles; updated Phrasebook doc

This commit is contained in:
aarne
2010-03-30 20:10:36 +00:00
parent 66cca22f38
commit b4abd2ebba
3 changed files with 132 additions and 90 deletions

View File

@@ -1,34 +0,0 @@
resource Roles = {
param
Gender = Male | Female ;
Politeness = PPolite | PFamiliar ;
oper
RolePhrase : Type = {s : Politeness => Gender => Gender => Str} ;
politeDistinct : (_,_ : Str) -> RolePhrase = \pol,fam -> {
s = table {
PPolite => \\_,_ => pol ;
PFamiliar => \\_,_ => fam
}
} ;
speakerDistinct : (_,_ : Str) -> RolePhrase = \mal,fem -> {
s = \\p,s,h => case s of {
Male => mal ;
Female => fem
}
} ;
hearerDistinct : (_,_ : Str) -> RolePhrase = \mal,fem -> {
s = \\p,s,h => case h of {
Male => mal ;
Female => fem
}
} ;
roleNeutral : Str -> RolePhrase = \s -> {
s = \\_,_,_ => s
} ;
}

View File

@@ -19,16 +19,14 @@ History
<UL> <UL>
<LI>26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI. <LI>26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI.
<LI>28 March. Version 0.2: Swe, Ita; cat Action; small phrases. <LI>28 March. Version 0.2: Swe, Ita; cat Action; small phrases.
<LI>30 March. Version 0.3: disambiguation grammar for English
</UL> </UL>
<P> <P>
Want to contribute? You can add <A HREF="missing.txt">missing words</A> by using the <A HREF="missing.txt">Missing constructs</A>
<A HREF="http://www.grammaticalframework.org/lib/doc/synopsis.html#toc78">morphological paradigms</A>. </P>
The words are added to the <CODE>Words</CODE><I>L</I><CODE>.gf</CODE> files for each language <I>L</I>. Then recompile the <P>
phrasebook by <CODE>make</CODE>. All this of course in the <A HREF="http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html">Back to phrasebook</A>
<A HREF="http://code.haskell.org/gf/examples/phrasebook/">source directory</A>,
which you can obtain by
<A HREF="http://www.grammaticalframework.org/doc/gf-developers.html">GF Darcs</A>.
</P> </P>
<P> <P>
</font> </font>
@@ -37,7 +35,8 @@ which you can obtain by
<H1>Purpose</H1> <H1>Purpose</H1>
<P> <P>
This phrasebook is a programme for translating touristic phrases This phrasebook is a programme for translating touristic phrases
between 15 European languages: between the 15 European languages included in the <A HREF="http://www.molto-project.eu">MOLTO</A> project
(Multilingual On-Line Translation):
</P> </P>
<UL> <UL>
<LI>Bulgarian, Catalan, Danish, Dutch, English, <LI>Bulgarian, Catalan, Danish, Dutch, English,
@@ -48,8 +47,8 @@ between 15 European languages:
<P> <P>
It is implemented by using the GF programming language It is implemented by using the GF programming language
(<A HREF="http://grammaticalframework.org">Grammatical Framework</A>). (<A HREF="http://grammaticalframework.org">Grammatical Framework</A>).
It is the first demo for the MOLTO project It is the first demo for the MOLTO project, released in the third month but to be
(<A HREF="http://www.molto-project.eu">Multilingual On-Line Translation</A>). updated in the course of the project.
</P> </P>
<P> <P>
The phrasebook has the following requirements: The phrasebook has the following requirements:
@@ -74,8 +73,8 @@ Current status (28 March 2010):
<LI>available in English, Finnish, French, Italian, Romanian, Swedish <LI>available in English, Finnish, French, Italian, Romanian, Swedish
<LI>very small coverage <LI>very small coverage
<LI>works on web browsers calling a server <LI>works on web browsers calling a server
<LI>web service not yet released, but preliminarily available <LI>web service not yet released, but preliminarily available in
<A HREF="http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html">here</A> <A HREF="http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html"><CODE>http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html</CODE></A>
</UL> </UL>
<H1>Points illustrated</H1> <H1>Points illustrated</H1>
@@ -93,36 +92,37 @@ Disambiguation, esp. by the parameters in Roles.
</P> </P>
<H1>Files</H1> <H1>Files</H1>
<P> <P>
<CODE>Sentences</CODE>: general syntactic structures implementable by <CODE>Sentences</CODE>: general syntactic structures implementable in a uniform way.
functor. Concrete syntax via <CODE>SencencesI</CODE>. Concrete syntax via the functor <CODE>SencencesI</CODE>.
</P> </P>
<P> <P>
<CODE>Words</CODE>: words and predicates, typically language-dependent. Separate <CODE>Words</CODE>: words and predicates, typically language-dependent.
concrete syntaxes. Separate concrete syntaxes.
</P> </P>
<P> <P>
<CODE>Greetings</CODE>: idiomatic phrases, string-based. Separate concrete <CODE>Greetings</CODE>: idiomatic phrases, string-based.
syntaxes. Separate concrete syntaxes.
</P> </P>
<P> <P>
<CODE>Phrasebook</CODE>: the top module putting everything together. Separate <CODE>Phrasebook</CODE>: the top module putting everything together.
concrete syntaxes. Separate concrete syntaxes.
</P> </P>
<P> <P>
Resource <CODE>Roles</CODE>: parameter types Politeness, Gender <CODE>DiffPhrasebook</CODE>: the (so far small) interface for <CODE>Sentences</CODE>.
</P> </P>
<P> <P>
Interface <CODE>DiffPhrasebook</CODE>: the (so far small) interface for Sentences. <CODE>DisambPhrasebook</CODE>: disambiguation grammars generating feedback phrases if
the input language is ambiguous.
</P> </P>
<H1>To Do</H1> <H1>To Do</H1>
<P> <P>
Text-based translation interface. Text-based translation interface.
</P> </P>
<P> <P>
Access to disambiguation grammars in the interface. The remaining 10 languages
</P> </P>
<P> <P>
The remaining 10 languages Disambiguation grammars for other languages than English.
</P> </P>
<P> <P>
Extract/construct lexica for Extract/construct lexica for
@@ -137,8 +137,52 @@ Extract/construct lexica for
Connection to Google translate, for fall-back and for comparison Connection to Google translate, for fall-back and for comparison
</P> </P>
<P> <P>
Feedback facility in the UI. Feedback facility in the UI
</P> </P>
<H1>How to contribute</H1>
<P>
The basic things "everyone" can do is
</P>
<UL>
<LI>complete <A HREF="missing.txt">missing words</A> in concrete syntaxes
<LI>add new abstract words in <CODE>Words</CODE> and greetings in <CODE>Greetings</CODE>
</UL>
<P>
The missing concrete syntax entries are added to the <CODE>Words</CODE><I>L</I><CODE>.gf</CODE>
files for each language <I>L</I>. The
<A HREF="http://www.grammaticalframework.org/lib/doc/synopsis.html#toc78">morphological paradigms</A>
of the GF resource library should be used. Actions (prefixed with <CODE>A</CODE>, as <CODE>AWant</CODE>) are
a little more demanding, since they also require syntax constructors. Greetings (prefixed
with <CODE>G</CODE>) are pure strings.
</P>
<P>
Here are the steps to follow for contributors:
</P>
<OL>
<LI>Make sure you have the latest sources
from <A HREF="http://www.grammaticalframework.org/doc/gf-developers.html">GF Darcs</A>, using <CODE>darcs pull</CODE>.
<LI>Also make sure that you have compiled the library by <CODE>make present</CODE> in <CODE>gf/lib/src/</CODE>.
<LI>Work in the directory <A HREF="http://code.haskell.org/gf/examples/phrasebook/"><CODE>gf/examples/phrasebook/</CODE></A>.
<LI>After you've finished your contribution, recompile the phrasebook by <CODE>make</CODE>.
<LI>Save your changes in <CODE>darcs record .</CODE> (in the <CODE>phrasebook</CODE> subdirectory).
<LI>Make a patch file with <CODE>darcs send -o my_phrasebook_patch</CODE>, which you can send to GF maintainers.
<LI>(Recommended:) Test the phrasebook on your local server:
<OL>
<LI>Go to <CODE>gf/src/server/</CODE> and follow the instructions in the
<A HREF="http://code.google.com/p/grammatical-framework/wiki/LaunchWebDemos">project Wiki</A>.
<LI>Make sure that <CODE>Phrasebook.pgf</CODE> is available to you GF server (see project wiki).
<LI>Launch <CODE>lighttpd</CODE> (see project wiki).
<LI>How you can open <CODE>gf/examples/phrasebook/www/phrasebook.html</CODE> and use your phrasebook!
</OL>
</OL>
<OL>
<LI>Don't delete anything! But you are free to correct incorrect forms.
<LI>Don't change the module structure! But you are free to add a new language.
<LI>Don't compromise quality to gain coverage: <I>non multa sed multum!</I>
</OL>
<!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) --> <!-- html code generated by txt2tags 2.4 (http://txt2tags.sf.net) -->
<!-- cmdline: txt2tags -thtml phrasebook.txt --> <!-- cmdline: txt2tags -thtml phrasebook.txt -->

View File

@@ -15,15 +15,12 @@ Aarne Ranta
History History
- 26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI. - 26 March 2010. Version 0.1: Eng, Fin, Fre, Ron; dedicated minibar UI.
- 28 March. Version 0.2: Swe, Ita; cat Action; small phrases. - 28 March. Version 0.2: Swe, Ita; cat Action; small phrases.
- 30 March. Version 0.3: disambiguation grammar for English
Want to contribute? You can add [missing words missing.txt] by using the [Missing constructs missing.txt]
[morphological paradigms http://www.grammaticalframework.org/lib/doc/synopsis.html#toc78].
The words are added to the ``Words``//L//``.gf`` files for each language //L//. Then recompile the [Back to phrasebook http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html]
phrasebook by ``make``. All this of course in the
[source directory http://code.haskell.org/gf/examples/phrasebook/],
which you can obtain by
[GF Darcs http://www.grammaticalframework.org/doc/gf-developers.html].
#ESMALL #ESMALL
#HR #HR
@@ -32,7 +29,8 @@ which you can obtain by
=Purpose= =Purpose=
This phrasebook is a programme for translating touristic phrases This phrasebook is a programme for translating touristic phrases
between 15 European languages: between the 15 European languages included in the [MOLTO http://www.molto-project.eu] project
(Multilingual On-Line Translation):
- Bulgarian, Catalan, Danish, Dutch, English, - Bulgarian, Catalan, Danish, Dutch, English,
Finnish, French, German, Italian, Norwegian, Finnish, French, German, Italian, Norwegian,
Polish, Romanian, Russian, Spanish, Swedish Polish, Romanian, Russian, Spanish, Swedish
@@ -40,8 +38,8 @@ between 15 European languages:
It is implemented by using the GF programming language It is implemented by using the GF programming language
([Grammatical Framework http://grammaticalframework.org]). ([Grammatical Framework http://grammaticalframework.org]).
It is the first demo for the MOLTO project It is the first demo for the MOLTO project, released in the third month but to be
([Multilingual On-Line Translation http://www.molto-project.eu]). updated in the course of the project.
The phrasebook has the following requirements: The phrasebook has the following requirements:
- high quality: reliable translations - high quality: reliable translations
@@ -60,8 +58,8 @@ Current status (28 March 2010):
- available in English, Finnish, French, Italian, Romanian, Swedish - available in English, Finnish, French, Italian, Romanian, Swedish
- very small coverage - very small coverage
- works on web browsers calling a server - works on web browsers calling a server
- web service not yet released, but preliminarily available - web service not yet released, but preliminarily available in
[here http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html] [``http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html`` http://tournesol.cs.chalmers.se/~aarne/phrasebook/phrasebook.html]
@@ -78,27 +76,22 @@ Disambiguation, esp. by the parameters in Roles.
=Files= =Files=
``Sentences``: general syntactic structures implementable by ``Sentences``: general syntactic structures implementable in a uniform way.
functor. Concrete syntax via ``SencencesI``. Concrete syntax via the functor ``SencencesI``.
``Words``: words and predicates, typically language-dependent.
Separate concrete syntaxes.
``Words``: words and predicates, typically language-dependent. Separate ``Greetings``: idiomatic phrases, string-based.
concrete syntaxes. Separate concrete syntaxes.
``Phrasebook``: the top module putting everything together.
Separate concrete syntaxes.
``Greetings``: idiomatic phrases, string-based. Separate concrete ``DiffPhrasebook``: the (so far small) interface for ``Sentences``.
syntaxes.
``Phrasebook``: the top module putting everything together. Separate
concrete syntaxes.
Resource ``Roles``: parameter types Politeness, Gender
Interface ``DiffPhrasebook``: the (so far small) interface for Sentences.
``DisambPhrasebook``: disambiguation grammars generating feedback phrases if
the input language is ambiguous.
@@ -106,10 +99,10 @@ Interface ``DiffPhrasebook``: the (so far small) interface for Sentences.
Text-based translation interface. Text-based translation interface.
Access to disambiguation grammars in the interface.
The remaining 10 languages The remaining 10 languages
Disambiguation grammars for other languages than English.
Extract/construct lexica for Extract/construct lexica for
- food stuff - food stuff
- languages - languages
@@ -118,7 +111,46 @@ Extract/construct lexica for
Connection to Google translate, for fall-back and for comparison Connection to Google translate, for fall-back and for comparison
Feedback facility in the UI. Feedback facility in the UI
=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://www.grammaticalframework.org/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.
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``.
+ 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! But you are free to add a new language.
+ Don't compromise quality to gain coverage: //non multa sed multum!//