summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorramona.enache <ramona.enache@chalmers.se>2010-05-28 12:15:28 +0000
committerramona.enache <ramona.enache@chalmers.se>2010-05-28 12:15:28 +0000
commit8f9eb4f7f32560803d690be2b75e9dcc6cb08502 (patch)
tree595441a5b991f7576d221025515b6b37469692e8 /examples
parent2d44390bbf681b060574bbcfd95811a4459935db (diff)
added inherent number to places, fixed places in French
Diffstat (limited to 'examples')
-rw-r--r--examples/phrasebook/SentencesI.gf18
-rw-r--r--examples/phrasebook/WordsBul.gf4
-rw-r--r--examples/phrasebook/WordsCat.gf2
-rw-r--r--examples/phrasebook/WordsDan.gf19
-rw-r--r--examples/phrasebook/WordsDut.gf2
-rw-r--r--examples/phrasebook/WordsEng.gf4
-rw-r--r--examples/phrasebook/WordsFin.gf7
-rw-r--r--examples/phrasebook/WordsFre.gf4
-rw-r--r--examples/phrasebook/WordsGer.gf5
-rw-r--r--examples/phrasebook/WordsIta.gf2
-rw-r--r--examples/phrasebook/WordsNor.gf2
-rw-r--r--examples/phrasebook/WordsPol.gf18
-rw-r--r--examples/phrasebook/WordsRon.gf6
13 files changed, 50 insertions, 43 deletions
diff --git a/examples/phrasebook/SentencesI.gf b/examples/phrasebook/SentencesI.gf
index be7170a93..f2b76653a 100644
--- a/examples/phrasebook/SentencesI.gf
+++ b/examples/phrasebook/SentencesI.gf
@@ -99,8 +99,10 @@ incomplete concrete SentencesI of Sentences = Numeral **
Too property = mkAP too_AdA (mkAP property) ;
PropQuality property = mkAP property ;
- ThePlace kind = placeNP the_Det kind ;
- APlace kind = placeNP a_Det kind ;
+ ThePlace kind = let dd = if_then_else Det kind.isPl thePl_Det theSg_Det
+ in placeNP dd kind ;
+ APlace kind = let dd = if_then_else Det kind.isPl thePl_Det theSg_Det
+ in placeNP dd kind ;
IMale, IFemale = mkPerson i_Pron ;
YouFamMale, YouFamFemale = mkPerson youSg_Pron ;
@@ -155,12 +157,20 @@ oper
} ;
NPPlace : Type = {name : NP ; at : Adv ; to : Adv} ;
- CNPlace : Type = {name : CN ; at : Prep ; to : Prep} ;
+ CNPlace : Type = {name : CN ; at : Prep ; to : Prep; isPl : Bool} ;
mkCNPlace : CN -> Prep -> Prep -> CNPlace = \p,i,t -> {
name = p ;
at = i ;
- to = t
+ to = t ;
+ isPl = False
+ } ;
+
+ mkCNPlacePl : CN -> Prep -> Prep -> CNPlace = \p,i,t -> {
+ name = p ;
+ at = i ;
+ to = t ;
+ isPl = True
} ;
placeNP : Det -> CNPlace -> NPPlace = \det,kind ->
diff --git a/examples/phrasebook/WordsBul.gf b/examples/phrasebook/WordsBul.gf
index 333a2c8ed..7a453dcc2 100644
--- a/examples/phrasebook/WordsBul.gf
+++ b/examples/phrasebook/WordsBul.gf
@@ -239,10 +239,10 @@ concrete WordsBul of Words = SentencesBul **
(SyntaxBul.mkAdv in_Prep day)
(SyntaxBul.mkAdv in_Prep (mkNP the_Quant plNum (mkCN d))) ;
- mkCompoundPlace : A -> N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \a, n, p ->
+ mkCompoundPlace : A -> N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \a, n, p ->
mkCNPlace (mkCN a n) p to_Prep ;
- mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \n,p ->
+ mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \n,p ->
mkCNPlace (mkCN n) p to_Prep ;
open_AP = mkAP (mkA076 "отворен") ;
diff --git a/examples/phrasebook/WordsCat.gf b/examples/phrasebook/WordsCat.gf
index ebbe99d1f..fb95f04f8 100644
--- a/examples/phrasebook/WordsCat.gf
+++ b/examples/phrasebook/WordsCat.gf
@@ -255,7 +255,7 @@ lin
let day = mkNP (mkPN d)
in mkNPDay day (P.mkAdv ("el" ++ d)) (P.mkAdv ("el" ++ d)) ; ---- ?
- mkPlace : N -> {name : CN ; at : Prep ; to : Prep} = \p ->
+ mkPlace : N -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p ->
mkCNPlace (mkCN p) dative dative ;
mkTransport : N -> {name : CN ; by : Adv} = \n -> {
diff --git a/examples/phrasebook/WordsDan.gf b/examples/phrasebook/WordsDan.gf
index b568b072c..f8bbcb454 100644
--- a/examples/phrasebook/WordsDan.gf
+++ b/examples/phrasebook/WordsDan.gf
@@ -212,17 +212,11 @@ concrete WordsDan of Words = SentencesDan **
-- transports
- HowFar place =
- mkQS (mkQCl far_IAdv (mkCl (mkVP place.to))) ;
- HowFarFrom x y =
- mkQS (mkQCl far_IAdv (mkCl (mkVP (mkVP y.to)
- (SyntaxDan.mkAdv from_Prep x.name)))) ;
+ HowFar place = mkQS (mkQCl long_IAdv (mkCl (mkVP (SyntaxDan.mkAdv to_Prep place.name)))) ;
+ HowFarFrom place x = mkQS (mkQCl long_IAdv (mkCl place.name (SyntaxDan.mkAdv from_Prep x.name))) ;
HowFarFromBy x y t =
- mkQS (mkQCl far_IAdv (mkCl (mkVP (mkVP (mkVP y.to)
- (SyntaxDan.mkAdv from_Prep x.name)) t))) ;
- HowFarBy place t =
- mkQS (mkQCl far_IAdv (mkCl (mkVP (mkVP place.to) t))) ;
-
+ mkQS (mkQCl long_IAdv (mkNP (mkNP y.name (SyntaxDan.mkAdv from_Prep x.name)) t)) ;
+ HowFarBy y t = mkQS (mkQCl long_IAdv (mkNP y.name t)) ;
-- not sure !
WhichTranspPlace trans place =
mkQS (mkQCl (mkIP which_IDet trans.name) (mkVP (mkVP L.go_V) place.to)) ;
@@ -240,7 +234,7 @@ concrete WordsDan of Words = SentencesDan **
mkNPDay day (SyntaxDan.mkAdv on_Prep day)
(SyntaxDan.mkAdv on_Prep (mkNP a_Quant plNum (mkCN (mkN d)))) ;
- mkPlace : N -> Str -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
+ mkPlace : N -> Str -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i ->
mkCNPlace (mkCN p) (mkPrep i) to_Prep ;
open_Adv = ParadigmsDan.mkAdv "åbent" ;
@@ -256,6 +250,7 @@ concrete WordsDan of Words = SentencesDan **
by = SyntaxDan.mkAdv by8means_Prep (mkNP n)
} ;
- far_IAdv : IAdv = ss "hvor langt" ** {lock_IAdv = <>};
+ far_IAdv = ExtraDan.IAdvAdv L.far_Adv ;
+ long_IAdv : IAdv = ss "hvor langt" ** {lock_IAdv = <>};
how8much_IAdv : IAdv = ss "hvad" ** {lock_IAdv = <>};
}
diff --git a/examples/phrasebook/WordsDut.gf b/examples/phrasebook/WordsDut.gf
index eb201e200..25ec1cb28 100644
--- a/examples/phrasebook/WordsDut.gf
+++ b/examples/phrasebook/WordsDut.gf
@@ -246,7 +246,7 @@ ik ga te voet/ ik ga lopend
---- (mkAdv on_Prep (mkNP (P.mkPN d)))
(mkAdv on_Prep (mkNP a_Quant plNum (mkCN (P.mkN d (d + "en") P.utrum)))) ;
- mkPlace : N -> Str -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
+ mkPlace : N -> Str -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i ->
mkCNPlace (mkCN p) (P.mkPrep i) to_Prep ;
open_A = P.mkA "geopend" ;
diff --git a/examples/phrasebook/WordsEng.gf b/examples/phrasebook/WordsEng.gf
index 10d201b06..38db65f62 100644
--- a/examples/phrasebook/WordsEng.gf
+++ b/examples/phrasebook/WordsEng.gf
@@ -233,10 +233,10 @@ concrete WordsEng of Words = SentencesEng **
mkNPDay day (SyntaxEng.mkAdv on_Prep day)
(SyntaxEng.mkAdv on_Prep (mkNP a_Quant plNum (mkCN (mkN d)))) ;
- mkCompoundPlace : Str -> Str -> Str -> {name : CN ; at : Prep ; to : Prep} = \comp, p, i ->
+ mkCompoundPlace : Str -> Str -> Str -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \comp, p, i ->
mkCNPlace (mkCN (P.mkN comp (mkN p))) (P.mkPrep i) to_Prep ;
- mkPlace : Str -> Str -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
+ mkPlace : Str -> Str -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i ->
mkCNPlace (mkCN (mkN p)) (P.mkPrep i) to_Prep ;
open_Adv = P.mkAdv "open" ;
diff --git a/examples/phrasebook/WordsFin.gf b/examples/phrasebook/WordsFin.gf
index b36461c7a..29494ccb2 100644
--- a/examples/phrasebook/WordsFin.gf
+++ b/examples/phrasebook/WordsFin.gf
@@ -58,7 +58,7 @@ concrete WordsFin of Words = SentencesFin **
School = mkPlace (mkN "koulu") lla ;
CitRestaurant cit = {
- name = mkCN cit (mkN "ravintola") ; at = casePrep inessive ; to = casePrep illative
+ name = mkCN cit (mkN "ravintola") ; at = casePrep inessive ; to = casePrep illative; isPl = False
} ;
Parking = mkPlace (mkN "pysäköinti" (mkN "alue")) lla ;
Supermarket = mkPlace (mkN "supermarket") ssa ;
@@ -238,11 +238,12 @@ concrete WordsFin of Words = SentencesFin **
habitual = ParadigmsFin.mkAdv s
} ;
- mkPlace : N -> Bool -> {name : CN ; at : Prep ; to : Prep} = \p,e -> {
+ mkPlace : N -> Bool -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,e -> {
name = mkCN p ;
at = casePrep (if_then_else Case e adessive inessive) ; -- True: external
to = casePrep (if_then_else Case e allative illative) ;
- } ;
+ isPl = False
+ } ;
ssa = False ;
lla = True ;
diff --git a/examples/phrasebook/WordsFre.gf b/examples/phrasebook/WordsFre.gf
index 88d9b7e30..0cfc06753 100644
--- a/examples/phrasebook/WordsFre.gf
+++ b/examples/phrasebook/WordsFre.gf
@@ -68,7 +68,7 @@ lin
Station = mkPlace (mkN "gare") dative ;
Supermarket = mkPlace (mkN "supermarché" masculine) dative ;
Theatre = mkPlace (mkN "théâtre" masculine) dative ;
- Toilet = mkPlace (mkN "toilette") dative ;
+ Toilet = mkCNPlacePl (mkCN (mkN "toilette")) dative dative;
University = mkPlace (mkN "université" feminine) dative ;
Zoo = mkPlace (mkN "zoo" masculine) dative ;
@@ -248,7 +248,7 @@ lin
let day = mkNP (mkPN d) in
mkNPDay day (P.mkAdv d) (P.mkAdv ("le" ++ d)) ;
- mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
+ mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i ->
mkCNPlace (mkCN p) i dative ;
open_A = P.mkA "ouvert" ;
diff --git a/examples/phrasebook/WordsGer.gf b/examples/phrasebook/WordsGer.gf
index ee71366ff..14d7d0780 100644
--- a/examples/phrasebook/WordsGer.gf
+++ b/examples/phrasebook/WordsGer.gf
@@ -234,10 +234,11 @@ CitRestaurant cit = mkCNPlace (mkCN cit (mkN "Restaurant" "Restaurants" neuter)
habitual = ParadigmsGer.mkAdv (d + "s") ----
} ;
- mkPlace : N -> Prep -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,at,to -> {
+ mkPlace : N -> Prep -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,at,to -> {
name = mkCN p ;
at = at ;
- to = to
+ to = to ;
+ isPl = False
} ;
open_Adv = ParadigmsGer.mkAdv "geöffnet" ; ---- Adv to get right word order easily
diff --git a/examples/phrasebook/WordsIta.gf b/examples/phrasebook/WordsIta.gf
index b350642bc..aa31a4fdd 100644
--- a/examples/phrasebook/WordsIta.gf
+++ b/examples/phrasebook/WordsIta.gf
@@ -249,7 +249,7 @@ lin
let day = mkNP (mkPN d) in
mkNPDay day (P.mkAdv d) (P.mkAdv ("di" ++ d)) ; ---- ?
- mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,i ->
+ mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i ->
mkCNPlace (mkCN p) i dative ;
xOf : GNumber -> N -> NPPerson -> NPPerson = \n,x,p -> mkRelative n (mkCN x) p ;
diff --git a/examples/phrasebook/WordsNor.gf b/examples/phrasebook/WordsNor.gf
index 9c63f9d39..25300288d 100644
--- a/examples/phrasebook/WordsNor.gf
+++ b/examples/phrasebook/WordsNor.gf
@@ -238,7 +238,7 @@ concrete WordsNor of Words = SentencesNor **
mkNPDay day (SyntaxNor.mkAdv on_Prep day)
(SyntaxNor.mkAdv on_Prep (mkNP a_Quant plNum (mkCN (mkN d)))) ;
- mkPlace : N -> Str -> Str -> {name : CN ; at : Prep ; to : Prep} = \p,i,t ->
+ mkPlace : N -> Str -> Str -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i,t ->
mkCNPlace (mkCN p) (mkPrep i) (mkPrep t) ;
open_A = mkA "åpen" "åpent";
diff --git a/examples/phrasebook/WordsPol.gf b/examples/phrasebook/WordsPol.gf
index f91ec0894..3f274944f 100644
--- a/examples/phrasebook/WordsPol.gf
+++ b/examples/phrasebook/WordsPol.gf
@@ -105,7 +105,7 @@ concrete WordsPol of Words = SentencesPol **
Zoo = mkPlaceDo "zoo" "zoo" "zoo" Neut ;
CitRestaurant cit = { name=(mkCN cit (mkCN L.restaurant_N));
- at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
+ at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>}; isPl = False };
-- Currencies; $crown$ is ambiguous between Danish and Swedish crowns.
@@ -276,27 +276,27 @@ concrete WordsPol of Words = SentencesPol **
mkA : Adj -> A = \adj -> adj ** { lock_A = <> };
mkPlaceDo = overload {
- mkPlaceDo : N -> {name : CN ; at : Prep ; to : Prep} = \n -> {
- name = mkCN n; at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
- mkPlaceDo : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep} = \nom,gen,loc,g -> {
+ mkPlaceDo : N -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \n -> {
+ name = mkCN n; at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>}; isPl = False };
+ mkPlaceDo : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \nom,gen,loc,g -> {
name = mkCN {
s = table {SF Sg Nom => nom; SF Sg Gen => gen; SF Sg Loc => loc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
- at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>} };
+ at = { s="w"; c=LocPrep; lock_Prep = <> }; to = {s="do"; c=GenPrep; lock_Prep = <>}; isPl = False };
};
mkPlaceNa = overload {
- mkPlaceNa : N -> {name : CN ; at : Prep ; to : Prep} = \n -> {
- name = mkCN n; at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>} };
- mkPlaceNa : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep} = \nom,acc,loc,g -> {
+ mkPlaceNa : N -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \n -> {
+ name = mkCN n; at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>}; isPl = False };
+ mkPlaceNa : Str -> Str -> Str -> Gender -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \nom,acc,loc,g -> {
name = mkCN {
s = table {SF Sg Nom => nom; SF Sg Acc => acc; SF Sg Loc => loc; _ => ["not implemented"]};
g = g;
lock_N=<>
};
- at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>} };
+ at = { s="na"; c=LocPrep; lock_Prep = <> }; to = {s="na"; c=AccPrep; lock_Prep = <>}; isPl = False };
};
mkTransport : Str -> Str -> Gender -> CN = \nom,instr,g -> {
diff --git a/examples/phrasebook/WordsRon.gf b/examples/phrasebook/WordsRon.gf
index 0d3fafc33..4563ff735 100644
--- a/examples/phrasebook/WordsRon.gf
+++ b/examples/phrasebook/WordsRon.gf
@@ -72,7 +72,7 @@ concrete WordsRon of Words = SentencesRon ** open
Toilet = mkPlace (P.mkN "toaletă") at_Prep ;
University = mkPlace (P.mkN "universitate") at_Prep ;
Zoo = {name = mkCN (P.mkA "zoologic") (P.mkN "grădină" "grădini");
- to = to_Prep; at = at_Prep };
+ to = to_Prep; at = at_Prep; isPl = False };
CitRestaurant cit = mkCNPlace (mkCN cit.prop (P.mkN "restaurant" "restaurante")) in_Prep to_Prep;
@@ -257,9 +257,9 @@ mkDay : Str -> {name : NP ; point : Adv ; habitual : Adv} = \d ->
-- auxiliaries
oper
- mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep} = \p,i -> {
+ mkPlace : N -> Prep -> {name : CN ; at : Prep ; to : Prep; isPl : Bool} = \p,i -> {
name = mkCN p ;
- at = i ;
+ at = i ; isPl = False ;
to = to_Prep -- in Romanian, most of the time they would be the same
} ;