-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlseq.foma
110 lines (95 loc) · 2.33 KB
/
lseq.foma
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
# Copyright (C) 2023 Darko Milosevic <[email protected]>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, version 3.0 of the License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
define Letter # Latin letters on left of |
î : i1 | # debug schwa !
[a|а] : a1 |
[e|е] : e1 |
[i|и] : ii1 |
[o|о] : o1 |
[u|у] : u1 |
[j|ј] : [j ax0] |
[b|б] : [b ax0] |
[ђ|đ|ѓ] : [dj ax0] |
[g|г]: [g ax0] |
[d|д] : [d ax0] |
[dž|џ] : [dzh ax0] |
ѕ : [dz ax0] |
[ž|ж] : [zh ax0] |
[z|з] : [z ax0] |
ź : [z j ax0] |
[k|к] : [k ax0] |
[l|л] : [l ax0] |
[m|м] : [m ax0] |
[n|н] : [n ax0] |
[nj|њ] : [nj ax0] |
[p|п] : [p ax0] |
[р|r] : [r ax0] |
[s|с] : [s ax0] |
ś : [s j ax0] |
[t|т] : [t ax0] |
[f|ф] : [f ax0] |
[h|х] : [h ax0] |
[c|ц] : [ts ax0] |
[č|ч] : [tsh ax0] |
[š|ш] : [sh ax0] |
[v|в] : [v ax0] |
[lj|љ] : [lj ax0] |
[ć|ћ] : [tj ax0] |
q : [k u1] |
w : [d u1 p l o0 v e1] |
x : [ii1 k s] |
y : [ii1 p s ii0 l o0 n];
define SpecialSingles
# latin for when Android is spelling letter by letter.
a : [a1] |
b : [b ax0] |
c : [ts ax0] |
d : [d ax0] |
e : [e1] |
f : [f ax0] |
g : [g ax0] |
h : [h ax0] |
i : [ii1] |
j : [j ax0] |
k : [k ax0] |
l : [l ax0] |
m : [m ax0] |
n : [n ax0] |
o : [o1] |
p : [p ax0] |
q : [k u1] |
r : [r ax0] |
s : [s ax0] |
ś : [s j ax0] |
t : [t ax0] |
u : [u1] |
v : [v ax0] |
w : [d u1 p l o0 v e1] |
x : [ii1 k s] |
y : [ii1 p s ii0 l o0 n] |
z : [z ax0] |
ź : [s j ax0] |
ć : [tj ax0] |
đ : [dj ax0] |
ž : [zh ax0] |
š : [sh ax0] |
č : [tsh ax0]
;
defin LetterSequence Letter+ ;
# not all vowels used, but map them all anyway
define stress
[a0:a1 | ax0:ax1 | e0:e1 | i0:i1 | ii0:ii1 | o0:o1 | u0:u1] -> || _ .#. ;
source downcase.foma
define Rules
Downcase .o. # LatinConvertLSeq .o.
# LatinSingle .P.
[[LetterSequence @-> || _] .o. [ stress]] ;
regex Rules ;