-
Notifications
You must be signed in to change notification settings - Fork 1
/
apertium-fin-deu.deu-fin.rtx
124 lines (108 loc) · 3.37 KB
/
apertium-fin-deu.deu-fin.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
!!!!!!!!!!!!!!!
!! ATTRIBUTE CATEGORIES
!!!!!!!!!!!!!!!
number = sg pl sp ;
gender = m f mf ;
det_type = def ind dem itg;
tense = pres past pri pii ;
voice = actv pasv ;
person = p1 p2 p3 ;
case = nom acc dat gen ine ela ill ade abl all ins tra abe com lat ;
inf = inf infa infma infe ;
comp = pst comp sup ;
numtype = card ord ;
prntype = pers ind ;
npclass = ant geo top al ;
caseadps = in ab auf über von ohne aus bis als zu an nach für ;
!!!!!!!!!!!!!!!
!! OUTPUT PATTERNS
!!!!!!!!!!!!!!!
n: _.number.case;
np: _.npclass.gender.number.case;
adj: _.comp.number.case;
num: _.numtype.number.case;
det: _.det_type.number.case;
prn: _.number.case;
vblex: _.voice.inf.tense.person.number.case;
vaux: _.voice.inf.tense.person.number.case;
vbser: _.voice.inf.tense.person.number.case;
vbmod: _.voice.inf.tense.person.number.case;
vbhaver: _.voice.inf.tense.person.number.case;
pr: _;
NP: _;
VP: _;
V: _;
N: _;
A: _;
NUM: _;
DET: _;
PRN: _;
!!!!!!!!!!!!!!!
!! TAG-REWRITE RULES
!!!!!!!!!!!!!!!
tense > tense : pii past;
case > case : acc gen, dat gen;
!!!!!!!!!!!!!!!
!! MACROS
!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!
!! REDUCTION RULES
!!!!!!!!!!!!!!!
VP -> n vbhaver { 1[case=ade] _ 2[voice=actv] } |
np vbhaver { 1[case=ade] _ 2[voice=actv] } |
prn vbhaver { 1[case=ade] _ 2[voice=actv] } ;
NP -> pr det n { 3[case=(if (1.lem = in)
ine
else-if (1.lem = ab)
abl
else-if (1.lem = auf)
ine
else-if (1.lem = um)
abl
else-if (1.lem = aus)
ela
else-if (1.lem = über)
ela
else-if (1.lem = bei)
ade
else-if (1.lem = von)
abl
else-if (1.lem = bis)
ill
else-if (1.lem = als)
ess
else-if (1.lem = mit)
ade
else-if (1.lem = zu)
tra
else-if (1.lem = an)
abl
else-if (1.lem = nach)
ill
else-if (1.lem = ohne)
abe
else-if (1.lem = für)
all
else
gen)]
(if (1.lem not in caseadps) [_ 1])
} ;
V -> vblex.inf { 1[voice=actv,number=sg,case=lat,inf=infa] } |
vaux.inf { 1[voice=actv,number=sg,case=lat,inf=infa] } |
vblex { 1[voice=actv] } |
vaux { 1[voice=actv] } |
vbser { 1[voice=actv] } |
vbmod { 1[voice=actv] } |
vbhaver { 1[voice=actv,lem=omistaa,pos_tag=vblex] } ; ! stray have -> own
N -> n { 1 } |
np { 1 } ;
A -> adj { 1[comp=(if (1.comp = "") pst else 1.comp), case=nom, number=sg] } ;
NUM -> num { 1[number=sg,case=nom,numtype=card] } ;
PRN -> prn { 1 } ;
DET -> der@det { _ } |
ein@det { _ } |
det { 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