-
Notifications
You must be signed in to change notification settings - Fork 2
/
apertium-tam.tam.twol
100 lines (74 loc) · 2.51 KB
/
apertium-tam.tam.twol
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
Alphabet
அ ஆ இ ஈ உ ஊ எ ஏ ஐ ஒ ஓ ஔ ஃ க ங ச ஞ ட ண த ந ப ம ய ர ல வ ழ ள ற ன
ா ி ீ ு ூ ெ ே ை ொ ோ ௌ ௗ ்
%{X%}:0 %>:0 %»:0;
Sets
Consonant = க ங ச ஞ ட ண த ந ப ம ய ர ல வ ழ ள ற ன ;
Mellinam = ங ஞ ண ந ம ன;
Vallinam = க ச ட த ப ற;
Idaiyinam = ய ர ல வ ழ ள;
RemConsonant = Mellinam ல ;
Vowel = அ ஆ இ ஈ உ ஊ எ ஏ ஐ ஒ ஓ ஔ ஃ ;
VowWithSym = ஆ இ ஈ உ ஊ எ ஏ ஐ ஒ ஓ ஔ ;
VowSym = ா ி ீ ு ூ ெ ே ை ொ ோ ௌ ;
ShortVowSym = ி ு ெ ை ொ;
LongVowSym = ா ீ ூ ே ோ ௌ;
Rules
"Change to VowSymbols When Preceded by a Consonant"
Vx:Vy <=> %»: _ ;
where Vx in VowWithSym Vy in VowSym matched;
"Ending with Vowels"
%{X%}:க <=> LongVowSym: %>: _ ;
"Ending with Mellinam"
%{X%}:ங <=> Mellinam: ்: %>: _ ;
"Ending with ல"
%{X%}:ற <=> ல: ்: %>: _ ;
except
ி: ல: ்: %>: _ ;
ோ: ல: ்: %>: _ ;
"Ending with ல"
%{X%}:ல <=> Vx: ல: ்: %>: _ ;
where Vx in ( ி ோ ) ;
"Removing அ When adding after a consonant"
அ:0 <=> %»: _ ;
"Inserting ய"
%{X%}:ய <=> ை: _ %»:;
ி: _ %»:;
"Ending with ல"
%{X%}:வ <=> ா: _ %»:;
"Inserting ல"
%{X%}:ல <=> Vallinam: ல: ்: _ %»:;
except
ட: ல: ்: _ %»:;
"Changing to த"
%{X%}:த <=> ம: ்: _ %»:;
"Changing to த"
ம:த <=> _ ்: %{X%}: %»:;
"Changing to ட"
%{X%}:ட <=> VowSym: ட: ு: _ %»:;
"Removing ு"
ு:Vx <=> VowSym: ட: _ %{X%}: %»:;
where Vx in ( ் ) ;
"Removing ு"
ு:0 <=> வ: _ %{X%}: %»:;
க: _ %{X%}: %»:;
்: ட: _ %{X%}: %»:;
"Adding Kutru"
0:Vy <=> LongVowSym: %>: %{X%}: _ க: ;
RemConsonant: ்: %>: %{X%}: _ க: ;
where Vy in ( ் ) ;
"Removing kutru When adding Suffix"
்:0 <=> RemConsonant: _ %>: ;
_ %{X%}: %»:;
except
ப: ல: _ %{X%}: %»:;
ம: _ %{X%}: %»:;
"Removing Consonant When adding suffix"
Vx:0 <=> _ ்: %>: ;
where Vx in RemConsonant ;
! Resources:
! https://wiki.apertium.org/wiki/Starting_a_new_language_with_HFST#Enter_twol
! https://kitwiki.csc.fi/twiki/bin/view/KitWiki/HfstHome
! https://github.com/hfst/
! https://wiki.apertium.org/wiki/Twol
! https://wiki.apertium.org/wiki/Hfst