-
Notifications
You must be signed in to change notification settings - Fork 1
/
apertium-fin-deu.fin-deu.rtx
79 lines (66 loc) · 1.81 KB
/
apertium-fin-deu.fin-deu.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
!!!!!!!!!!!!!!!
!! ATTRIBUTE CATEGORIES
!!!!!!!!!!!!!!!
number = sg pl sp;
gender = m f mf nt ;
det_type = def ind dem itg;
tense = pres past fut ifi pri fti;
person = p1 p2 p3 ;
case = nom acc gen par dat ine ela ill ade abl all abe com lat ins ess ;
npclass = ant top geo al ;
sint = sint ;
inf = inf infa infe infma ;
prntype = pers ;
!!!!!!!!!!!!!!!
!! OUTPUT PATTERNS
!!!!!!!!!!!!!!!
n: _.gender.number.case;
np: _.npclass.gender.number.case;
adj: _.sint;
det: _.det_type.gender.number.case;
vblex: _.inf.tense.person.number; ! sehen.vblex.pii.p3.sg
vaux: _.inf.tense.person.number;
vbmod: _.inf.tense.person.number;
num: _.number;
prn: _.prntype.person.gender.number.case;
post: _;
PP: _ ;
NP: _;
VP: _;
V: _;
N: _;
A: _;
DET: _;
NUM: _;
NEG: _;
PRN: _;
!!!!!!!!!!!!!!!
!! TAG-REWRITE RULES
!!!!!!!!!!!!!!!
tense > tense : pres pri, past pii;
case > case : ine dat, ela dat, ill dat, ade dat, abl dat, all dat, abe dat, com dat, ins dat, lat nom, par acc, ess acc;
inf > inf : infa inf, infe inf, infma inf ;
!!!!!!!!!!!!!!!
!! MACROS
!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!
!! REDUCTION RULES
!!!!!!!!!!!!!!!
VP -> ei@vaux vblex { 2[number=1.number,person=1.person,tense=pri] _ nicht@adv } |
ei@vaux vaux { 2[number=1.number,person=1.person,tense=pri] _ nicht@adv } |
ei@vaux vbmod { 2[number=1.number,person=1.person,tense=pri] _ nicht@adv } ;
NEG -> ei@vaux { nicht@adv } ;
PP -> N post { 2 _ 1 } ;
V -> vblex.actv.infa { 1[number="",person="",tense=""] } |
vblex { 1 } |
vaux { 1 } |
vbmod { 1 } ;
N -> n { 1 } ;
A -> adj { 1 } ;
DET -> det { 1 } ;
NUM -> num { 1[number=(if (lem = "yksi") sg else pl)] } ;
PRN -> prn { 1 } ;
! Resources:
! https://wiki.apertium.org/wiki/Apertium-recursive
! https://wiki.apertium.org/wiki/Apertium-recursive/Formalism
! https://wiki.apertium.org/wiki/Apertium-recursive/Cookbook