-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSentencesRon.gf
71 lines (58 loc) · 2.8 KB
/
SentencesRon.gf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
concrete SentencesRon of Sentences = NumeralRon ** SentencesI - [
IsMass,
IFemale, YouFamFemale, YouPolFemale, IMale, YouFamMale, YouPolMale,
ThePlace, Nationality, CitiNat, Citizenship, ACitizen, PCitizenship, PropCit
]
with
(Syntax = SyntaxRon),
(Symbolic = SymbolicRon),
(Lexicon = LexiconRon) **
open SyntaxRon, ExtraRon, (R = ResRon), (P = ParamX), (PR = ParadigmsRon) in {
oper
NPNationalityRon : Type = {lang : NP ;
country : NP ;
propObj : A;
propPers : R.Gender => P.Number => Str};
CitizenshipRon : Type = {pers : R.Gender => P.Number => Str;
prop : A};
mkNPNationalityRon : NP -> NP -> A -> Str -> Str -> Str -> Str -> NPNationalityRon = \la,co,pro, s1,s2,s3,s4 ->
{lang = la ;
country = co ;
propObj = pro ;
propPers = mkCitiPers s1 s2 s3 s4
} ;
mkCitizenshipRon : A -> Str -> Str -> Str -> Str -> CitizenshipRon = \aobj, ap1, ap2, ap3, ap4 -> {pers = mkCitiPers ap1 ap2 ap3 ap4; prop = aobj};
mkCitiPers : Str -> Str -> Str -> Str -> (R.Gender => P.Number => Str) = \francez, franceza, francezi, franceze ->
table {R.Masc => table {P.Sg => francez;
P.Pl => francezi};
R.Fem => table {P.Sg => franceza;
P.Pl => franceze}};
lincat
Nationality = NPNationalityRon ;
Citizenship = CitizenshipRon ;
lin
IsMass m q = mkCl (mkNP the_Det m) q ; -- le vin allemand est bon
IFemale = {name = mkNP i8fem_Pron ; isPron = True ; poss = mkQuant i_Pron} ;
YouFamFemale = {name = mkNP youSg8fem_Pron ; isPron = True ; poss = mkQuant youSg_Pron} ;
YouPolFemale = {name = mkNP youPol8fem_Pron ; isPron = True ; poss = mkQuant youPol_Pron};
IMale = {name = mkNP i_Pron ; isPron = True ; poss = mkQuant i_Pron} ;
YouFamMale = {name = mkNP youSg_Pron ; isPron = True ; poss = mkQuant youSg_Pron} ;
YouPolMale = {name = mkNP youPol_Pron ; isPron = True ; poss = mkQuant youPol_Pron} ;
ThePlace kind = let name : NP = mkNP the_Quant kind.name ;
condAt : Bool = needIndefPlace kind.name kind.at ;
condTo : Bool = needIndefPlace kind.name kind.to in {
name = name ;
at = if_then_else Adv condAt (mkAdv kind.at (mkNP the_Art kind.name)) (mkAdv kind.at name);
to = if_then_else Adv condTo (mkAdv kind.at (mkNP the_Art kind.name)) (mkAdv kind.to name)
} ;
CitiNat n = {pers = n.propPers; prop = n.propObj} ;
ACitizen p n = mkCl p.name (PR.mkAdv (n.pers ! (p.name.a.g) ! (p.name.a.n))) ;
PCitizenship x = mkPhrase (mkUtt (mkAP x.prop)) ;
PropCit p = p.prop ;
oper needIndefPlace : CN -> Prep -> Bool = \cn,prep ->
case <cn.isComp,prep.needIndef> of
{<True,_> => True ;
<False,True> => False ;
_ => True
};
}