Adding a bit
[apertium.git] / apertium-sh-mk / apertium-sh-mk.mk-sh.t1x
blob12c3d7db8b6b650abd2c27b65289be54b738b4be
1 <?xml version="1.0" encoding="utf-8"?>
2 <transfer default="chunk">
4 <section-def-cats>
5 <def-cat n="nom">
6 <cat-item tags="n.*"/>
7 <cat-item tags="np.*"/>
8 </def-cat>
9 <def-cat n="vblex">
10 <cat-item tags="vblex.*"/>
11 <cat-item tags="vbser.*"/>
12 </def-cat>
13 <def-cat n="prn-pers">
14 <cat-item tags="prn.p1.*"/>
15 <cat-item tags="prn.p2.*"/>
16 <cat-item tags="prn.p3.*"/>
17 </def-cat>
18 <def-cat n="prn">
19 <cat-item tags="prn.*"/>
20 </def-cat>
21 <def-cat n="num">
22 <cat-item tags="num.*"/>
23 </def-cat>
24 <def-cat n="cnjcoo">
25 <cat-item tags="cnjcoo"/>
26 </def-cat>
27 <def-cat n="pr">
28 <cat-item tags="pr"/>
29 </def-cat>
30 <def-cat n="adj">
31 <cat-item tags="adj.*"/>
32 </def-cat>
33 <def-cat n="det">
34 <cat-item tags="det"/>
35 <cat-item tags="det.*"/>
36 </def-cat>
37 <def-cat n="prefix-adj">
38 <cat-item tags="pref.adj"/>
39 <cat-item tags="pref.adj.*"/>
40 </def-cat>
41 </section-def-cats>
43 <section-def-attrs>
44 <def-attr n="a_nom">
45 <attr-item tags="n"/>
46 <attr-item tags="np"/>
47 <attr-item tags="np.ant"/>
48 <attr-item tags="np.top"/>
49 </def-attr>
51 <def-attr n="a_num">
52 <attr-item tags="num"/>
53 </def-attr>
55 <def-attr n="a_prp">
56 <attr-item tags="pr"/>
57 </def-attr>
59 <def-attr n="a_vrb">
60 <attr-item tags="vblex"/>
61 <attr-item tags="vbmod"/>
62 <attr-item tags="vbser"/>
63 <attr-item tags="vbhaver"/>
64 </def-attr>
66 <def-attr n="a_adj">
67 <attr-item tags="adj"/>
68 <attr-item tags="adj.pve"/>
69 <attr-item tags="adj.comp"/>
70 <attr-item tags="adj.sup"/>
71 <attr-item tags="adj.itg"/>
72 </def-attr>
74 <def-attr n="a_prn">
75 <attr-item tags="prn"/>
76 <attr-item tags="prn.dem"/>
77 <attr-item tags="prn.itg"/>
78 </def-attr>
80 <def-attr n="gen">
81 <attr-item tags="m"/>
82 <attr-item tags="f"/>
83 <attr-item tags="nt"/>
84 <attr-item tags="mf"/>
85 </def-attr>
87 <def-attr n="tns">
88 <attr-item tags="pri"/>
89 <attr-item tags="pii"/>
90 <attr-item tags="imp"/>
91 <attr-item tags="aor"/>
92 <attr-item tags="fti"/>
93 <attr-item tags="past"/>
94 </def-attr>
96 <def-attr n="prs">
97 <attr-item tags="p1"/>
98 <attr-item tags="p2"/>
99 <attr-item tags="p3"/>
100 </def-attr>
102 <def-attr n="nbr">
103 <attr-item tags="sp"/>
104 <attr-item tags="sg"/>
105 <attr-item tags="pl"/>
106 </def-attr>
108 <def-attr n="cas">
109 <attr-item tags="nom"/>
110 <attr-item tags="acc"/>
111 <attr-item tags="dat"/>
112 <attr-item tags="gen"/>
113 <attr-item tags="loc"/>
114 <attr-item tags="ins"/>
115 <attr-item tags="voc"/>
116 </def-attr>
118 </section-def-attrs>
120 <section-def-vars>
121 <def-var n="number"/>
122 <def-var n="genere"/>
123 <def-var n="motion"/> <!-- We set this to motion if there is a verb, and unset it if there is a noun -->
124 </section-def-vars>
126 <section-rules>
128 <!-- Sintagmas nominales -->
130 <rule>
131 <pattern>
132 <pattern-item n="prn-pers"/>
133 </pattern>
134 <action>
135 <out>
136 <chunk name="prn" case="caseFirstWord">
137 <tags>
138 <tag><lit-tag v="SN"/></tag>
139 <tag><clip pos="1" side="tl" part="prs"/></tag>
140 <tag><clip pos="1" side="tl" part="gen"/></tag>
141 <tag><clip pos="1" side="tl" part="nbr"/></tag>
142 <tag><lit-tag v="nom"/></tag>
143 </tags>
144 <lu>
145 <clip pos="1" side="tl" part="lem"/>
146 <clip pos="1" side="tl" part="a_prn"/>
147 <clip pos="1" side="tl" part="prs" link-to="2"/>
148 <clip pos="1" side="tl" part="gen" link-to="3"/>
149 <clip pos="1" side="tl" part="nbr" link-to="4"/>
150 <lit-tag v="5"/>
151 </lu>
152 </chunk>
153 </out>
154 </action>
155 </rule>
158 <rule>
159 <pattern>
160 <pattern-item n="prn"/>
161 </pattern>
162 <action>
163 <out>
164 <chunk name="prn" case="caseFirstWord">
165 <tags>
166 <tag><lit-tag v="SN"/></tag>
167 <tag><clip pos="1" side="tl" part="gen"/></tag>
168 <tag><clip pos="1" side="tl" part="nbr"/></tag>
169 <tag><lit-tag v="nom"/></tag>
170 </tags>
171 <lu>
172 <clip pos="1" side="tl" part="lem"/>
173 <clip pos="1" side="tl" part="a_prn"/>
174 <clip pos="1" side="tl" part="gen" link-to="2"/>
175 <clip pos="1" side="tl" part="nbr" link-to="3"/>
176 <lit-tag v="4"/>
177 </lu>
178 </chunk>
179 </out>
180 </action>
181 </rule>
183 <rule>
184 <pattern>
185 <pattern-item n="nom"/>
186 </pattern>
187 <action>
188 <out>
189 <chunk name="nom" case="caseFirstWord">
190 <tags>
191 <tag><lit-tag v="SN"/></tag>
192 <tag><clip pos="1" side="tl" part="gen"/></tag>
193 <tag><clip pos="1" side="tl" part="nbr"/></tag>
194 <tag><lit-tag v="nom"/></tag>
195 </tags>
196 <lu>
197 <clip pos="1" side="tl" part="lem"/>
198 <clip pos="1" side="tl" part="a_nom"/>
199 <clip pos="1" side="tl" part="gen" link-to="2"/>
200 <clip pos="1" side="tl" part="nbr" link-to="3"/>
201 <lit-tag v="4"/>
202 </lu>
203 </chunk>
204 </out>
205 <let>
206 <var n="motion"/>
207 <lit v="false"/>
208 </let>
209 </action>
210 </rule>
212 <rule>
213 <pattern>
214 <pattern-item n="nom"/>
215 <pattern-item n="det"/>
216 </pattern>
217 <action>
218 <out>
219 <chunk name="nom" case="caseFirstWord">
220 <tags>
221 <tag><lit-tag v="SN"/></tag>
222 <tag><clip pos="1" side="tl" part="gen"/></tag>
223 <tag><clip pos="1" side="tl" part="nbr"/></tag>
224 <tag><lit-tag v="nom"/></tag>
225 </tags>
226 <lu>
227 <clip pos="1" side="tl" part="lem"/>
228 <clip pos="1" side="tl" part="a_nom"/>
229 <clip pos="1" side="tl" part="gen" link-to="2"/>
230 <clip pos="1" side="tl" part="nbr" link-to="3"/>
231 <lit-tag v="4"/>
232 </lu>
233 </chunk>
234 </out>
235 <let>
236 <var n="motion"/>
237 <lit v="false"/>
238 </let>
239 </action>
240 </rule>
243 <rule>
244 <pattern>
245 <pattern-item n="adj"/>
246 <pattern-item n="nom"/>
247 </pattern>
248 <action>
249 <out>
250 <chunk name="adj_nom" case="caseFirstWord">
251 <tags>
252 <tag><lit-tag v="SN"/></tag>
253 <tag><clip pos="2" side="tl" part="gen"/></tag>
254 <tag><clip pos="2" side="tl" part="nbr"/></tag>
255 <tag><lit-tag v="nom"/></tag>
256 </tags>
257 <lu>
258 <clip pos="1" side="tl" part="lem"/>
259 <clip pos="1" side="tl" part="a_adj"/>
260 <clip pos="2" side="tl" part="gen" link-to="2"/>
261 <clip pos="2" side="tl" part="nbr" link-to="3"/>
262 <lit-tag v="4"/>
263 </lu>
264 <b/>
265 <lu>
266 <clip pos="2" side="tl" part="lem"/>
267 <clip pos="2" side="tl" part="a_nom"/>
268 <clip pos="2" side="tl" part="gen" link-to="2"/>
269 <clip pos="2" side="tl" part="nbr" link-to="3"/>
270 <lit-tag v="4"/>
271 </lu>
272 </chunk>
273 </out>
274 <let>
275 <var n="motion"/>
276 <lit v="false"/>
277 </let>
278 </action>
279 </rule>
281 <rule>
282 <pattern>
283 <pattern-item n="adj"/>
284 <pattern-item n="det"/>
285 <pattern-item n="nom"/>
286 </pattern>
287 <action>
288 <out>
289 <chunk name="adj_nom" case="caseFirstWord">
290 <tags>
291 <tag><lit-tag v="SN"/></tag>
292 <tag><clip pos="3" side="tl" part="gen"/></tag>
293 <tag><clip pos="3" side="tl" part="nbr"/></tag>
294 <tag><lit-tag v="nom"/></tag>
295 </tags>
296 <lu>
297 <clip pos="1" side="tl" part="lem"/>
298 <clip pos="1" side="tl" part="a_adj"/>
299 <clip pos="3" side="tl" part="gen" link-to="2"/>
300 <clip pos="3" side="tl" part="nbr" link-to="3"/>
301 <lit-tag v="4"/>
302 </lu>
303 <b/>
304 <lu>
305 <clip pos="3" side="tl" part="lem"/>
306 <clip pos="3" side="tl" part="a_nom"/>
307 <clip pos="3" side="tl" part="gen" link-to="2"/>
308 <clip pos="3" side="tl" part="nbr" link-to="3"/>
309 <lit-tag v="4"/>
310 </lu>
311 </chunk>
312 </out>
313 <let>
314 <var n="motion"/>
315 <lit v="false"/>
316 </let>
317 </action>
318 </rule>
320 <rule>
321 <pattern>
322 <pattern-item n="adj"/>
323 <pattern-item n="adj"/>
324 <pattern-item n="nom"/>
325 </pattern>
326 <action>
327 <out>
328 <chunk name="adj_adj_nom" case="caseFirstWord">
329 <tags>
330 <tag><lit-tag v="SN"/></tag>
331 <tag><clip pos="3" side="tl" part="gen"/></tag>
332 <tag><clip pos="3" side="tl" part="nbr"/></tag>
333 <tag><lit-tag v="nom"/></tag>
334 </tags>
335 <lu>
336 <clip pos="1" side="tl" part="lem"/>
337 <clip pos="1" side="tl" part="a_adj"/>
338 <clip pos="3" side="tl" part="gen" link-to="2"/>
339 <clip pos="3" side="tl" part="nbr" link-to="3"/>
340 <lit-tag v="4"/>
341 </lu>
342 <b/>
343 <lu>
344 <clip pos="2" side="tl" part="lem"/>
345 <clip pos="2" side="tl" part="a_adj"/>
346 <clip pos="3" side="tl" part="gen" link-to="2"/>
347 <clip pos="3" side="tl" part="nbr" link-to="3"/>
348 <lit-tag v="4"/>
349 </lu>
350 <b/>
351 <lu>
352 <clip pos="3" side="tl" part="lem"/>
353 <clip pos="3" side="tl" part="a_nom"/>
354 <clip pos="3" side="tl" part="gen" link-to="2"/>
355 <clip pos="3" side="tl" part="nbr" link-to="3"/>
356 <lit-tag v="4"/>
357 </lu>
358 </chunk>
359 </out>
360 <let>
361 <var n="motion"/>
362 <lit v="false"/>
363 </let>
364 </action>
365 </rule>
367 <rule>
368 <pattern>
369 <pattern-item n="adj"/>
370 <pattern-item n="det"/>
371 <pattern-item n="adj"/>
372 <pattern-item n="nom"/>
373 </pattern>
374 <action>
375 <out>
376 <chunk name="adj_adj_nom" case="caseFirstWord">
377 <tags>
378 <tag><lit-tag v="SN"/></tag>
379 <tag><clip pos="4" side="tl" part="gen"/></tag>
380 <tag><clip pos="4" side="tl" part="nbr"/></tag>
381 <tag><lit-tag v="nom"/></tag>
382 </tags>
383 <lu>
384 <clip pos="1" side="tl" part="lem"/>
385 <clip pos="1" side="tl" part="a_adj"/>
386 <clip pos="4" side="tl" part="gen" link-to="2"/>
387 <clip pos="4" side="tl" part="nbr" link-to="3"/>
388 <lit-tag v="4"/>
389 </lu>
390 <b/>
391 <lu>
392 <clip pos="3" side="tl" part="lem"/>
393 <clip pos="3" side="tl" part="a_adj"/>
394 <clip pos="4" side="tl" part="gen" link-to="2"/>
395 <clip pos="4" side="tl" part="nbr" link-to="3"/>
396 <lit-tag v="4"/>
397 </lu>
398 <b/>
399 <lu>
400 <clip pos="4" side="tl" part="lem"/>
401 <clip pos="4" side="tl" part="a_nom"/>
402 <clip pos="4" side="tl" part="gen" link-to="2"/>
403 <clip pos="4" side="tl" part="nbr" link-to="3"/>
404 <lit-tag v="4"/>
405 </lu>
406 </chunk>
407 </out>
408 <let>
409 <var n="motion"/>
410 <lit v="false"/>
411 </let>
412 </action>
413 </rule>
415 <!-- Sintagmas adjetivos -->
417 <rule>
418 <pattern>
419 <pattern-item n="prefix-adj"/>
420 <pattern-item n="adj"/>
421 </pattern>
422 <action>
423 <choose>
424 <!-- When the adjective is in the superlative
425 prefix with naj~ -->
426 <when>
427 <test>
428 <and>
429 <equal>
430 <clip pos="1" side="sl" part="lem"/>
431 <lit v="нај"/>
432 </equal>
433 <equal>
434 <clip pos="1" side="sl" part="a_adj"/>
435 <lit-tag v="adj.sup"/>
436 </equal>
437 </and>
438 </test>
439 <out>
440 <chunk name="adj" case="caseFirstWord">
441 <tags>
442 <tag><lit-tag v="SA"/></tag>
443 <tag><clip pos="2" side="tl" part="gen"/></tag>
444 <tag><clip pos="2" side="tl" part="nbr"/></tag>
445 <tag><lit-tag v="nom"/></tag>
446 </tags>
447 <lu>
448 <lit v="naj"/>
449 </lu>
450 <lu>
451 <clip pos="2" side="tl" part="lem"/>
452 <lit-tag v="adj.comp"/>
453 <clip pos="2" side="tl" part="gen"/>
454 <clip pos="2" side="tl" part="nbr"/>
455 <lit-tag v="nom"/>
456 </lu>
457 </chunk>
458 </out>
459 </when>
460 <otherwise>
461 <out>
462 <chunk name="adj" case="caseFirstWord">
463 <tags>
464 <tag><lit-tag v="SA"/></tag>
465 <tag><clip pos="2" side="tl" part="gen"/></tag>
466 <tag><clip pos="2" side="tl" part="nbr"/></tag>
467 <tag><lit-tag v="nom"/></tag>
468 </tags>
469 <lu>
470 <clip pos="2" side="tl" part="lem"/>
471 <clip pos="1" side="tl" part="a_adj"/>
472 <clip pos="2" side="tl" part="gen"/>
473 <clip pos="2" side="tl" part="nbr"/>
474 <lit-tag v="nom"/>
475 </lu>
476 </chunk>
477 </out>
478 </otherwise>
479 </choose>
480 </action>
481 </rule>
483 <!-- Sintagmas verbales -->
485 <rule>
486 <pattern>
487 <pattern-item n="vblex"/>
488 </pattern>
489 <action>
490 <choose>
491 <!-- Translate imperfect in Macedonian as conjugated
492 'to be' in the present tense plus the L-participle -->
493 <when>
494 <test>
495 <equal>
496 <clip pos="1" side="sl" part="tns"/>
497 <lit-tag v="pii"/>
498 </equal>
499 </test>
500 <out>
501 <chunk name="verb" case="caseFirstWord">
502 <tags>
503 <tag><lit-tag v="SV"/></tag>
504 <tag><clip pos="1" side="tl" part="tns"/></tag>
505 <tag><clip pos="1" side="tl" part="prs"/></tag>
506 <tag><clip pos="1" side="tl" part="nbr"/></tag>
507 </tags>
508 <lu>
509 <lit v="biti"/>
510 <lit-tag v="vbser"/>
511 <lit-tag v="pri"/>
512 <clip pos="1" side="tl" part="prs"/>
513 <clip pos="1" side="tl" part="nbr"/>
514 </lu>
515 <b/>
516 <lu>
517 <clip pos="1" side="tl" part="lem"/>
518 <clip pos="1" side="tl" part="a_vrb"/>
519 <lit-tag v="lp"/>
520 <lit-tag v="m"/>
521 <clip pos="1" side="tl" part="nbr"/>
522 </lu>
523 </chunk>
524 </out>
525 <let>
526 <var n="motion"/>
527 <lit v="true"/>
528 </let>
529 </when>
530 <otherwise>
531 <out>
532 <chunk name="verb" case="caseFirstWord">
533 <tags>
534 <tag><lit-tag v="SV"/></tag>
535 <tag><clip pos="1" side="tl" part="tns"/></tag>
536 <tag><clip pos="1" side="tl" part="prs"/></tag>
537 <tag><clip pos="1" side="tl" part="nbr"/></tag>
538 </tags>
539 <lu>
540 <clip pos="1" side="tl" part="lem"/>
541 <clip pos="1" side="tl" part="a_vrb"/>
542 <clip pos="1" side="tl" part="tns"/>
543 <clip pos="1" side="tl" part="prs"/>
544 <clip pos="1" side="tl" part="nbr"/>
545 </lu>
546 </chunk>
547 </out>
548 <let>
549 <var n="motion"/>
550 <lit v="true"/>
551 </let>
552 </otherwise>
553 </choose>
554 </action>
555 </rule>
557 <!-- Preposiciones -->
559 <rule>
560 <pattern>
561 <pattern-item n="pr"/>
562 </pattern>
563 <action>
564 <choose>
565 <!-- When the preposition is "o", set the case of the
566 following noun to the loc. -->
567 <when>
568 <test>
569 <equal>
570 <clip pos="1" side="tl" part="lem"/>
571 <lit v="o"/>
572 </equal>
573 </test>
574 <out>
575 <chunk name="prep__o" case="caseFirstWord">
576 <tags>
577 <tag><lit-tag v="SP"/></tag>
578 <tag><lit-tag v="loc"/></tag>
579 </tags>
580 <lu>
581 <clip pos="1" side="tl" part="lem"/>
582 <clip pos="1" side="tl" part="a_prp"/>
583 </lu>
584 </chunk>
585 </out>
586 </when>
588 <!-- When the preposition is "u", set the case of the
589 following noun to the loc. -->
590 <when>
591 <test>
592 <equal>
593 <clip pos="1" side="tl" part="lem"/>
594 <lit v="u"/>
595 </equal>
596 </test>
597 <out>
598 <chunk name="prep__u" case="caseFirstWord">
599 <tags>
600 <tag><lit-tag v="SP"/></tag>
601 <tag><lit-tag v="loc"/></tag>
602 </tags>
603 <lu>
604 <clip pos="1" side="tl" part="lem"/>
605 <clip pos="1" side="tl" part="a_prp"/>
606 </lu>
607 </chunk>
608 </out>
609 </when>
611 <!-- When the preposition is "iz", set the case of the
612 following noun to the gen. -->
613 <when>
614 <test>
615 <equal>
616 <clip pos="1" side="tl" part="lem"/>
617 <lit v="iz"/>
618 </equal>
619 </test>
620 <out>
621 <chunk name="prep__iz" case="caseFirstWord">
622 <tags>
623 <tag><lit-tag v="SP"/></tag>
624 <tag><lit-tag v="gen"/></tag>
625 </tags>
626 <lu>
627 <clip pos="1" side="tl" part="lem"/>
628 <clip pos="1" side="tl" part="a_prp"/>
629 </lu>
630 </chunk>
631 </out>
632 </when>
635 <!-- When the preposition is "na", and the variable
636 "motion" is set to false following noun to the loc. -->
637 <when>
638 <test>
639 <and>
640 <equal>
641 <clip pos="1" side="tl" part="lem"/>
642 <lit v="na"/>
643 </equal>
644 <equal>
645 <var n="motion"/>
646 <lit v="false"/>
647 </equal>
648 </and>
649 </test>
650 <out>
651 <chunk name="prep__na" case="caseFirstWord">
652 <tags>
653 <tag><lit-tag v="SP"/></tag>
654 <tag><lit-tag v="loc"/></tag>
655 </tags>
656 <lu>
657 <clip pos="1" side="tl" part="lem"/>
658 <clip pos="1" side="tl" part="a_prp"/>
659 </lu>
660 </chunk>
661 </out>
662 </when>
664 <!-- When the preposition is "na", and the variable
665 "motion" is set to true following noun to the acc. -->
666 <when>
667 <test>
668 <and>
669 <equal>
670 <clip pos="1" side="tl" part="lem"/>
671 <lit v="na"/>
672 </equal>
673 <equal>
674 <var n="motion"/>
675 <lit v="false"/>
676 </equal>
677 </and>
678 </test>
679 <out>
680 <chunk name="prep__na" case="caseFirstWord">
681 <tags>
682 <tag><lit-tag v="SP"/></tag>
683 <tag><lit-tag v="acc"/></tag>
684 </tags>
685 <lu>
686 <clip pos="1" side="tl" part="lem"/>
687 <clip pos="1" side="tl" part="a_prp"/>
688 </lu>
689 </chunk>
690 </out>
691 </when>
694 <otherwise>
695 <out>
696 <chunk name="prep" case="caseFirstWord">
697 <tags>
698 <tag><lit-tag v="SP"/></tag>
699 <tag><lit-tag v="nom"/></tag>
700 </tags>
701 <lu>
702 <clip pos="1" side="tl" part="lem"/>
703 <clip pos="1" side="tl" part="a_prp"/>
704 </lu>
705 </chunk>
706 </out>
707 </otherwise>
708 </choose>
709 </action>
710 </rule>
712 <!-- Otras cosas -->
714 <rule>
715 <pattern>
716 <pattern-item n="num"/>
717 </pattern>
718 <action>
719 <out>
720 <chunk name="num" case="caseFirstWord">
721 <tags>
722 <tag><clip pos="1" side="tl" part="gen"/></tag>
723 <tag><clip pos="1" side="tl" part="nbr"/></tag>
724 <tag><lit-tag v="nom"/></tag>
725 </tags>
726 <lu>
727 <clip pos="1" side="tl" part="lem"/>
728 <clip pos="1" side="tl" part="a_num"/>
729 <clip pos="1" side="tl" part="gen" link-to="1"/>
730 <clip pos="1" side="tl" part="nbr" link-to="2"/>
731 <lit-tag v="3"/>
732 </lu>
733 </chunk>
734 </out>
735 </action>
736 </rule>
738 <rule>
739 <pattern>
740 <pattern-item n="cnjcoo"/>
741 </pattern>
742 <action>
743 <out>
744 <chunk name="cnjcoo" case="caseFirstWord">
745 <tags>
746 <tag><clip pos="1" side="tl" part="tags"/></tag>
747 </tags>
748 <lu>
749 <clip pos="1" side="tl" part="whole"/>
750 </lu>
751 </chunk>
752 </out>
753 </action>
754 </rule>
756 </section-rules>
758 </transfer>