1
0
forked from GitHub/gf-core

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
concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng - [Polite,Familiar] **
open
(R = Roles) in {
concrete DisambPhrasebookEng of Phrasebook = PhrasebookEng -
[YouFam, YouPol, GExcuse, GExcusePol, GSorry, GSorryPol, GPleaseGive, GPleaseGivePol]
** open SyntaxEng, ParadigmsEng, Prelude in {
lin
Polite = {s = "(polite)" ; p = R.PPolite} ;
Familiar = {s = "(familiar)" ; p = R.PFamiliar} ;
YouFam = mkNP (mkNP youSg_Pron) (ParadigmsEng.mkAdv "(familiar)") ;
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 ;
GThanks : Greeting ;
GHowAreYou : Greeting ;
GPleaseGive : Greeting ;
GExcuse : Greeting ;
GSorry : Greeting ;
GPleaseGive, GPleaseGivePol : Greeting ;
GExcuse, GExcusePol : Greeting ;
GSorry, GSorryPol : Greeting ;
GGoodbye : Greeting ;
GBye : Greeting ;
GWhatsYourName : Greeting ;

View File

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

View File

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

View File

@@ -3,36 +3,37 @@ concrete GreetingsFre of Greetings = open Roles,Prelude in {
flags coding = utf8 ;
lincat
Greeting = RolePhrase ;
Greeting = SS ;
lin
GHello = roleNeutral "salut" ;
GThanks = roleNeutral "merci" ;
GHowAreYou = roleNeutral "comment ça va" ;
GPleaseGive = politeDistinct "s'il vous plaît" "s'il te plaît" ;
GExcuse = politeDistinct "excusez-moi" "excuse-moi" ;
GSorry = roleNeutral "pardon" ;
GGoodbye = roleNeutral "au revoir" ;
GBye = roleNeutral "au revoir" ;
GWhatsYourName =
politeDistinct "comment vous appelez-vous" "comment t'appelles-tu" ;
GNiceToMeetYou = speakerDistinct "enchanté" "enchantée" ;
GSeeYouSoon = roleNeutral "à bientôt" ;
GHelp = roleNeutral "au secours" ;
GLookOut = roleNeutral "attention" ;
GGoodMorning = roleNeutral "bonjour" ;
GGoodDay = roleNeutral "bonjour" ;
GGoodEvening = roleNeutral "bon soir" ;
GGoodNight = roleNeutral "bonne nuit" ;
GImHungry = roleNeutral "j'ai faim" ;
GImThirsty = roleNeutral "j'ai soif" ;
GImTired = speakerDistinct "je suis fatigué" "je suis fatiguée" ;
GImScared = roleNeutral "j'ai peur" ;
GIdontUnderstand = roleNeutral "je ne comprends pas" ;
GTheCheck = roleNeutral "l'addition" ;
GHello = ss "salut" ;
GThanks = ss "merci" ;
GHowAreYou = ss "comment ça va" ;
GPleaseGive = ss "s'il te plaît" ;
GPleaseGivePol = ss "s'il vous plaît" ;
GExcuse = ss "excuse-moi" ;
GExcusePol = ss "excusez-moi" ;
GSorry, GSorryPol = ss "pardon" ;
GGoodbye = ss "au revoir" ;
GBye = ss "au revoir" ;
GWhatsYourName = ss "comment vous appelez-vous" ; ----
GNiceToMeetYou = ss "enchanté" ;
GSeeYouSoon = ss "à bientôt" ;
GHelp = ss "au secours" ;
GLookOut = ss "attention" ;
GGoodMorning = ss "bonjour" ;
GGoodDay = ss "bonjour" ;
GGoodEvening = ss "bon soir" ;
GGoodNight = ss "bonne nuit" ;
GImHungry = ss "j'ai faim" ;
GImThirsty = ss "j'ai soif" ;
GImTired = ss "je suis fatigué" ; ----
GImScared = ss "j'ai peur" ;
GIdontUnderstand = ss "je ne comprends pas" ;
GTheCheck = ss "l'addition" ;
GYes = roleNeutral "oui" ; ---- si
GNo = roleNeutral "non" ;
GYes = ss "oui" ; ---- si
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
Greeting = RolePhrase ;
Greeting = SS ;
lin
GHello = roleNeutral "ciao" ;
GThanks = roleNeutral "grazie" ;
GHowAreYou = roleNeutral "come sta" ;
GPleaseGive = roleNeutral "per favore" ;
GExcuse = politeDistinct "scusi" "scusa" ;
GSorry = politeDistinct "scusimi" "scusami" ; ----
GGoodbye = roleNeutral "arrivederci" ;
GBye = roleNeutral "ciao" ;
GWhatsYourName =
politeDistinct "come si chiama" "come ti chiami" ;
-- GNiceToMeetYou = roleNeutral "piacevole" ; ----
-- GSeeYouSoon = roleNeutral "a poco tempo" ; ----
GHelp = roleNeutral "aiuto" ;
GLookOut = roleNeutral "attenzione" ;
GGoodMorning = roleNeutral "buongiorno" ;
GGoodDay = roleNeutral "buongiorno" ;
GGoodEvening = roleNeutral "buona sera" ;
GGoodNight = roleNeutral "buona notte" ;
GImHungry = roleNeutral "ho fame" ;
GImThirsty = roleNeutral "ho sete" ;
GImTired = speakerDistinct "sono stanco" "sono stanca" ;
GImScared = roleNeutral "ho paura" ;
GIdontUnderstand = roleNeutral "non capisco" ;
GTheCheck = roleNeutral "il conto" ;
GHello = ss "ciao" ;
GThanks = ss "grazie" ;
GHowAreYou = ss "come sta" ;
GPleaseGive, GPleaseGivePol = ss "per favore" ;
GExcuse = ss "scusa" ;
GExcusePol = ss "scusi" ;
GSorry = ss "scusami" ; ----
GSorryPol = ss "scusimi" ; ----
GGoodbye = ss "arrivederci" ;
GBye = ss "ciao" ;
GWhatsYourName = ss "come si chiama" ;
-- GNiceToMeetYou = ss "piacevole" ; ----
-- GSeeYouSoon = ss "a poco tempo" ; ----
GHelp = ss "aiuto" ;
GLookOut = ss "attenzione" ;
GGoodMorning = ss "buongiorno" ;
GGoodDay = ss "buongiorno" ;
GGoodEvening = ss "buona sera" ;
GGoodNight = ss "buona notte" ;
GImHungry = ss "ho fame" ;
GImThirsty = ss "ho sete" ;
GImTired = ss "sono stanco" ; ----
GImScared = ss "ho paura" ;
GIdontUnderstand = ss "non capisco" ;
GTheCheck = ss "il conto" ;
GYes = roleNeutral "sě" ; ---- si
GNo = roleNeutral "no" ;
GYes = ss "sì" ; ---- si
GNo = ss "no" ;
}

View File

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

View File

@@ -3,11 +3,10 @@
concrete PhrasebookEng of Phrasebook =
GreetingsEng,
WordsEng ** open
(R = Roles),
SyntaxEng,
Prelude in {
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 {
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,
WordsFre
** open
(R = Roles),
SyntaxFre,
Prelude in {
lin
PGreeting p g = mkText (lin Text (ss (g.s ! p.p ! R.Male ! R.Male))) (lin Text (ss p.s)) ;
---- PGreeting p s h g = mkPhrase (g.s ! p.p ! s.g ! h.g ++ p.s ++ s.s ++ h.s) ;
PGreeting g = lin Text (ss g.s) ;
}

View File

@@ -4,13 +4,11 @@ concrete PhrasebookIta of Phrasebook =
GreetingsIta,
WordsIta
** open
(R = Roles),
SyntaxIta,
ParadigmsIta,
Prelude in {
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 {
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 {
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 ;
Person ; Action ;
-- abstract parameters
Politeness ;
-- Gender ;
fun
-- these phrases are formed here, not in Phrasebook, as they are functorial
PSentence : Politeness -> Sentence -> Phrase ;
PQuestion : Politeness -> Question -> Phrase ;
PSentence : Sentence -> Phrase ;
PQuestion : Question -> Phrase ;
PObject : Object -> Phrase ;
PKind : Kind -> Phrase ;
@@ -50,9 +46,6 @@ abstract Sentences = Numeral ** {
ThePlace : PlaceKind -> Place ;
I, You : Person ;
Polite, Familiar : Politeness ;
-- Male, Female : Gender ;
I, YouFam, YouPol : Person ;
}

View File

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

View File

@@ -2,14 +2,12 @@ incomplete concrete SentencesI of Sentences = Numeral **
open
DiffPhrasebook,
Syntax,
(R = Roles),
Prelude
in {
lincat
Phrase = Text ;
Politeness = {s : Str ; p : R.Politeness} ;
Sentence = {s : R.Politeness => S} ;
Question = {s : R.Politeness => QS} ;
Sentence = S ;
Question = QS ;
Item = NP ;
Kind = CN ;
Quality = AP ;
@@ -18,15 +16,12 @@ incomplete concrete SentencesI of Sentences = Numeral **
PlaceKind = CN ;
Currency = CN ;
Price = NP ;
Action = {s : R.Politeness => Cl} ;
Person = {s : R.Politeness => NP} ;
Action = Cl ;
Person = NP ;
Language = NP ;
lin
--- todo: add speaker and hearer genders
PSentence p g = let s = g.s ! p.p in
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 '?'
PSentence s = mkText s | lin Text (mkUtt s) ; -- optional '.'
PQuestion s = mkText s | lin Text (mkUtt s) ; -- optional '?'
PObject x = mkPhrase (mkUtt x) ;
PKind x = mkPhrase (mkUtt x) ;
@@ -38,17 +33,17 @@ incomplete concrete SentencesI of Sentences = Numeral **
PPrice x = mkPhrase (mkUtt x) ;
PLanguage x = mkPhrase (mkUtt x) ;
Is item quality = neutralS (mkS (mkCl item quality)) ;
IsNot item quality = neutralS (mkS negativePol (mkCl item quality)) ;
WhetherIs item quality = neutralQS (mkQS (mkQCl (mkCl item quality))) ;
WhereIs place = neutralQS (mkQS (mkQCl where_IAdv place)) ;
Is item quality = mkS (mkCl item quality) ;
IsNot item quality = mkS negativePol (mkCl item quality) ;
WhetherIs item quality = mkQS (mkQCl (mkCl item quality)) ;
WhereIs place = mkQS (mkQCl where_IAdv place) ;
SAction a = {s = \\p => mkS (a.s ! p)} ;
SNotAction a = {s = \\p => mkS negativePol (a.s ! p)} ;
QAction a = {s = \\p => mkQS (mkQCl (a.s ! p))} ;
SAction = mkS ;
SNotAction = mkS negativePol ;
QAction a = mkQS (mkQCl a) ;
HowMuchCost item = neutralQS (mkQS (mkQCl how8much_IAdv (mkCl item cost_V))) ;
ItCost item price = neutralS (mkS (mkCl item cost_V2 price)) ;
HowMuchCost item = mkQS (mkQCl how8much_IAdv (mkCl item cost_V)) ;
ItCost item price = mkS (mkCl item cost_V2 price) ;
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 ;
ThePlace kind = mkNP the_Quant kind ;
I = {s = \\_ => mkNP i_Pron} ;
You = {s = table {R.PPolite => mkNP youPol_Pron ; R.PFamiliar => mkNP youSg_Pron}} ;
Polite = {s = [] ; p = R.PPolite} ;
Familiar = {s = [] ; p = R.PFamiliar} ;
-- Male = {s = [] ; g = R.Male} ;
-- Female = {s = [] ; g = R.Female} ;
I = mkNP i_Pron ;
YouFam = mkNP youSg_Pron ;
YouPol = mkNP youPol_Pron ;
oper
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
concrete WordsEng of Words = SentencesEng **
open SyntaxEng, ParadigmsEng, IrregEng, (R = Roles) in {
open SyntaxEng, ParadigmsEng, IrregEng in {
lin
Wine = mkCN (mkN "wine") ;
Beer = mkCN (mkN "beer") ;
@@ -33,13 +33,11 @@ concrete WordsEng of Words = SentencesEng **
Romanian = mkNP (mkPN "Romanian") ;
Swedish = mkNP (mkPN "Swedish") ;
AWant p obj = neutralA (mkCl (np p) (mkV2 (mkV "want")) obj) ;
ALike p item = neutralA (mkCl (np p) (mkV2 (mkV "like")) item) ;
AHave p kind = neutralA (mkCl (np p) have_V2 (mkNP kind)) ;
ASpeak p lang = neutralA (mkCl (np p) (mkV2 IrregEng.speak_V) lang) ;
ALove p q = neutralA (mkCl (np p) (mkV2 (mkV "love")) (np q)) ;
AWant p obj = mkCl p (mkV2 (mkV "want")) obj ;
ALike p item = mkCl p (mkV2 (mkV "like")) item ;
AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = mkCl p (mkV2 IrregEng.speak_V) lang ;
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") ;
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") ;
Finnish = mkNP (mkPN (mkN "suomi" "suomia")) ;
French = mkNP (mkPN "ranska") ;
Romanian = mkNP (mkPN "romania") ;
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") ;
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") ;
Finnish = mkNP (mkPN "finnois") ;
French = mkNP (mkPN "français") ;
Romanian = mkNP (mkPN "roumain") ;
Swedish = mkNP (mkPN "suédois") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_V2 obj} ;
ALike p item = {s = \\r => mkCl item plaire_V2 (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 "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) ;
oper
mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;
}

View File

@@ -18,7 +18,7 @@ Cheese = mkCN (mkN "formaggio") ;
Fish = mkCN (mkN "pesce") ;
Pizza = mkCN (mkN "pizza") ;
Itash = mkAP (mkA "frasco") ;
Fresh = mkAP (mkA "fresco") ;
Warm = mkAPA "caldo" ;
Italian = mkAPA "italiano" ;
Expensive = mkAPA "caro" ;
@@ -33,18 +33,18 @@ Boring = mkAPA "noioso" ;
Dollar = mkCN (mkN "dollar") ;
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") ;
Finnish = mkNP (mkPN "finnico") ;
Itanch = mkNP (mkPN "francese") ;
French = mkNP (mkPN "francese") ;
Romanian = mkNP (mkPN "romano") ;
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
mkAPA : (_ : Str) -> AP = \x -> mkAP (mkA x) ;

View File

@@ -3,8 +3,7 @@
concrete WordsRon of Words = SentencesRon ** open
SyntaxRon,
ParadigmsRon,
DiffPhrasebookRon,
(R = Roles) in
DiffPhrasebookRon in
{
flags coding=utf8 ;
@@ -35,18 +34,18 @@ Boring = mkAPA "plictisitor" "plictisitoare" "plictisitori" "plictisitoare" ;
Dollar = mkCN (mkN "dolar" masculine) ;
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ă") ; ---- ?
-- Finnish = mkNP (mkPN "finnois") ;
-- French = mkNP (mkPN "français") ;
Romanian = SyntaxRon.mkNP (mkPN "română") ; ---- ?
-- 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
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") ;
Swedish = mkNP (mkPN "svenska") ;
AWant p obj = {s = \\r => mkCl (p.s ! r) want_VV (mkVP have_V2 obj)} ;
ALike p item = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "tycker") (mkPrep "om")) 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 "tala")) lang} ;
ALove p q = {s = \\r => mkCl (p.s ! r) (mkV2 (mkV "älska")) (q.s ! r)} ;
AWant p obj = mkCl p want_VV (mkVP have_V2 obj) ;
ALike p item = mkCl p (mkV2 (mkV "tycker") (mkPrep "om")) item ;
AHave p kind = mkCl p have_V2 (mkNP kind) ;
ASpeak p lang = mkCl p (mkV2 (mkV "tala")) lang ;
ALove p q = mkCl p (mkV2 (mkV "älska")) q ;
}

View File

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

View File

@@ -157,7 +157,7 @@ doTranslateGroup pgf input mcat mfrom mto =
disamb lg from t =
if lg < 2
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
notDisamb = (/="Disamb") . take 6 . PGF.showLanguage