simplified the treatment of politeness in Phrasebook

This commit is contained in:
aarne
2010-03-30 18:48:59 +00:00
parent de909a4e44
commit 5cb147fa19
24 changed files with 157 additions and 183 deletions

View File

@@ -1,10 +1,21 @@
--# -path=.:present --# -path=.:present
concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng - [Polite,Familiar] ** concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
open [YouFam, YouPol, GExcuse, GExcusePol, GSorry, GSorryPol, GPleaseGive, GPleaseGivePol]
(R = Roles) in { ** open SyntaxEng, ParadigmsEng, Prelude in {
lin lin
Polite = {s = "(polite)" ; p = R.PPolite} ; YouFam = mkNP (mkNP youSg_Pron) (ParadigmsEng.mkAdv "(familiar)") ;
Familiar = {s = "(familiar)" ; p = R.PFamiliar} ; YouPol = mkNP (mkNP youPol_Pron) (ParadigmsEng.mkAdv "(polite)") ;
GExcuse = fam "excuse me" ;
GExcusePol = pol "excuse me" ;
GSorry = fam "sorry" ;
GSorryPol = pol "sorry" ;
GPleaseGive = fam "please" ;
GPleaseGivePol = pol "please" ;
oper
fam : Str -> SS = \s -> postfixSS "(familiar)" (ss s) ;
pol : Str -> SS = \s -> postfixSS "(polite)" (ss s) ;
} }

View File

@@ -7,9 +7,9 @@ fun
GHello : Greeting ; GHello : Greeting ;
GThanks : Greeting ; GThanks : Greeting ;
GHowAreYou : Greeting ; GHowAreYou : Greeting ;
GPleaseGive : Greeting ; GPleaseGive, GPleaseGivePol : Greeting ;
GExcuse : Greeting ; GExcuse, GExcusePol : Greeting ;
GSorry : Greeting ; GSorry, GSorryPol : Greeting ;
GGoodbye : Greeting ; GGoodbye : Greeting ;
GBye : Greeting ; GBye : Greeting ;
GWhatsYourName : Greeting ; GWhatsYourName : Greeting ;

View File

@@ -7,9 +7,9 @@ lin
GHello = ss "hello" ; GHello = ss "hello" ;
GThanks = ss "thank you" ; GThanks = ss "thank you" ;
GHowAreYou = ss "how are you" ; GHowAreYou = ss "how are you" ;
GPleaseGive = ss "please" ; GPleaseGive, GPleaseGivePol = ss "please" ;
GExcuse = ss "excuse me" ; GExcuse, GExcusePol = ss "excuse me" ;
GSorry = ss "sorry" ; GSorry, GSorryPol = ss "sorry" ;
GGoodbye = ss "goodbye" ; GGoodbye = ss "goodbye" ;
GBye = ss "bye" ; GBye = ss "bye" ;
GWhatsYourName = ss "what's your name" ; GWhatsYourName = ss "what's your name" ;

View File

@@ -10,8 +10,9 @@ lin
GThanks = ss "kiitos" ; GThanks = ss "kiitos" ;
GHowAreYou = ss "mitä kuuluu" ; GHowAreYou = ss "mitä kuuluu" ;
GPleaseGive = ss "ole hyvä" ; GPleaseGive = ss "ole hyvä" ;
GExcuse = ss "anteeksi" ; GPleaseGivePol = ss "olkaa hyvä" ;
GSorry = ss "anteeksi" ; GExcuse, GExcusePol = ss "anteeksi" ;
GSorry, GSorryPol = ss "anteeksi" ;
GGoodbye = ss "näkemiin" ; GGoodbye = ss "näkemiin" ;
GBye = ss "hei hei" ; GBye = ss "hei hei" ;
GWhatsYourName = ss "mikä sinun nimesi on" ; GWhatsYourName = ss "mikä sinun nimesi on" ;

View File

@@ -3,36 +3,37 @@ concrete GreetingsFre of Greetings = open Roles,Prelude in {
flags coding = utf8 ; flags coding = utf8 ;
lincat lincat
Greeting = RolePhrase ; Greeting = SS ;
lin lin
GHello = roleNeutral "salut" ; GHello = ss "salut" ;
GThanks = roleNeutral "merci" ; GThanks = ss "merci" ;
GHowAreYou = roleNeutral "comment ça va" ; GHowAreYou = ss "comment ça va" ;
GPleaseGive = politeDistinct "s'il vous plaît" "s'il te plaît" ; GPleaseGive = ss "s'il te plaît" ;
GExcuse = politeDistinct "excusez-moi" "excuse-moi" ; GPleaseGivePol = ss "s'il vous plaît" ;
GSorry = roleNeutral "pardon" ; GExcuse = ss "excuse-moi" ;
GGoodbye = roleNeutral "au revoir" ; GExcusePol = ss "excusez-moi" ;
GBye = roleNeutral "au revoir" ; GSorry, GSorryPol = ss "pardon" ;
GWhatsYourName = GGoodbye = ss "au revoir" ;
politeDistinct "comment vous appelez-vous" "comment t'appelles-tu" ; GBye = ss "au revoir" ;
GNiceToMeetYou = speakerDistinct "enchanté" "enchantée" ; GWhatsYourName = ss "comment vous appelez-vous" ; ----
GSeeYouSoon = roleNeutral "à bientôt" ; GNiceToMeetYou = ss "enchanté" ;
GHelp = roleNeutral "au secours" ; GSeeYouSoon = ss "à bientôt" ;
GLookOut = roleNeutral "attention" ; GHelp = ss "au secours" ;
GGoodMorning = roleNeutral "bonjour" ; GLookOut = ss "attention" ;
GGoodDay = roleNeutral "bonjour" ; GGoodMorning = ss "bonjour" ;
GGoodEvening = roleNeutral "bon soir" ; GGoodDay = ss "bonjour" ;
GGoodNight = roleNeutral "bonne nuit" ; GGoodEvening = ss "bon soir" ;
GImHungry = roleNeutral "j'ai faim" ; GGoodNight = ss "bonne nuit" ;
GImThirsty = roleNeutral "j'ai soif" ; GImHungry = ss "j'ai faim" ;
GImTired = speakerDistinct "je suis fatigué" "je suis fatiguée" ; GImThirsty = ss "j'ai soif" ;
GImScared = roleNeutral "j'ai peur" ; GImTired = ss "je suis fatigué" ; ----
GIdontUnderstand = roleNeutral "je ne comprends pas" ; GImScared = ss "j'ai peur" ;
GTheCheck = roleNeutral "l'addition" ; GIdontUnderstand = ss "je ne comprends pas" ;
GTheCheck = ss "l'addition" ;
GYes = roleNeutral "oui" ; ---- si GYes = ss "oui" ; ---- si
GNo = roleNeutral "non" ; GNo = ss "non" ;
} }

View File

@@ -1,36 +1,37 @@
concrete GreetingsIta of Greetings = open Roles,Prelude in { concrete GreetingsIta of Greetings = open Prelude in {
lincat lincat
Greeting = RolePhrase ; Greeting = SS ;
lin lin
GHello = roleNeutral "ciao" ; GHello = ss "ciao" ;
GThanks = roleNeutral "grazie" ; GThanks = ss "grazie" ;
GHowAreYou = roleNeutral "come sta" ; GHowAreYou = ss "come sta" ;
GPleaseGive = roleNeutral "per favore" ; GPleaseGive, GPleaseGivePol = ss "per favore" ;
GExcuse = politeDistinct "scusi" "scusa" ; GExcuse = ss "scusa" ;
GSorry = politeDistinct "scusimi" "scusami" ; ---- GExcusePol = ss "scusi" ;
GGoodbye = roleNeutral "arrivederci" ; GSorry = ss "scusami" ; ----
GBye = roleNeutral "ciao" ; GSorryPol = ss "scusimi" ; ----
GWhatsYourName = GGoodbye = ss "arrivederci" ;
politeDistinct "come si chiama" "come ti chiami" ; GBye = ss "ciao" ;
-- GNiceToMeetYou = roleNeutral "piacevole" ; ---- GWhatsYourName = ss "come si chiama" ;
-- GSeeYouSoon = roleNeutral "a poco tempo" ; ---- -- GNiceToMeetYou = ss "piacevole" ; ----
GHelp = roleNeutral "aiuto" ; -- GSeeYouSoon = ss "a poco tempo" ; ----
GLookOut = roleNeutral "attenzione" ; GHelp = ss "aiuto" ;
GGoodMorning = roleNeutral "buongiorno" ; GLookOut = ss "attenzione" ;
GGoodDay = roleNeutral "buongiorno" ; GGoodMorning = ss "buongiorno" ;
GGoodEvening = roleNeutral "buona sera" ; GGoodDay = ss "buongiorno" ;
GGoodNight = roleNeutral "buona notte" ; GGoodEvening = ss "buona sera" ;
GImHungry = roleNeutral "ho fame" ; GGoodNight = ss "buona notte" ;
GImThirsty = roleNeutral "ho sete" ; GImHungry = ss "ho fame" ;
GImTired = speakerDistinct "sono stanco" "sono stanca" ; GImThirsty = ss "ho sete" ;
GImScared = roleNeutral "ho paura" ; GImTired = ss "sono stanco" ; ----
GIdontUnderstand = roleNeutral "non capisco" ; GImScared = ss "ho paura" ;
GTheCheck = roleNeutral "il conto" ; GIdontUnderstand = ss "non capisco" ;
GTheCheck = ss "il conto" ;
GYes = roleNeutral "sě" ; ---- si GYes = ss "sì" ; ---- si
GNo = roleNeutral "no" ; GNo = ss "no" ;
} }

View File

@@ -6,10 +6,6 @@ abstract Phrasebook =
flags startcat = Phrase ; flags startcat = Phrase ;
fun fun
PGreeting : Greeting -> Phrase ;
-- here rather than Sentences, because not functorial
PGreeting : Politeness -> Greeting -> Phrase ;
---- PGreeting : Politeness -> Gender -> Gender -> Greeting -> Phrase ;
-- politeness level, speaker, hearer
} }

View File

@@ -3,11 +3,10 @@
concrete PhrasebookEng of Phrasebook = concrete PhrasebookEng of Phrasebook =
GreetingsEng, GreetingsEng,
WordsEng ** open WordsEng ** open
(R = Roles),
SyntaxEng, SyntaxEng,
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text g) (lin Text (ss p.s)) ; PGreeting g = lin Text g ;
} }

View File

@@ -7,6 +7,6 @@ concrete PhrasebookFin of Phrasebook =
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text (ss g.s)) (lin Text (ss p.s)) ; PGreeting g = lin Text (ss g.s) ;
} }

View File

@@ -4,12 +4,10 @@ concrete PhrasebookFre of Phrasebook =
GreetingsFre, GreetingsFre,
WordsFre WordsFre
** open ** open
(R = Roles),
SyntaxFre, SyntaxFre,
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text (ss (g.s ! p.p ! R.Male ! R.Male))) (lin Text (ss p.s)) ; PGreeting g = lin Text (ss g.s) ;
---- PGreeting p s h g = mkPhrase (g.s ! p.p ! s.g ! h.g ++ p.s ++ s.s ++ h.s) ;
} }

View File

@@ -4,13 +4,11 @@ concrete PhrasebookIta of Phrasebook =
GreetingsIta, GreetingsIta,
WordsIta WordsIta
** open ** open
(R = Roles),
SyntaxIta, SyntaxIta,
ParadigmsIta,
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text (ss (g.s ! p.p ! R.Male ! R.Male))) (lin Text (ss p.s)) ; PGreeting g = lin Text (ss g.s) ;
} }

View File

@@ -8,6 +8,6 @@ concrete PhrasebookRon of Phrasebook =
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text (ss g.s)) (lin Text (ss p.s)) ; PGreeting g = lin Text (ss g.s) ;
} }

View File

@@ -7,6 +7,6 @@ concrete PhrasebookSwe of Phrasebook =
Prelude in { Prelude in {
lin lin
PGreeting p g = mkText (lin Text (ss g.s)) (lin Text (ss p.s)) ; PGreeting g = lin Text (ss g.s) ;
} }

View File

@@ -7,14 +7,10 @@ abstract Sentences = Numeral ** {
Place ; PlaceKind ; Currency ; Price ; Language ; Place ; PlaceKind ; Currency ; Price ; Language ;
Person ; Action ; Person ; Action ;
-- abstract parameters
Politeness ;
-- Gender ;
fun fun
-- these phrases are formed here, not in Phrasebook, as they are functorial -- these phrases are formed here, not in Phrasebook, as they are functorial
PSentence : Politeness -> Sentence -> Phrase ; PSentence : Sentence -> Phrase ;
PQuestion : Politeness -> Question -> Phrase ; PQuestion : Question -> Phrase ;
PObject : Object -> Phrase ; PObject : Object -> Phrase ;
PKind : Kind -> Phrase ; PKind : Kind -> Phrase ;
@@ -50,9 +46,6 @@ abstract Sentences = Numeral ** {
ThePlace : PlaceKind -> Place ; ThePlace : PlaceKind -> Place ;
I, You : Person ; I, YouFam, YouPol : Person ;
Polite, Familiar : Politeness ;
-- Male, Female : Gender ;
} }

View File

@@ -4,9 +4,7 @@ concrete SentencesFre of Sentences = NumeralFre ** SentencesI - [WhetherIs, QAct
(Syntax = SyntaxFre) ** open SyntaxFre, ExtraFre in { (Syntax = SyntaxFre) ** open SyntaxFre, ExtraFre in {
lin lin
WhetherIs item quality = WhetherIs item quality = lin QS {s = \\_ => (EstcequeS (mkS (mkCl item quality))).s} ;
{s = \\_ => lin QS {s = \\_ => (EstcequeS (mkS (mkCl item quality))).s}} ; QAction a = lin QS {s = \\_ => (EstcequeS (mkS a)).s} ;
QAction a =
{s = \\r => lin QS {s = \\_ => (EstcequeS (mkS (a.s ! r))).s}} ;
} }

View File

@@ -2,14 +2,12 @@ incomplete concrete SentencesI of Sentences = Numeral **
open open
DiffPhrasebook, DiffPhrasebook,
Syntax, Syntax,
(R = Roles),
Prelude Prelude
in { in {
lincat lincat
Phrase = Text ; Phrase = Text ;
Politeness = {s : Str ; p : R.Politeness} ; Sentence = S ;
Sentence = {s : R.Politeness => S} ; Question = QS ;
Question = {s : R.Politeness => QS} ;
Item = NP ; Item = NP ;
Kind = CN ; Kind = CN ;
Quality = AP ; Quality = AP ;
@@ -18,15 +16,12 @@ incomplete concrete SentencesI of Sentences = Numeral **
PlaceKind = CN ; PlaceKind = CN ;
Currency = CN ; Currency = CN ;
Price = NP ; Price = NP ;
Action = {s : R.Politeness => Cl} ; Action = Cl ;
Person = {s : R.Politeness => NP} ; Person = NP ;
Language = NP ; Language = NP ;
lin lin
--- todo: add speaker and hearer genders PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.'
PSentence p g = let s = g.s ! p.p in PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional '?'
mkText (mkText s | lin Text (mkUtt s)) (lin Text (ss p.s)) ; -- optional '.'
PQuestion p g = let s = g.s ! p.p in
mkText (mkText s | lin Text (mkUtt s)) (lin Text (ss p.s)) ; -- optional '?'
PObject x = mkPhrase (mkUtt x) ; PObject x = mkPhrase (mkUtt x) ;
PKind x = mkPhrase (mkUtt x) ; PKind x = mkPhrase (mkUtt x) ;
@@ -38,17 +33,17 @@ incomplete concrete SentencesI of Sentences = Numeral **
PPrice x = mkPhrase (mkUtt x) ; PPrice x = mkPhrase (mkUtt x) ;
PLanguage x = mkPhrase (mkUtt x) ; PLanguage x = mkPhrase (mkUtt x) ;
Is item quality = neutralS (mkS (mkCl item quality)) ; Is item quality = mkS (mkCl item quality) ;
IsNot item quality = neutralS (mkS negativePol (mkCl item quality)) ; IsNot item quality = mkS negativePol (mkCl item quality) ;
WhetherIs item quality = neutralQS (mkQS (mkQCl (mkCl item quality))) ; WhetherIs item quality = mkQS (mkQCl (mkCl item quality)) ;
WhereIs place = neutralQS (mkQS (mkQCl where_IAdv place)) ; WhereIs place = mkQS (mkQCl where_IAdv place) ;
SAction a = {s = \\p => mkS (a.s ! p)} ; SAction = mkS ;
SNotAction a = {s = \\p => mkS negativePol (a.s ! p)} ; SNotAction = mkS negativePol ;
QAction a = {s = \\p => mkQS (mkQCl (a.s ! p))} ; QAction a = mkQS (mkQCl a) ;
HowMuchCost item = neutralQS (mkQS (mkQCl how8much_IAdv (mkCl item cost_V))) ; HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item cost_V)) ;
ItCost item price = neutralS (mkS (mkCl item cost_V2 price)) ; ItCost item price = mkS (mkCl item cost_V2 price) ;
AmountCurrency num curr = mkNP <lin Numeral num : Numeral> curr ; AmountCurrency num curr = mkNP <lin Numeral num : Numeral> curr ;
@@ -67,23 +62,12 @@ incomplete concrete SentencesI of Sentences = Numeral **
Too quality = mkAP too_AdA quality ; Too quality = mkAP too_AdA quality ;
ThePlace kind = mkNP the_Quant kind ; ThePlace kind = mkNP the_Quant kind ;
I = {s = \\_ => mkNP i_Pron} ; I = mkNP i_Pron ;
You = {s = table {R.PPolite => mkNP youPol_Pron ; R.PFamiliar => mkNP youSg_Pron}} ; YouFam = mkNP youSg_Pron ;
YouPol = mkNP youPol_Pron ;
Polite = {s = [] ; p = R.PPolite} ;
Familiar = {s = [] ; p = R.PFamiliar} ;
-- Male = {s = [] ; g = R.Male} ;
-- Female = {s = [] ; g = R.Female} ;
oper oper
mkPhrase : Utt -> Text = \u -> lin Text u ; -- no punctuation mkPhrase : Utt -> Text = \u -> lin Text u ; -- no punctuation
politeS : S -> S -> {s : R.Politeness => S} = \pol,fam ->
{s = table {R.PPolite => pol ; R.PFamiliar => fam}} ;
neutralS : S -> {s : R.Politeness => S} = \pol -> politeS pol pol ;
politeQS : QS -> QS -> {s : R.Politeness => QS} = \pol,fam ->
{s = table {R.PPolite => pol ; R.PFamiliar => fam}} ;
neutralQS : QS -> {s : R.Politeness => QS} = \pol -> politeQS pol pol ;
---- it would be greate to use overloading here
} }

View File

@@ -1,7 +1,7 @@
-- (c) 2009 Aarne Ranta under LGPL -- (c) 2009 Aarne Ranta under LGPL
concrete WordsEng of Words = SentencesEng ** concrete WordsEng of Words = SentencesEng **
open SyntaxEng, ParadigmsEng, IrregEng, (R = Roles) in { open SyntaxEng, ParadigmsEng, IrregEng in {
lin lin
Wine = mkCN (mkN "wine") ; Wine = mkCN (mkN "wine") ;
Beer = mkCN (mkN "beer") ; Beer = mkCN (mkN "beer") ;
@@ -33,13 +33,11 @@ concrete WordsEng of Words = SentencesEng **
Romanian = mkNP (mkPN "Romanian") ; Romanian = mkNP (mkPN "Romanian") ;
Swedish = mkNP (mkPN "Swedish") ; Swedish = mkNP (mkPN "Swedish") ;
AWant p obj = neutralA (mkCl (np p) (mkV2 (mkV "want")) obj) ; AWant p obj = mkCl p (mkV2 (mkV "want")) obj ;
ALike p item = neutralA (mkCl (np p) (mkV2 (mkV "like")) item) ; ALike p item = mkCl p (mkV2 (mkV "like")) item ;
AHave p kind = neutralA (mkCl (np p) have_V2 (mkNP kind)) ; AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = neutralA (mkCl (np p) (mkV2 IrregEng.speak_V) lang) ; ASpeak p lang = mkCl p (mkV2 IrregEng.speak_V) lang ;
ALove p q = neutralA (mkCl (np p) (mkV2 (mkV "love")) (np q)) ; ALove p q = mkCl p (mkV2 (mkV "love")) q ;
oper
neutralA : Cl -> {s : R.Politeness => Cl} = \pol -> {s = \\_ => pol} ;
np : {s : R.Politeness => NP} -> NP = \p -> p.s ! R.PPolite ;
} }

View File

@@ -31,16 +31,15 @@ concrete WordsFin of Words = SentencesFin **
Dollar = mkCN (mkN "dollari") ; Dollar = mkCN (mkN "dollari") ;
Lei = mkCN (mkN "lei") ; Lei = mkCN (mkN "lei") ;
AWant p obj = mkCl p want_V2 obj ;
ALike p item = mkCl p like_V2 item ;
AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = mkCl p (mkV2 (mkV "puhua") partitive) lang ;
ALove p q = mkCl p (mkV2 (mkV "rakastaa") partitive) q ;
English = mkNP (mkPN "englanti") ; English = mkNP (mkPN "englanti") ;
Finnish = mkNP (mkPN (mkN "suomi" "suomia")) ; Finnish = mkNP (mkPN (mkN "suomi" "suomia")) ;
French = mkNP (mkPN "ranska") ; French = mkNP (mkPN "ranska") ;
Romanian = mkNP (mkPN "romania") ; Romanian = mkNP (mkPN "romania") ;
Swedish = mkNP (mkPN "ruotsi") ; Swedish = mkNP (mkPN "ruotsi") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_V2 obj} ;
ALike p item = {s = \\r => mkCl (p.s ! r) like_V2 item} ;
AHave p kind = {s = \\r => mkCl (p.s ! r) have_V2 (mkNP kind)} ;
ASpeak p lang = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "puhua") partitive) lang} ;
ALove p q = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "rakastaa") partitive) (q.s ! r)} ;
} }

View File

@@ -35,21 +35,19 @@ Boring = mkAPA "ennuyeux" ;
Dollar = mkCN (mkN "dollar") ; Dollar = mkCN (mkN "dollar") ;
Lei = mkCN (mkN "lei") ; ---- ? Lei = mkCN (mkN "lei") ; ---- ?
AWant p obj = mkCl p want_V2 obj ;
ALike p item = mkCl item plaire_V2 p ;
AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = mkCl p (mkV2 (mkV "parler")) lang ;
ALove p q = mkCl p (mkV2 (mkV "aimer")) q ;
English = mkNP (mkPN "anglais") ; English = mkNP (mkPN "anglais") ;
Finnish = mkNP (mkPN "finnois") ; Finnish = mkNP (mkPN "finnois") ;
French = mkNP (mkPN "français") ; French = mkNP (mkPN "français") ;
Romanian = mkNP (mkPN "roumain") ; Romanian = mkNP (mkPN "roumain") ;
Swedish = mkNP (mkPN "suédois") ; Swedish = mkNP (mkPN "suédois") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_V2 obj} ; oper
ALike p item = {s = \\r => mkCl item plaire_V2 (p.s ! r)} ; mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;
AHave p kind = {s = \\r => mkCl (p.s ! r) have_V2 (mkNP kind)} ;
ASpeak p lang = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "parler")) lang} ;
ALove p q = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "aimer")) (q.s ! r)} ;
oper
mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;
} }

View File

@@ -18,7 +18,7 @@ Cheese = mkCN (mkN "formaggio") ;
Fish = mkCN (mkN "pesce") ; Fish = mkCN (mkN "pesce") ;
Pizza = mkCN (mkN "pizza") ; Pizza = mkCN (mkN "pizza") ;
Itash = mkAP (mkA "frasco") ; Fresh = mkAP (mkA "fresco") ;
Warm = mkAPA "caldo" ; Warm = mkAPA "caldo" ;
Italian = mkAPA "italiano" ; Italian = mkAPA "italiano" ;
Expensive = mkAPA "caro" ; Expensive = mkAPA "caro" ;
@@ -33,18 +33,18 @@ Boring = mkAPA "noioso" ;
Dollar = mkCN (mkN "dollar") ; Dollar = mkCN (mkN "dollar") ;
Lei = mkCN (mkN "lei") ; ---- ? Lei = mkCN (mkN "lei") ; ---- ?
AWant p obj = mkCl p want_V2 obj ;
ALike p item = mkCl item (mkV2 (mkV (piacere_64 "piacere")) dative) p ;
AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = mkCl p (mkV2 (mkV "parlare")) lang ;
ALove p q = mkCl p (mkV2 (mkV "amare")) q ;
English = mkNP (mkPN "inglese") ; English = mkNP (mkPN "inglese") ;
Finnish = mkNP (mkPN "finnico") ; Finnish = mkNP (mkPN "finnico") ;
Itanch = mkNP (mkPN "francese") ; French = mkNP (mkPN "francese") ;
Romanian = mkNP (mkPN "romano") ; Romanian = mkNP (mkPN "romano") ;
Swedish = mkNP (mkPN "svedese") ; Swedish = mkNP (mkPN "svedese") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_V2 obj} ;
ALike p item = {s = \\r => mkCl item (mkV2 (mkV (piacere_64 "piacere")) dative) (p.s ! r)} ;
AHave p kind = {s = \\r => mkCl (p.s ! r) have_V2 (mkNP kind)} ;
ASpeak p lang = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "parlare")) lang} ;
ALove p q = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "amare")) (q.s ! r)} ;
oper oper
mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ; mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;

View File

@@ -3,8 +3,7 @@
concrete WordsRon of Words = SentencesRon ** open concrete WordsRon of Words = SentencesRon ** open
SyntaxRon, SyntaxRon,
ParadigmsRon, ParadigmsRon,
DiffPhrasebookRon, DiffPhrasebookRon in
(R = Roles) in
{ {
flags coding=utf8 ; flags coding=utf8 ;
@@ -35,18 +34,18 @@ Boring = mkAPA "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ;
Dollar = mkCN (mkN "dolar" masculine) ; Dollar = mkCN (mkN "dolar" masculine) ;
Lei = mkCN (mkN "leu" "lei") ; Lei = mkCN (mkN "leu" "lei") ;
AWant p obj = mkCl p want_V2 obj ;
ALike p item = mkCl p like_V2 item ;
AHave p kind = mkCl p have_V2 (SyntaxRon.mkNP kind) ;
ASpeak p lang = mkCl p (dirV2 (mkV "vorbi")) lang ;
ALove p q = mkCl p (dirV2 (mkV "iubi")) q ;
English = SyntaxRon.mkNP (mkPN "engleză") ; ---- ? English = SyntaxRon.mkNP (mkPN "engleză") ; ---- ?
-- Finnish = mkNP (mkPN "finnois") ; -- Finnish = mkNP (mkPN "finnois") ;
-- French = mkNP (mkPN "français") ; -- French = mkNP (mkPN "français") ;
Romanian = SyntaxRon.mkNP (mkPN "română") ; ---- ? Romanian = SyntaxRon.mkNP (mkPN "română") ; ---- ?
-- Swedish = mkNP (mkPN "suédois") ; -- Swedish = mkNP (mkPN "suédois") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_V2 obj} ;
ALike p item = {s = \\r => mkCl (p.s ! r) like_V2 item} ;
AHave p kind = {s = \\r => mkCl (p.s ! r) have_V2 (SyntaxRon.mkNP kind)} ;
ASpeak p lang = {s = \\r => mkCl (p.s ! r) (dirV2 (mkV "vorbi")) lang} ;
ALove p q = {s = \\r => mkCl (p.s ! R.PPolite) (dirV2 (mkV "iubi")) (q.s ! r)} ; ---- linking slow
oper oper
mkAPA : (_,_,_,_ : Str) -> AP = \x,y,z,u -> mkAP (mkA x y z u) ; mkAPA : (_,_,_,_ : Str) -> AP = \x,y,z,u -> mkAP (mkA x y z u) ;

View File

@@ -33,11 +33,11 @@ concrete WordsSwe of Words = SentencesSwe **
Romanian = mkNP (mkPN "rumänska") ; Romanian = mkNP (mkPN "rumänska") ;
Swedish = mkNP (mkPN "svenska") ; Swedish = mkNP (mkPN "svenska") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_VV (mkVP have_V2 obj)} ; AWant p obj = mkCl p want_VV (mkVP have_V2 obj) ;
ALike p item = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "tycker") (mkPrep "om")) item} ; ALike p item = mkCl p (mkV2 (mkV "tycker") (mkPrep "om")) item ;
AHave p kind = {s = \\r => mkCl (p.s ! r) have_V2 (mkNP kind)} ; AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "tala")) lang} ; ASpeak p lang = mkCl p (mkV2 (mkV "tala")) lang ;
ALove p q = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "älska")) (q.s ! r)} ; ALove p q = mkCl p (mkV2 (mkV "älska")) q ;
} }

View File

@@ -2,6 +2,6 @@ DisambPhrasebookEng :
PhrasebookEng : PhrasebookEng :
PhrasebookFin : PhrasebookFin :
PhrasebookFre : PhrasebookFre :
PhrasebookIta : French Fresh GNiceToMeetYou GSeeYouSoon Tea PhrasebookIta : GNiceToMeetYou GSeeYouSoon Tea
PhrasebookRon : Coffee Finnish French Swedish Tea PhrasebookRon : Coffee Finnish French GExcusePol GPleaseGivePol GSorryPol Swedish Tea
PhrasebookSwe : PhrasebookSwe : GExcusePol GPleaseGivePol GSorryPol

View File

@@ -157,7 +157,7 @@ doTranslateGroup pgf input mcat mfrom mto =
disamb lg from t = disamb lg from t =
if lg < 2 if lg < 2
then [] then []
else [("tree", "-- " ++ doText (doBind PGF.linearize pgf (disambLang from)) t)] else [("tree", "-- " ++ doText (doBind (PGF.linearize pgf (disambLang from) t)))]
disambLang f = maybe f id $ PGF.readLanguage $ "Disamb" ++ PGF.showLanguage f disambLang f = maybe f id $ PGF.readLanguage $ "Disamb" ++ PGF.showLanguage f
notDisamb = (/="Disamb") . take 6 . PGF.showLanguage notDisamb = (/="Disamb") . take 6 . PGF.showLanguage