1
0
forked from GitHub/gf-core

completions of PhrasebookGer

This commit is contained in:
aarne
2010-04-12 21:26:36 +00:00
parent c46b81d872
commit 6dda3d2ebf
4 changed files with 53 additions and 13 deletions

View File

@@ -1,9 +1,13 @@
compile = runghc Compile
all: demo missing
all: fin demo missing
demo:
demo: compdemo linkdemo
compdemo:
$(compile) Eng Fre Ger Ita Ron Swe DisambPhrasebookEng
linkdemo:
$(compile) -link Eng Fin Fre Ger Ita Ron Swe DisambPhrasebookEng
#separate, because slow...

View File

@@ -244,7 +244,8 @@ Notice that also negations and questions can be formed from these.
AWantGo : Person -> Place -> Action ; -- I want to go to the hospital
</pre>
miscellaneous phrases
Miscellaneous phrases. Notice that also negations and questions can be formed from
propositions.
<pre>
QWhatAge : Person -> Question ; -- how many years are you
QWhatName : Person -> Question ; -- what is your name

View File

@@ -1,7 +1,7 @@
-- (c) 2009 Aarne Ranta under LGPL
concrete WordsGer of Words = SentencesGer **
open SyntaxGer, ParadigmsGer, IrregGer, (L = LexiconGer), Prelude in {
open SyntaxGer, ParadigmsGer, IrregGer, (L = LexiconGer), ExtraGer, Prelude in {
lin
@@ -23,6 +23,7 @@ concrete WordsGer of Words = SentencesGer **
-- properties
Bad = L.bad_A ;
Cheap = mkA "billig" ;
Boring = mkA "langweilig" ;
Cold = L.cold_A ;
Delicious = mkA "lecker" ;
@@ -46,11 +47,11 @@ concrete WordsGer of Words = SentencesGer **
-- currencies
DanishCrown = mkCN (mkA "Dänisch") (mkN "Krone") ;
DanishCrown = mkCN (mkA "Dänisch") (mkN "Krone") | mkCN (mkN "Krone") ;
-- Dollar = mkCN (mkN "dollar" "dollar") ;
Euro = mkCN (mkN "Euro" "Euro" "Euro" "Euro" "Euro" "Euro" neuter) ;
-- Lei = mkCN (mkN "lei" "lei") ;
-- SwedishCrown = mkCN (mkA "svensk") (mkN "krona") ;
SwedishCrown = mkCN (mkA "Schwedisch") (mkN "Krone") | mkCN (mkN "Krone") ;
-- nationalities
@@ -58,21 +59,31 @@ concrete WordsGer of Words = SentencesGer **
Belgium = mkNP (mkPN "Belgien") ;
English = mkNat "Englisch" "England" ;
Finnish = mkNat "Finnisch" "Finnland" ;
-- Flemish = mkNP (mkPN "flamländska") ;
Flemish = mkNP (mkPN "Flämisch") ;
French = mkNat "Französisch" "Frankreich" ;
Italian = mkNat "Italienisch" "Italien" ;
-- Romanian = mkNat "rumänsk" "Rumänien" ;
-- Swedish = mkNat "svensk" "Sverige" ;
--
-- -- actions
Romanian = mkNat "Rumänisch" "Rumänien" ;
Swedish = mkNat "Schwedisch" "Schweden" ;
-- actions
AHasAge p num = mkCl p.name (mkNP num L.year_N) ;
AHasName p name = mkCl p.name (mkV2 heißen_V) name ;
AHungry p = mkCl p.name (mkA "hungrig") ;
AHasChildren p num = mkCl p.name have_V2 (mkNP num L.child_N) ;
AHasRoom p num = mkCl p.name have_V2
(mkNP (mkNP a_Det (mkN "Zimmer" "Zimmer" neuter))
(SyntaxGer.mkAdv for_Prep (mkNP num (mkN "Persone")))) ;
AHasTable p num = mkCl p.name have_V2
(mkNP (mkNP a_Det (mkN "Tisch"))
(SyntaxGer.mkAdv for_Prep (mkNP num (mkN "Persone")))) ;
AIll p = mkCl p.name (mkA "Krank") ;
AKnow p = mkCl p.name wissen_V ;
ALike p item = mkCl item (mkV2 (fixprefixV "ge" (fallen_V)) dative) p.name ;
ALive p co = mkCl p.name (mkVP (mkVP (mkV "wohnen")) (SyntaxGer.mkAdv in_Prep co)) ;
ALove p q = mkCl p.name (mkV2 (mkV "lieben")) q.name ;
AMarried p = mkCl p.name (mkA "verheiratet") ;
AReady p = mkCl p.name (mkA "fertig") ;
AScared p = mkCl p.name have_V2 (mkNP (mkN "Angst" "Angsten" feminine)) ;
ASpeak p lang = mkCl p.name (mkV2 sprechen_V) lang ;
AThirsty p = mkCl p.name (mkA "dürstig") ;
@@ -84,6 +95,7 @@ concrete WordsGer of Words = SentencesGer **
-- miscellaneous
QWhatName p = mkQS (mkQCl how_IAdv (mkCl p.name heißen_V)) ;
QWhatAge p = mkQS (mkQCl (ICompAP (mkAP L.old_A)) p.name) ;
PropOpen p = mkCl p.name open_Adv ;
PropClosed p = mkCl p.name closed_Adv ;
@@ -95,6 +107,24 @@ concrete WordsGer of Words = SentencesGer **
HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item (mkV "kosten"))) ;
ItCost item price = mkCl item (mkV2 (mkV "kosten")) price ;
-- Building phrases from strings is complicated: the solution is to use
-- mkText : Text -> Text -> Text ;
-- PSeeYou d = mkText (lin Text (ss ("auf Wiedersehen"))) (mkPhrase (mkUtt d)) ;
-- PSeeYouPlace p d =
-- mkText (lin Text (ss ("auf Wiedersehen")))
-- (mkText (mkPhrase (mkUtt p.at)) (mkPhrase (mkUtt d))) ;
-- Relations are expressed as "my wife" or "my son's wife", as defined by $xOf$
-- below. Languages without productive genitives must use an equivalent of
-- "the wife of my son" for non-pronouns.
Wife = xOf sing (mkN "Frau" "Frauen" feminine) ;
Husband = xOf sing L.man_N ;
Son = xOf sing (mkN "Sohn" "Söhne" masculine) ;
Daughter = xOf sing (mkN "Tochter" "Töchter" feminine) ;
Children = xOf plur L.child_N ;
-- week days
Monday = mkDay "Montag" ;
@@ -105,6 +135,9 @@ concrete WordsGer of Words = SentencesGer **
Saturday = mkDay "Samstag" ;
Sunday = mkDay "Sonntag" ;
Tomorrow = ParadigmsGer.mkAdv "morgen" ;
oper
mkNat : Str -> Str -> {lang : NP ; prop : A ; country : NP} = \nat,co ->
{lang = mkNP (mkPN nat) ;
@@ -126,4 +159,6 @@ concrete WordsGer of Words = SentencesGer **
open_Adv = mkAdv "geöffnet" ; ---- Adv to get right word order easily
closed_Adv = mkAdv "geschlossen" ;
xOf : GNumber -> N -> NPPerson -> NPPerson = \n,x,p -> mkRelative n (mkCN x) p ;
}

View File

@@ -1,8 +1,8 @@
DisambPhrasebookEng :
PhrasebookEng :
PhrasebookFin :
PhrasebookFre : AHasRoom AHasTable AReady Cheap Cinema Hotel PSeeYou PSeeYouPlace Park School Shop Suspect Theatre Tomorrow University
PhrasebookGer : AHasAge AHasChildren AHasRoom AHasTable AMarried AReady Bar Cheap Chicken Children Cinema Coffee Daughter Dollar Flemish GNiceToMeetYou Hotel Husband Lei Meat Museum PSeeYou PSeeYouPlace Park QWhatAge Romanian School Shop Son Suspect Swedish SwedishCrown Tea Theatre Toilet Tomorrow Wife
PhrasebookFre :
PhrasebookGer : Bar Chicken Cinema Coffee Dollar GNiceToMeetYou Hotel Lei Meat Museum PSeeYou PSeeYouPlace Park School Shop Suspect Tea Theatre Toilet
PhrasebookIta :
PhrasebookRon : AHungry AThirsty Flemish GExcusePol GPleaseGivePol GSorryPol
PhrasebookSwe :