Adding another noun paradigm
[apertium.git] / apertium-oc-ca / apertium-oc-ca.oc-ca.t3x
blobad58234353c2ab104b44219a285729e899945f69
1 <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- nxml -*- -->
2 <postchunk>
3 <section-def-cats>
5 <!-- <def-cat n="prep">
6 <cat-item name="pr"/>
7 </def-cat>-->
8 <def-cat n="pr">
9 <cat-item name="a"/>
10 </def-cat>
13 <def-cat n="inf">
14 <cat-item name="inf"/>
15 </def-cat>
17 <def-cat n="nomes">
18 <cat-item name="nomes"/>
19 </def-cat>
20 <def-cat n="pas">
21 <cat-item name="pas"/>
22 </def-cat>
24 <def-cat n="nom">
25 <cat-item name="nom"/>
26 </def-cat>
28 <def-cat n="sn_2e">
29 <cat-item name="det_nom"/>
30 <cat-item name="det_adj"/>
31 </def-cat>
33 <def-cat n="sn_3e">
34 <cat-item name="det_adj_nom"/>
35 <cat-item name="det_nom_adj"/>
36 </def-cat>
38 <def-cat n="sn_4e">
39 <cat-item name="det_adv_adj_nom"/>
40 <cat-item name="det_nom_adv_adj"/>
41 </def-cat>
43 <def-cat n="sn_5e">
44 <cat-item name="det_adj_cnjcoo_adj_nom"/>
45 <cat-item name="det_nom_adj_cnjcoo_adj"/>
46 </def-cat>
48 </section-def-cats>
50 <section-def-attrs>
52 <def-attr n="tprep">
53 <attr-item tags="a"/>
54 <attr-item tags="en"/>
55 <attr-item tags="para"/>
56 </def-attr>
57 <def-attr n="pers">
58 <attr-item tags="p1"/>
59 <attr-item tags="p2"/>
60 <attr-item tags="p3"/>
61 <attr-item tags="PD"/>
62 </def-attr>
64 <def-attr n="gen">
65 <attr-item tags="m"/>
66 <attr-item tags="f"/>
67 <attr-item tags="mf"/>
68 <attr-item tags="GD"/>
69 <attr-item tags="nt"/>
70 </def-attr>
72 <def-attr n="nbr">
73 <attr-item tags="sg"/>
74 <attr-item tags="pl"/>
75 <attr-item tags="sp"/>
76 <attr-item tags="ND"/>
77 </def-attr>
79 <def-attr n="determinant">
80 <attr-item tags="treu_det"/>
81 </def-attr>
83 <def-attr n="a_SN">
84 <attr-item tags="DET"/>
85 <attr-item tags="UNDET"/>
86 <attr-item tags="NUM"/>
87 <attr-item tags="PDET"/><!--'Per determinar', per a SN UNDET que han de passar a determinats, transformaci?que far?el postchunk detectant els PDET. -->
88 </def-attr>
91 <def-attr n="a_verb">
92 <attr-item tags="vblex"/>
93 <attr-item tags="vblex.pron"/>
94 <attr-item tags="vbhaver"/>
95 <attr-item tags="vbser"/>
96 <attr-item tags="vbmod"/>
97 <attr-item tags="HAVER"/>
98 </def-attr>
100 <def-attr n="a_nom">
101 <attr-item tags="n"/>
102 <attr-item tags="np"/>
103 </def-attr>
105 <def-attr n="a_np">
106 <attr-item tags="np.ant"/>
107 <attr-item tags="np.cog"/>
108 <attr-item tags="np.al"/>
109 </def-attr>
111 <def-attr n="a_prnpro">
112 <attr-item tags="prn.pro"/>
113 </def-attr>
115 <def-attr n="a_pr">
116 <attr-item tags="pr"/>
117 </def-attr>
118 <def-attr n="a_adv">
119 <attr-item tags="adv"/>
120 </def-attr>
122 </section-def-attrs>
123 <section-def-vars>
124 <def-var n="paraula"/>
125 </section-def-vars>
128 <section-def-macros>
130 <def-macro n="f_bcond" npar="1">
131 <choose>
132 <when>
133 <test>
134 <not>
135 <equal>
136 <b pos="1"/>
137 <lit v=" "/>
138 </equal>
139 </not>
140 </test>
141 <out>
142 <b pos="1"/>
143 </out>
144 </when>
145 </choose>
146 </def-macro>
148 </section-def-macros>
150 <section-rules>
153 <rule comment="CHUNK:">
154 <pattern>
155 <pattern-item n="nom"/>
156 </pattern>
157 <action>
158 <out>
159 <lu>
160 <clip pos="1" part="whole"/>
161 </lu>
162 </out>
163 </action>
164 </rule>
166 <rule comment="converteix no en només, si cal">
167 <pattern>
168 <pattern-item n="nomes"/>
169 </pattern>
170 <action>
171 <out>
172 <lu>
173 <get-case-from pos="1">
174 <lit v="només"/>
175 </get-case-from>
176 <clip pos="1" part="a_adv"/>
177 </lu>
178 </out>
179 </action>
180 </rule>
181 <rule comment="converteix no en pas, si cal">
182 <pattern>
183 <pattern-item n="pas"/>
184 </pattern>
185 <action>
186 <out>
187 <lu>
188 <get-case-from pos="1">
189 <lit v="pas"/>
190 </get-case-from>
191 <clip pos="1" part="a_adv"/>
192 </lu>
193 </out>
194 </action>
195 </rule>
197 <!-- <rule comment="fa els canvis de prepo">
198 <pattern>
199 <pattern-item n="prep"/>
200 </pattern>
201 <action>
202 <choose>
203 <when>
204 <test>
205 <equal>
206 <clip pos="0" part="tprep"/>
207 <lit-tag v="a"/>
208 </equal>
209 </test>
210 <let>
211 <clip pos="1" part="lem"/>
212 <lit v="a"/>
213 </let>
214 </when>
215 <when>
216 <test>
217 <equal>
218 <clip pos="0" part="tprep"/>
219 <lit-tag v="en"/>
220 </equal>
221 </test>
222 <let>
223 <clip pos="1" part="lem"/>
224 <lit v="en"/>
225 </let>
226 </when>
228 </choose>
229 <out>
230 <lu>
231 <clip pos="1" part="lem"/>
232 <clip pos="1" part="a_pr"/>
233 </lu>
234 </out>
235 </action>
236 </rule> -->
238 <rule comment="treu el det 2elem">
239 <pattern>
240 <pattern-item n="sn_2e"/>
241 </pattern>
242 <action>
243 <choose>
244 <when>
245 <test>
246 <equal>
247 <clip pos="0" part="determinant"/>
248 <lit-tag v="treu_det"/>
249 </equal>
250 </test>
251 <out>
252 <lu>
253 <clip pos="2" part="whole"/>
254 </lu>
255 </out>
256 <call-macro n="f_bcond">
257 <with-param pos="1"/>
258 </call-macro>
259 </when>
260 <otherwise>
261 <out>
262 <lu>
263 <clip pos="1" part="whole"/>
264 </lu>
265 <b pos="1"/>
266 <lu>
267 <clip pos="2" part="whole"/>
268 </lu>
269 </out>
270 </otherwise>
271 </choose>
272 </action>
273 </rule>
275 <rule comment="treu el det 3 elem">
276 <pattern>
277 <pattern-item n="sn_3e"/>
278 </pattern>
279 <action>
280 <choose>
281 <when>
282 <test>
283 <equal>
284 <clip pos="0" part="determinant"/>
285 <lit-tag v="treu_det"/>
286 </equal>
287 </test>
288 <call-macro n="f_bcond">
289 <with-param pos="1"/>
290 </call-macro>
291 <out>
292 <lu>
293 <clip pos="2" part="whole"/>
294 </lu>
295 <b pos="2"/>
296 <lu>
297 <clip pos="3" part="whole"/>
298 </lu>
300 </out>
301 </when>
302 <otherwise>
303 <out>
304 <lu>
305 <clip pos="1" part="whole"/>
306 </lu>
307 <b pos="1"/>
308 <lu>
309 <clip pos="2" part="whole"/>
310 </lu>
311 <b pos="2"/>
312 <lu>
313 <clip pos="3" part="whole"/>
314 </lu>
315 </out>
316 </otherwise>
317 </choose>
318 </action>
319 </rule>
321 <rule comment="treu el det 4 elem">
322 <pattern>
323 <pattern-item n="sn_4e"/>
324 </pattern>
325 <action>
326 <choose>
327 <when>
328 <test>
329 <equal>
330 <clip pos="0" part="determinant"/>
331 <lit-tag v="treu_det"/>
332 </equal>
333 </test>
334 <call-macro n="f_bcond">
335 <with-param pos="1"/>
336 </call-macro>
337 <out>
338 <lu>
339 <clip pos="2" part="whole"/>
340 </lu>
341 <b pos="2"/>
342 <lu>
343 <clip pos="3" part="whole"/>
344 </lu>
345 <b pos="3"/>
346 <lu>
347 <clip pos="4" part="whole"/>
348 </lu>
349 </out>
350 </when>
351 <otherwise>
352 <out>
353 <lu>
354 <clip pos="1" part="whole"/>
355 </lu>
356 <b pos="1"/>
357 <lu>
358 <clip pos="2" part="whole"/>
359 </lu>
360 <b pos="2"/>
361 <lu>
362 <clip pos="3" part="whole"/>
363 </lu>
364 <b pos="3"/>
365 <lu>
366 <clip pos="4" part="whole"/>
367 </lu>
368 </out>
369 </otherwise>
370 </choose>
371 </action>
372 </rule>
374 <rule comment="treu el det 5 elem">
375 <pattern>
376 <pattern-item n="sn_5e"/>
377 </pattern>
378 <action>
379 <choose>
380 <when>
381 <test>
382 <equal>
383 <clip pos="0" part="determinant"/>
384 <lit-tag v="treu_det"/>
385 </equal>
386 </test>
387 <call-macro n="f_bcond">
388 <with-param pos="1"/>
389 </call-macro>
390 <out>
391 <lu>
392 <clip pos="2" part="whole"/>
393 </lu>
394 <b pos="2"/>
395 <lu>
396 <clip pos="3" part="whole"/>
397 </lu>
398 <b pos="3"/>
399 <lu>
400 <clip pos="4" part="whole"/>
401 </lu>
402 <b pos="4"/>
403 <lu>
404 <clip pos="5" part="whole"/>
405 </lu>
406 </out>
407 </when>
408 <otherwise>
409 <out>
410 <lu>
411 <clip pos="1" part="whole"/>
412 </lu>
413 <b pos="1"/>
414 <lu>
415 <clip pos="2" part="whole"/>
416 </lu>
417 <b pos="2"/>
418 <lu>
419 <clip pos="3" part="whole"/>
420 </lu>
421 <b pos="3"/>
422 <lu>
423 <clip pos="4" part="whole"/>
424 </lu>
425 <b pos="4"/>
426 <lu>
427 <clip pos="5" part="whole"/>
428 </lu>
429 </out>
430 </otherwise>
431 </choose>
432 </action>
433 </rule>
435 <rule comment="CHUNK: canvia les prepos que fa falta">
436 <pattern>
437 <pattern-item n="pr"/>
438 </pattern>
439 <action>
440 <choose>
441 <when>
442 <test>
443 <equal>
444 <clip pos="1" part="lem"/>
445 <lit v="en"/>
446 </equal>
447 </test>
448 <let>
449 <clip pos="1" part="lem"/>
450 <lit v="a"/>
451 </let>
452 </when>
453 </choose>
454 <out>
455 <lu>
456 <clip pos="1" part="whole"/>
457 </lu>
458 </out>
459 </action>
460 </rule>
462 </section-rules>
463 </postchunk>