1
0
forked from GitHub/gf-core

added inherent number to places, fixed places in French

This commit is contained in:
ramona.enache
2010-05-28 12:15:28 +00:00
parent 4c8dfaf3ce
commit 7a96cfc1b6
13 changed files with 50 additions and 43 deletions

View File

@@ -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 ->

View File

@@ -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 "отворен") ;

View File

@@ -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 -> {

View File

@@ -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 = <>};
}

View File

@@ -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" ;

View File

@@ -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" ;

View File

@@ -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 ;

View File

@@ -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" ;

View File

@@ -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

View File

@@ -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 ;

View File

@@ -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";

View File

@@ -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 -> {

View File

@@ -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
} ;