-
Notifications
You must be signed in to change notification settings - Fork 1
/
apertium-tam-eng.eng-tam.rtx
66 lines (54 loc) · 1.49 KB
/
apertium-tam-eng.eng-tam.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
!!!!!!!!!!!!!!!
!! ATTRIBUTE CATEGORIES
!!!!!!!!!!!!!!!
number = (ND sg) sg pl sp ND;
gender = (GD m) m f mf GD;
det_type = def ind dem itg;
tense = pres past fut ifi pri fti;
person = (PD p3) p1 p2 p3 PD;
prn_type = pers itg dem ind subj obj;
!!!!!!!!!!!!!!!
!! OUTPUT PATTERNS
!!!!!!!!!!!!!!!
n: _.number;
prn: _.prn_type;
prn_itg: _.prn_type.gender.number;
prn_def: _.prn_type.person.gender.number;
adj: _;
adv: _.prn_type;
vblex: _.tense.person.gender.number;
vbser: _.tense.person.number;
det_default: _.det_type;
det_def: _.det_type.number;
NP: _.person.gender.number;
VP: _.person.gender.number;
S: _;
!!!!!!!!!!!!!!!
!! TAG-REWRITE RULES
!!!!!!!!!!!!!!!
tense > tense : ifi past, pri pres, fti fut;
prn_type > prn_type : subj pers, obj pers;
!!!!!!!!!!!!!!!
!! MACROS
!!!!!!!!!!!!!!!
prn: (if (1.prn_type = itg)
1(prn_itg)
else
1(prn_def)
);
!!!!!!!!!!!!!!!
!! REDUCTION RULES
!!!!!!!!!!!!!!!
NP -> %n { 1 } |
%prn { 1 } ;
NP -> adj %NP { 1 _ 2 } ;
NP -> the@det %NP { 2 };
VP -> vblex { 1[person=$person, gender=$gender, number=$number] };
VP -> vblex adv { 2[person=$person, gender=$gender, number=$number] _ 1 } |
vblex NP { 2[person=$person, gender=$gender, number=$number] _ 1 };
VP -> vbser {} ;
S -> NP VP { 1 _ 2[person=1.person, gender=1.gender, number=1.number] };
! Resources:
! https://wiki.apertium.org/wiki/Apertium-recursive
! https://wiki.apertium.org/wiki/Apertium-recursive/Formalism
! https://wiki.apertium.org/wiki/Apertium-recursive/Cookbook