-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheng-spa.rtx
154 lines (137 loc) · 4.86 KB
/
eng-spa.rtx
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
! RULES TODO
! t1x 6408, 6852, 11368, 14368, 14489, 14704
n: _.gender.number;
np: _.np_type.gender.number;
adj: _.gender.number;
num: _.gender.number;
NOM:: _.number.gender;
NA:: _.number.gender;
AP:: _.gender.number.mode;
monthdate:: _;
caldate:: _;
date:: _;
PP:: _;
cnjcoo: _;
CONJ:: _;
age:: _;
NP:: _.number.gender.person;
DP:: _.number.gender.person.definite;
VERB:: _.temps.person.number;
pr: _;
adv: _.adv_type;
cm: _;
weekday:: _;
apos: _;
AGE:: _;
preadv: _;
predet: _;
vbaux: _.temps.person.number;
vbhaver: _.temps.person.number;
vaux: _.temps.person.number;
vbdo: _.temps.person.number;
vbser: _.temps.person.number;
vbmod: _.temps.person.number;
rel: _.rel_type.gender.number;
prn_impers_lem = todo cualquiera;
prn_impers: _.prn_type.gender.number;
prn_pers: _.prn_type.person.gender.number;
prn: (if (1.prn_type/sl = subj)
[]
if (1.lem/tl in prn_impers_lem)
1(prn_impers)
else
1(prn_pers));
det: _.det_type.gender.number;
number = (ND sg) sg pl @sp ND ;
gender = (GD m) m f @mf GD ;
mode = comp sup pos sint num ;
definite = (DD ind) ind def DD ;
person = (PD p3) p1 p2 p3;
det_type = dem pos qnt itg org [definite] ;
np_type = act loc ant cog al;
prn_type = tn subj;
adv_type = itg;
rel_type = nn;
should_have_det = empleado equipamiento información;
temps = cni fti ifi imp pii pis inf prs pres past pri pp ger pprs subs;
vb_no_pers: _.temps;
vb_gen_num: _.temps.gender.number;
vb_pers: _.temps.person.number;
vblex: (if ((1.temps = inf) or (1.temps = ger)) 1(vb_no_pers)
if (1.temps/tl = pp) 1(vb_gen_num)
if (1.temps = past) 1(vb_pers)[temps=ifi]
if (1.temps = pres) 1(vb_pers)[temps=pri]
else 1(vb_pers));
vbser: (always 1(vblex));
NP -> n.$number/sl.$gender/tl.$lem/sl {1} |
np.$number/tl.$gender/tl.$lem/tl {1} |
3: adj n n.$gender/tl.$number/tl {3 _1 de@pr _ 2 _2 1[gender=2.gender, number=2.number]} |
2: adj n.$lem/tl.$number/tl.$gender/tl {2 _1 1[gender=2.gender, number=2.number]} |
1: adj %NP.$lem/tl.$number.$gender/tl {2 _1 1[gender=2.gender, number=2.number]} |
1: n %np.$gender.number {1 _1 2} |
7: n n.$gender/tl.$number/tl {2 _1 de@pr _ 1} |
n n n {3 _ de@pr _2 2 _ de@pr _1 1} |
np %n {2 _ de@pr _1 1} |
NP %NP.$lem/tl.$number.gender/tl {2 _1 de@pr _ 1} |
%NP VP.ger {1 _ que@rel.an.mf.sp _1 2[temps=pri, person=p3, number=$number]} |
num guio year@DP guio old@adj %n
{ 6 _5 de@pr _ 1 _ (if (1.lem/sl = one) 3[number=sg]
else 3[number=pl]) } |
num %NP { 1 _1 2 } |
%NP PP { 1 _1 2 } |
NP cnjcoo %NP { 1 _1 2 _2 3 } |
NP cm %NP { 1 _1 2 _2 3 } |
adj n %n { 3 _2 de@pr _ 2 _1 1[gender=2.gender, number=2.number] } |
10: NP %NP { 2 _1 de@pr _ 1 } ;
DP -> %NP.$number/tl.$lem [$person=p3]
{(if ((1.lem/tl incl should_have_det) or ($definite = def))
[el@det.def.[1.gender/tl].[1.number/tl] _])
1} |
det NP.$number [$person=p3] {1[number=2.number/tl, gender=2.gender/tl] _1 2} |
%prn {%1} |
3: all@prn of@pr rel [$person=p3, $number=pl]
{1[person=_, number=1.number/tl] _1 2 _2 3[number=pl, gender=1.gender]} |
DP gen DP.$number.$person {3[definite=def] _1 de@pr _2 1} ;
cnjsub: _;
PP -> pr DP {1 _1 2} |
cnjsub VP {1 _1 (if (2.temps = past)
2[temps=cni]
else
2[temps=pri])} |
to@pr VP.inf {para@pr _1 2} |
to@pr VP.ger {1 _1 2[temps=inf]} ;
prn_enc: _.<enc>.person.gender.number;
ser_to_estar: (if ((1.temps = pres) or (1.temps = pri))
estar@vblex.pri.[1.person].[1.number]
else estar@vblex.[1.temps]);
VP: _.temps.person.number.gender;
VP -> %vblex {%1} |
!%vbser {%1} |
!7: %vblex.inf prn.obj [$temps=inf, $person=PD, $number=ND]
! {1 + 2(prn_enc)} |
adv %VP {1 _1 %2} |
%vbdo not@adv VP.inf
{2 _2 %3} |
20: %vbser VP.pp
{1(ser_to_estar)[temps=$temps, person=$person, number=$number] _1 2[number=$number, gender=$gender]} |
20: %vbser VP.ger
{1(ser_to_estar)[temps=$temps, person=$person, number=$number] _1 2[number=$number, gender=$gender]} |
%vaux VP.inf
{1[temps=$temps, person=$person, number=$number] _1 2[number=$number, gender=$gender]} |
4: %vaux adv VP.inf
{2 _2 1[temps=$temps, person=$person, number=$number] _1 3[gender=$gender, number=$number]} ;
temps > temps: pres pri;
S: _;
S -> DP VP {1 _1 2[person=1.person, number=1.number, gender=1.gender]} ;
!FALLBACK: _;
!NO_EXISTE: _;
!FALLBACK -> adj {1} |
! gen {} |
! det {1(number=1.number/tl)} |
! PP {1} |
! VP NO_EXISTE {1 _1 2} |
! S NO_EXISTE {1 _1 2} |
! FALLBACK NO_EXISTE {1 _1 2};
FALLBACK: _;
NE: _;
FALLBACK -> adj {1} | det {1[number=1.number/tl]};