phonetics 3.2.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +17 -2
- data/Cargo.toml +27 -0
- data/Rakefile +58 -26
- data/VERSION +1 -1
- data/bin/phonetics +89 -0
- data/ext/phonetics_ruby/Cargo.toml +36 -0
- data/ext/phonetics_ruby/build.rs +24 -0
- data/ext/phonetics_ruby/extconf.rb +17 -0
- data/ext/phonetics_ruby/src/lib.rs +56 -0
- data/ext/phonetics_ruby/vendor/phonetics/Cargo.toml +30 -0
- data/ext/phonetics_ruby/vendor/phonetics/README.md +29 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/compounds.rs +40 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/confusion.rs +325 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/consonants.rs +363 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/cross_class.rs +56 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/diacritics.rs +113 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/distance.rs +183 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/levenshtein.rs +146 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/lib.rs +44 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/symbols.rs +21 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/tokenizer.rs +171 -0
- data/ext/phonetics_ruby/vendor/phonetics/src/vowels.rs +197 -0
- data/lib/phonetics.rb +77 -2
- data/phonetics.gemspec +33 -9
- metadata +45 -34
- data/.github/workflows/gempush.yml +0 -28
- data/.github/workflows/test.yml +0 -20
- data/Makefile +0 -9
- data/ext/c_levenshtein/extconf.rb +0 -10
- data/ext/c_levenshtein/levenshtein.c +0 -223
- data/ext/c_levenshtein/next_phoneme_length.c +0 -1365
- data/ext/c_levenshtein/next_phoneme_length.h +0 -1
- data/ext/c_levenshtein/phonemes.c +0 -53
- data/ext/c_levenshtein/phonemes.h +0 -3
- data/ext/c_levenshtein/phonetic_cost.c +0 -88593
- data/ext/c_levenshtein/phonetic_cost.h +0 -1
- data/lib/phonetics/code_generator.rb +0 -228
- data/lib/phonetics/distances.rb +0 -249
- data/lib/phonetics/levenshtein.rb +0 -27
- data/lib/phonetics/ruby_levenshtein.rb +0 -162
|
@@ -1,1365 +0,0 @@
|
|
|
1
|
-
// This is compiled from Ruby, in phonetics/lib/phonetics/code_generator.rb:163
|
|
2
|
-
#include <stdio.h>
|
|
3
|
-
int next_phoneme_length(int *string, int cursor, int length) {
|
|
4
|
-
|
|
5
|
-
int max_length;
|
|
6
|
-
max_length = length - cursor;
|
|
7
|
-
|
|
8
|
-
switch(string[cursor + 0]) {
|
|
9
|
-
|
|
10
|
-
case 105:
|
|
11
|
-
// Phoneme: 'i', bytes: [105]
|
|
12
|
-
// vowel features: {"F1":240,"F2":2400,"rounded":false}
|
|
13
|
-
return 1;
|
|
14
|
-
break;
|
|
15
|
-
case 121:
|
|
16
|
-
// Phoneme: 'y', bytes: [121]
|
|
17
|
-
// vowel features: {"F1":235,"F2":2100,"rounded":false}
|
|
18
|
-
return 1;
|
|
19
|
-
break;
|
|
20
|
-
case 201:
|
|
21
|
-
if (max_length > 1) {
|
|
22
|
-
switch(string[cursor + 1]) {
|
|
23
|
-
|
|
24
|
-
case 170:
|
|
25
|
-
// Phoneme: 'ɪ', bytes: [201, 170]
|
|
26
|
-
// vowel features: {"F1":300,"F2":2100,"rounded":false}
|
|
27
|
-
return 2;
|
|
28
|
-
break;
|
|
29
|
-
case 155:
|
|
30
|
-
// Phoneme: 'ɛ', bytes: [201, 155]
|
|
31
|
-
// vowel features: {"F1":610,"F2":1900,"rounded":false}
|
|
32
|
-
return 2;
|
|
33
|
-
break;
|
|
34
|
-
case 182:
|
|
35
|
-
// Phoneme: 'ɶ', bytes: [201, 182]
|
|
36
|
-
// vowel features: {"F1":820,"F2":1530,"rounded":true}
|
|
37
|
-
return 2;
|
|
38
|
-
break;
|
|
39
|
-
case 145:
|
|
40
|
-
// Phoneme: 'ɑ', bytes: [201, 145]
|
|
41
|
-
// vowel features: {"F1":750,"F2":940,"rounded":false}
|
|
42
|
-
return 2;
|
|
43
|
-
break;
|
|
44
|
-
case 146:
|
|
45
|
-
// Phoneme: 'ɒ', bytes: [201, 146]
|
|
46
|
-
// vowel features: {"F1":700,"F2":760,"rounded":true}
|
|
47
|
-
return 2;
|
|
48
|
-
break;
|
|
49
|
-
case 153:
|
|
50
|
-
// Phoneme: 'ə', bytes: [201, 153]
|
|
51
|
-
// vowel features: {"F1":600,"F2":1170,"rounded":false}
|
|
52
|
-
return 2;
|
|
53
|
-
break;
|
|
54
|
-
case 157:
|
|
55
|
-
// Phoneme: 'ɝ', bytes: [201, 157]
|
|
56
|
-
// vowel features: {"F1":600,"F2":1170,"rounded":false,"rhotic":true}
|
|
57
|
-
return 2;
|
|
58
|
-
break;
|
|
59
|
-
case 148:
|
|
60
|
-
// Phoneme: 'ɔ', bytes: [201, 148]
|
|
61
|
-
// vowel features: {"F1":500,"F2":700,"rounded":true}
|
|
62
|
-
return 2;
|
|
63
|
-
break;
|
|
64
|
-
case 164:
|
|
65
|
-
// Phoneme: 'ɤ', bytes: [201, 164]
|
|
66
|
-
// vowel features: {"F1":460,"F2":1310,"rounded":false}
|
|
67
|
-
return 2;
|
|
68
|
-
break;
|
|
69
|
-
case 175:
|
|
70
|
-
// Phoneme: 'ɯ', bytes: [201, 175]
|
|
71
|
-
// vowel features: {"F1":300,"F2":1390,"rounded":false}
|
|
72
|
-
return 2;
|
|
73
|
-
break;
|
|
74
|
-
case 177:
|
|
75
|
-
// Phoneme: 'ɱ', bytes: [201, 177]
|
|
76
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Nasal","voiced":true}
|
|
77
|
-
return 2;
|
|
78
|
-
break;
|
|
79
|
-
case 179:
|
|
80
|
-
// Phoneme: 'ɳ', bytes: [201, 179]
|
|
81
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Nasal","voiced":true}
|
|
82
|
-
if (max_length > 2) {
|
|
83
|
-
switch(string[cursor + 2]) {
|
|
84
|
-
|
|
85
|
-
case 204:
|
|
86
|
-
if (max_length > 3) {
|
|
87
|
-
switch(string[cursor + 3]) {
|
|
88
|
-
|
|
89
|
-
case 138:
|
|
90
|
-
// Phoneme: 'ɳ̊', bytes: [201, 179, 204, 138]
|
|
91
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Nasal","voiced":false}
|
|
92
|
-
return 4;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
} else {
|
|
96
|
-
return 3;
|
|
97
|
-
}
|
|
98
|
-
break;
|
|
99
|
-
default:
|
|
100
|
-
return 2;
|
|
101
|
-
}
|
|
102
|
-
} else {
|
|
103
|
-
return 2;
|
|
104
|
-
}
|
|
105
|
-
break;
|
|
106
|
-
case 178:
|
|
107
|
-
// Phoneme: 'ɲ', bytes: [201, 178]
|
|
108
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Nasal","voiced":true}
|
|
109
|
-
if (max_length > 2) {
|
|
110
|
-
switch(string[cursor + 2]) {
|
|
111
|
-
|
|
112
|
-
case 204:
|
|
113
|
-
if (max_length > 3) {
|
|
114
|
-
switch(string[cursor + 3]) {
|
|
115
|
-
|
|
116
|
-
case 138:
|
|
117
|
-
// Phoneme: 'ɲ̊', bytes: [201, 178, 204, 138]
|
|
118
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Nasal","voiced":false}
|
|
119
|
-
return 4;
|
|
120
|
-
break;
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
return 3;
|
|
124
|
-
}
|
|
125
|
-
break;
|
|
126
|
-
default:
|
|
127
|
-
return 2;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
return 2;
|
|
131
|
-
}
|
|
132
|
-
break;
|
|
133
|
-
case 180:
|
|
134
|
-
// Phoneme: 'ɴ', bytes: [201, 180]
|
|
135
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Nasal","voiced":true}
|
|
136
|
-
return 2;
|
|
137
|
-
break;
|
|
138
|
-
case 150:
|
|
139
|
-
// Phoneme: 'ɖ', bytes: [201, 150]
|
|
140
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Stop","voiced":true}
|
|
141
|
-
return 2;
|
|
142
|
-
break;
|
|
143
|
-
case 159:
|
|
144
|
-
// Phoneme: 'ɟ', bytes: [201, 159]
|
|
145
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Stop","voiced":true}
|
|
146
|
-
return 2;
|
|
147
|
-
break;
|
|
148
|
-
case 162:
|
|
149
|
-
// Phoneme: 'ɢ', bytes: [201, 162]
|
|
150
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Stop","voiced":true}
|
|
151
|
-
if (max_length > 2) {
|
|
152
|
-
switch(string[cursor + 2]) {
|
|
153
|
-
|
|
154
|
-
case 204:
|
|
155
|
-
if (max_length > 3) {
|
|
156
|
-
switch(string[cursor + 3]) {
|
|
157
|
-
|
|
158
|
-
case 134:
|
|
159
|
-
// Phoneme: 'ɢ̆', bytes: [201, 162, 204, 134]
|
|
160
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Tap/flap","voiced":true}
|
|
161
|
-
return 4;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
} else {
|
|
165
|
-
return 3;
|
|
166
|
-
}
|
|
167
|
-
break;
|
|
168
|
-
default:
|
|
169
|
-
return 2;
|
|
170
|
-
}
|
|
171
|
-
} else {
|
|
172
|
-
return 2;
|
|
173
|
-
}
|
|
174
|
-
break;
|
|
175
|
-
case 149:
|
|
176
|
-
// Phoneme: 'ɕ', bytes: [201, 149]
|
|
177
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Sibilant fricative","voiced":false}
|
|
178
|
-
return 2;
|
|
179
|
-
break;
|
|
180
|
-
case 184:
|
|
181
|
-
// Phoneme: 'ɸ', bytes: [201, 184]
|
|
182
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Non-sibilant fricative","voiced":false}
|
|
183
|
-
return 2;
|
|
184
|
-
break;
|
|
185
|
-
case 185:
|
|
186
|
-
// Phoneme: 'ɹ', bytes: [201, 185]
|
|
187
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Approximant","voiced":true}
|
|
188
|
-
if (max_length > 2) {
|
|
189
|
-
switch(string[cursor + 2]) {
|
|
190
|
-
|
|
191
|
-
case 204:
|
|
192
|
-
if (max_length > 3) {
|
|
193
|
-
switch(string[cursor + 3]) {
|
|
194
|
-
|
|
195
|
-
case 160:
|
|
196
|
-
if (max_length > 4) {
|
|
197
|
-
switch(string[cursor + 4]) {
|
|
198
|
-
|
|
199
|
-
case 204:
|
|
200
|
-
if (max_length > 5) {
|
|
201
|
-
switch(string[cursor + 5]) {
|
|
202
|
-
|
|
203
|
-
case 138:
|
|
204
|
-
if (max_length > 6) {
|
|
205
|
-
switch(string[cursor + 6]) {
|
|
206
|
-
|
|
207
|
-
case 203:
|
|
208
|
-
if (max_length > 7) {
|
|
209
|
-
switch(string[cursor + 7]) {
|
|
210
|
-
|
|
211
|
-
case 148:
|
|
212
|
-
// Phoneme: 'ɹ̠̊˔', bytes: [201, 185, 204, 160, 204, 138, 203, 148]
|
|
213
|
-
// consonant features: {"position":"Post-alveolar","position_index":6,"manner":"Non-sibilant fricative","voiced":false}
|
|
214
|
-
return 8;
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
} else {
|
|
218
|
-
return 7;
|
|
219
|
-
}
|
|
220
|
-
break;
|
|
221
|
-
}
|
|
222
|
-
} else {
|
|
223
|
-
return 6;
|
|
224
|
-
}
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
} else {
|
|
228
|
-
return 5;
|
|
229
|
-
}
|
|
230
|
-
break;
|
|
231
|
-
case 203:
|
|
232
|
-
if (max_length > 5) {
|
|
233
|
-
switch(string[cursor + 5]) {
|
|
234
|
-
|
|
235
|
-
case 148:
|
|
236
|
-
// Phoneme: 'ɹ̠˔', bytes: [201, 185, 204, 160, 203, 148]
|
|
237
|
-
// consonant features: {"position":"Post-alveolar","position_index":6,"manner":"Non-sibilant fricative","voiced":true}
|
|
238
|
-
return 6;
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
} else {
|
|
242
|
-
return 5;
|
|
243
|
-
}
|
|
244
|
-
break;
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
return 4;
|
|
248
|
-
}
|
|
249
|
-
break;
|
|
250
|
-
case 165:
|
|
251
|
-
// Phoneme: 'ɹ̥', bytes: [201, 185, 204, 165]
|
|
252
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Approximant","voiced":false}
|
|
253
|
-
return 4;
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
} else {
|
|
257
|
-
return 3;
|
|
258
|
-
}
|
|
259
|
-
break;
|
|
260
|
-
default:
|
|
261
|
-
return 2;
|
|
262
|
-
}
|
|
263
|
-
} else {
|
|
264
|
-
return 2;
|
|
265
|
-
}
|
|
266
|
-
break;
|
|
267
|
-
case 187:
|
|
268
|
-
// Phoneme: 'ɻ', bytes: [201, 187]
|
|
269
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Approximant","voiced":true}
|
|
270
|
-
if (max_length > 2) {
|
|
271
|
-
switch(string[cursor + 2]) {
|
|
272
|
-
|
|
273
|
-
case 203:
|
|
274
|
-
if (max_length > 3) {
|
|
275
|
-
switch(string[cursor + 3]) {
|
|
276
|
-
|
|
277
|
-
case 148:
|
|
278
|
-
// Phoneme: 'ɻ˔', bytes: [201, 187, 203, 148]
|
|
279
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Non-sibilant fricative","voiced":true}
|
|
280
|
-
return 4;
|
|
281
|
-
break;
|
|
282
|
-
}
|
|
283
|
-
} else {
|
|
284
|
-
return 3;
|
|
285
|
-
}
|
|
286
|
-
break;
|
|
287
|
-
case 204:
|
|
288
|
-
if (max_length > 3) {
|
|
289
|
-
switch(string[cursor + 3]) {
|
|
290
|
-
|
|
291
|
-
case 138:
|
|
292
|
-
// Phoneme: 'ɻ̊', bytes: [201, 187, 204, 138]
|
|
293
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Approximant","voiced":false}
|
|
294
|
-
return 4;
|
|
295
|
-
break;
|
|
296
|
-
}
|
|
297
|
-
} else {
|
|
298
|
-
return 3;
|
|
299
|
-
}
|
|
300
|
-
break;
|
|
301
|
-
default:
|
|
302
|
-
return 2;
|
|
303
|
-
}
|
|
304
|
-
} else {
|
|
305
|
-
return 2;
|
|
306
|
-
}
|
|
307
|
-
break;
|
|
308
|
-
case 163:
|
|
309
|
-
// Phoneme: 'ɣ', bytes: [201, 163]
|
|
310
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Non-sibilant fricative","voiced":true}
|
|
311
|
-
return 2;
|
|
312
|
-
break;
|
|
313
|
-
case 166:
|
|
314
|
-
// Phoneme: 'ɦ', bytes: [201, 166]
|
|
315
|
-
// consonant features: {"position":"Glottal","position_index":12,"manner":"Non-sibilant fricative","voiced":true}
|
|
316
|
-
return 2;
|
|
317
|
-
break;
|
|
318
|
-
case 176:
|
|
319
|
-
// Phoneme: 'ɰ', bytes: [201, 176]
|
|
320
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Approximant","voiced":true}
|
|
321
|
-
if (max_length > 2) {
|
|
322
|
-
switch(string[cursor + 2]) {
|
|
323
|
-
|
|
324
|
-
case 204:
|
|
325
|
-
if (max_length > 3) {
|
|
326
|
-
switch(string[cursor + 3]) {
|
|
327
|
-
|
|
328
|
-
case 138:
|
|
329
|
-
// Phoneme: 'ɰ̊', bytes: [201, 176, 204, 138]
|
|
330
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Approximant","voiced":false}
|
|
331
|
-
return 4;
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
} else {
|
|
335
|
-
return 3;
|
|
336
|
-
}
|
|
337
|
-
break;
|
|
338
|
-
default:
|
|
339
|
-
return 2;
|
|
340
|
-
}
|
|
341
|
-
} else {
|
|
342
|
-
return 2;
|
|
343
|
-
}
|
|
344
|
-
break;
|
|
345
|
-
case 190:
|
|
346
|
-
// Phoneme: 'ɾ', bytes: [201, 190]
|
|
347
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Tap/flap","voiced":true}
|
|
348
|
-
if (max_length > 2) {
|
|
349
|
-
switch(string[cursor + 2]) {
|
|
350
|
-
|
|
351
|
-
case 204:
|
|
352
|
-
if (max_length > 3) {
|
|
353
|
-
switch(string[cursor + 3]) {
|
|
354
|
-
|
|
355
|
-
case 188:
|
|
356
|
-
// Phoneme: 'ɾ̼', bytes: [201, 190, 204, 188]
|
|
357
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Tap/flap","voiced":true}
|
|
358
|
-
return 4;
|
|
359
|
-
break;
|
|
360
|
-
case 165:
|
|
361
|
-
// Phoneme: 'ɾ̥', bytes: [201, 190, 204, 165]
|
|
362
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Tap/flap","voiced":false}
|
|
363
|
-
return 4;
|
|
364
|
-
break;
|
|
365
|
-
}
|
|
366
|
-
} else {
|
|
367
|
-
return 3;
|
|
368
|
-
}
|
|
369
|
-
break;
|
|
370
|
-
default:
|
|
371
|
-
return 2;
|
|
372
|
-
}
|
|
373
|
-
} else {
|
|
374
|
-
return 2;
|
|
375
|
-
}
|
|
376
|
-
break;
|
|
377
|
-
case 189:
|
|
378
|
-
// Phoneme: 'ɽ', bytes: [201, 189]
|
|
379
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Tap/flap","voiced":true}
|
|
380
|
-
if (max_length > 2) {
|
|
381
|
-
switch(string[cursor + 2]) {
|
|
382
|
-
|
|
383
|
-
case 204:
|
|
384
|
-
if (max_length > 3) {
|
|
385
|
-
switch(string[cursor + 3]) {
|
|
386
|
-
|
|
387
|
-
case 138:
|
|
388
|
-
// Phoneme: 'ɽ̊', bytes: [201, 189, 204, 138]
|
|
389
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Tap/flap","voiced":false}
|
|
390
|
-
return 4;
|
|
391
|
-
break;
|
|
392
|
-
}
|
|
393
|
-
} else {
|
|
394
|
-
return 3;
|
|
395
|
-
}
|
|
396
|
-
break;
|
|
397
|
-
default:
|
|
398
|
-
return 2;
|
|
399
|
-
}
|
|
400
|
-
} else {
|
|
401
|
-
return 2;
|
|
402
|
-
}
|
|
403
|
-
break;
|
|
404
|
-
case 172:
|
|
405
|
-
// Phoneme: 'ɬ', bytes: [201, 172]
|
|
406
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Lateral fricative","voiced":false}
|
|
407
|
-
return 2;
|
|
408
|
-
break;
|
|
409
|
-
case 174:
|
|
410
|
-
// Phoneme: 'ɮ', bytes: [201, 174]
|
|
411
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Lateral fricative","voiced":true}
|
|
412
|
-
return 2;
|
|
413
|
-
break;
|
|
414
|
-
case 173:
|
|
415
|
-
// Phoneme: 'ɭ', bytes: [201, 173]
|
|
416
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Lateral approximant","voiced":true}
|
|
417
|
-
if (max_length > 2) {
|
|
418
|
-
switch(string[cursor + 2]) {
|
|
419
|
-
|
|
420
|
-
case 204:
|
|
421
|
-
if (max_length > 3) {
|
|
422
|
-
switch(string[cursor + 3]) {
|
|
423
|
-
|
|
424
|
-
case 138:
|
|
425
|
-
// Phoneme: 'ɭ̊', bytes: [201, 173, 204, 138]
|
|
426
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Lateral approximant","voiced":false}
|
|
427
|
-
if (max_length > 4) {
|
|
428
|
-
switch(string[cursor + 4]) {
|
|
429
|
-
|
|
430
|
-
case 203:
|
|
431
|
-
if (max_length > 5) {
|
|
432
|
-
switch(string[cursor + 5]) {
|
|
433
|
-
|
|
434
|
-
case 148:
|
|
435
|
-
// Phoneme: 'ɭ̊˔', bytes: [201, 173, 204, 138, 203, 148]
|
|
436
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Lateral fricative","voiced":false}
|
|
437
|
-
return 6;
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
} else {
|
|
441
|
-
return 5;
|
|
442
|
-
}
|
|
443
|
-
break;
|
|
444
|
-
default:
|
|
445
|
-
return 4;
|
|
446
|
-
}
|
|
447
|
-
} else {
|
|
448
|
-
return 4;
|
|
449
|
-
}
|
|
450
|
-
break;
|
|
451
|
-
case 134:
|
|
452
|
-
// Phoneme: 'ɭ̆', bytes: [201, 173, 204, 134]
|
|
453
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Lateral tap/flap","voiced":true}
|
|
454
|
-
return 4;
|
|
455
|
-
break;
|
|
456
|
-
}
|
|
457
|
-
} else {
|
|
458
|
-
return 3;
|
|
459
|
-
}
|
|
460
|
-
break;
|
|
461
|
-
case 203:
|
|
462
|
-
if (max_length > 3) {
|
|
463
|
-
switch(string[cursor + 3]) {
|
|
464
|
-
|
|
465
|
-
case 148:
|
|
466
|
-
// Phoneme: 'ɭ˔', bytes: [201, 173, 203, 148]
|
|
467
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Lateral fricative","voiced":true}
|
|
468
|
-
return 4;
|
|
469
|
-
break;
|
|
470
|
-
}
|
|
471
|
-
} else {
|
|
472
|
-
return 3;
|
|
473
|
-
}
|
|
474
|
-
break;
|
|
475
|
-
default:
|
|
476
|
-
return 2;
|
|
477
|
-
}
|
|
478
|
-
} else {
|
|
479
|
-
return 2;
|
|
480
|
-
}
|
|
481
|
-
break;
|
|
482
|
-
case 186:
|
|
483
|
-
// Phoneme: 'ɺ', bytes: [201, 186]
|
|
484
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Lateral tap/flap","voiced":true}
|
|
485
|
-
return 2;
|
|
486
|
-
break;
|
|
487
|
-
}
|
|
488
|
-
} else {
|
|
489
|
-
return 1;
|
|
490
|
-
}
|
|
491
|
-
break;
|
|
492
|
-
case 101:
|
|
493
|
-
// Phoneme: 'e', bytes: [101]
|
|
494
|
-
// vowel features: {"F1":390,"F2":2300,"rounded":false}
|
|
495
|
-
return 1;
|
|
496
|
-
break;
|
|
497
|
-
case 195:
|
|
498
|
-
if (max_length > 1) {
|
|
499
|
-
switch(string[cursor + 1]) {
|
|
500
|
-
|
|
501
|
-
case 184:
|
|
502
|
-
// Phoneme: 'ø', bytes: [195, 184]
|
|
503
|
-
// vowel features: {"F1":370,"F2":1900,"rounded":true}
|
|
504
|
-
return 2;
|
|
505
|
-
break;
|
|
506
|
-
case 166:
|
|
507
|
-
// Phoneme: 'æ', bytes: [195, 166]
|
|
508
|
-
// vowel features: {"F1":800,"F2":1900,"rounded":false}
|
|
509
|
-
return 2;
|
|
510
|
-
break;
|
|
511
|
-
case 176:
|
|
512
|
-
// Phoneme: 'ð', bytes: [195, 176]
|
|
513
|
-
// consonant features: {"position":"Dental","position_index":4,"manner":"Non-sibilant fricative","voiced":true}
|
|
514
|
-
if (max_length > 2) {
|
|
515
|
-
switch(string[cursor + 2]) {
|
|
516
|
-
|
|
517
|
-
case 204:
|
|
518
|
-
if (max_length > 3) {
|
|
519
|
-
switch(string[cursor + 3]) {
|
|
520
|
-
|
|
521
|
-
case 188:
|
|
522
|
-
// Phoneme: 'ð̼', bytes: [195, 176, 204, 188]
|
|
523
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Non-sibilant fricative","voiced":true}
|
|
524
|
-
return 4;
|
|
525
|
-
break;
|
|
526
|
-
case 160:
|
|
527
|
-
// Phoneme: 'ð̠', bytes: [195, 176, 204, 160]
|
|
528
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Non-sibilant fricative","voiced":true}
|
|
529
|
-
return 4;
|
|
530
|
-
break;
|
|
531
|
-
}
|
|
532
|
-
} else {
|
|
533
|
-
return 3;
|
|
534
|
-
}
|
|
535
|
-
break;
|
|
536
|
-
default:
|
|
537
|
-
return 2;
|
|
538
|
-
}
|
|
539
|
-
} else {
|
|
540
|
-
return 2;
|
|
541
|
-
}
|
|
542
|
-
break;
|
|
543
|
-
case 167:
|
|
544
|
-
// Phoneme: 'ç', bytes: [195, 167]
|
|
545
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Non-sibilant fricative","voiced":false}
|
|
546
|
-
return 2;
|
|
547
|
-
break;
|
|
548
|
-
}
|
|
549
|
-
} else {
|
|
550
|
-
return 1;
|
|
551
|
-
}
|
|
552
|
-
break;
|
|
553
|
-
case 197:
|
|
554
|
-
if (max_length > 1) {
|
|
555
|
-
switch(string[cursor + 1]) {
|
|
556
|
-
|
|
557
|
-
case 147:
|
|
558
|
-
// Phoneme: 'œ', bytes: [197, 147]
|
|
559
|
-
// vowel features: {"F1":585,"F2":1710,"rounded":true}
|
|
560
|
-
return 2;
|
|
561
|
-
break;
|
|
562
|
-
case 139:
|
|
563
|
-
// Phoneme: 'ŋ', bytes: [197, 139]
|
|
564
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Nasal","voiced":true}
|
|
565
|
-
if (max_length > 2) {
|
|
566
|
-
switch(string[cursor + 2]) {
|
|
567
|
-
|
|
568
|
-
case 204:
|
|
569
|
-
if (max_length > 3) {
|
|
570
|
-
switch(string[cursor + 3]) {
|
|
571
|
-
|
|
572
|
-
case 138:
|
|
573
|
-
// Phoneme: 'ŋ̊', bytes: [197, 139, 204, 138]
|
|
574
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Nasal","voiced":false}
|
|
575
|
-
return 4;
|
|
576
|
-
break;
|
|
577
|
-
}
|
|
578
|
-
} else {
|
|
579
|
-
return 3;
|
|
580
|
-
}
|
|
581
|
-
break;
|
|
582
|
-
default:
|
|
583
|
-
return 2;
|
|
584
|
-
}
|
|
585
|
-
} else {
|
|
586
|
-
return 2;
|
|
587
|
-
}
|
|
588
|
-
break;
|
|
589
|
-
}
|
|
590
|
-
} else {
|
|
591
|
-
return 1;
|
|
592
|
-
}
|
|
593
|
-
break;
|
|
594
|
-
case 97:
|
|
595
|
-
// Phoneme: 'a', bytes: [97]
|
|
596
|
-
// vowel features: {"F1":850,"F2":1610,"rounded":false}
|
|
597
|
-
return 1;
|
|
598
|
-
break;
|
|
599
|
-
case 202:
|
|
600
|
-
if (max_length > 1) {
|
|
601
|
-
switch(string[cursor + 1]) {
|
|
602
|
-
|
|
603
|
-
case 140:
|
|
604
|
-
// Phoneme: 'ʌ', bytes: [202, 140]
|
|
605
|
-
// vowel features: {"F1":600,"F2":1170,"rounded":false}
|
|
606
|
-
return 2;
|
|
607
|
-
break;
|
|
608
|
-
case 138:
|
|
609
|
-
// Phoneme: 'ʊ', bytes: [202, 138]
|
|
610
|
-
// vowel features: {"F1":350,"F2":650,"rounded":true}
|
|
611
|
-
return 2;
|
|
612
|
-
break;
|
|
613
|
-
case 136:
|
|
614
|
-
// Phoneme: 'ʈ', bytes: [202, 136]
|
|
615
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Stop","voiced":false}
|
|
616
|
-
return 2;
|
|
617
|
-
break;
|
|
618
|
-
case 161:
|
|
619
|
-
// Phoneme: 'ʡ', bytes: [202, 161]
|
|
620
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Stop","voiced":false}
|
|
621
|
-
if (max_length > 2) {
|
|
622
|
-
switch(string[cursor + 2]) {
|
|
623
|
-
|
|
624
|
-
case 204:
|
|
625
|
-
if (max_length > 3) {
|
|
626
|
-
switch(string[cursor + 3]) {
|
|
627
|
-
|
|
628
|
-
case 134:
|
|
629
|
-
// Phoneme: 'ʡ̆', bytes: [202, 161, 204, 134]
|
|
630
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Tap/flap","voiced":true}
|
|
631
|
-
return 4;
|
|
632
|
-
break;
|
|
633
|
-
}
|
|
634
|
-
} else {
|
|
635
|
-
return 3;
|
|
636
|
-
}
|
|
637
|
-
break;
|
|
638
|
-
default:
|
|
639
|
-
return 2;
|
|
640
|
-
}
|
|
641
|
-
} else {
|
|
642
|
-
return 2;
|
|
643
|
-
}
|
|
644
|
-
break;
|
|
645
|
-
case 148:
|
|
646
|
-
// Phoneme: 'ʔ', bytes: [202, 148]
|
|
647
|
-
// consonant features: {"position":"Glottal","position_index":12,"manner":"Stop","voiced":false}
|
|
648
|
-
if (max_length > 2) {
|
|
649
|
-
switch(string[cursor + 2]) {
|
|
650
|
-
|
|
651
|
-
case 204:
|
|
652
|
-
if (max_length > 3) {
|
|
653
|
-
switch(string[cursor + 3]) {
|
|
654
|
-
|
|
655
|
-
case 158:
|
|
656
|
-
// Phoneme: 'ʔ̞', bytes: [202, 148, 204, 158]
|
|
657
|
-
// consonant features: {"position":"Glottal","position_index":12,"manner":"Approximant","voiced":true}
|
|
658
|
-
return 4;
|
|
659
|
-
break;
|
|
660
|
-
}
|
|
661
|
-
} else {
|
|
662
|
-
return 3;
|
|
663
|
-
}
|
|
664
|
-
break;
|
|
665
|
-
default:
|
|
666
|
-
return 2;
|
|
667
|
-
}
|
|
668
|
-
} else {
|
|
669
|
-
return 2;
|
|
670
|
-
}
|
|
671
|
-
break;
|
|
672
|
-
case 131:
|
|
673
|
-
// Phoneme: 'ʃ', bytes: [202, 131]
|
|
674
|
-
// consonant features: {"position":"Post-alveolar","position_index":6,"manner":"Sibilant fricative","voiced":false}
|
|
675
|
-
return 2;
|
|
676
|
-
break;
|
|
677
|
-
case 146:
|
|
678
|
-
// Phoneme: 'ʒ', bytes: [202, 146]
|
|
679
|
-
// consonant features: {"position":"Post-alveolar","position_index":6,"manner":"Sibilant fricative","voiced":true}
|
|
680
|
-
return 2;
|
|
681
|
-
break;
|
|
682
|
-
case 130:
|
|
683
|
-
// Phoneme: 'ʂ', bytes: [202, 130]
|
|
684
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Sibilant fricative","voiced":false}
|
|
685
|
-
return 2;
|
|
686
|
-
break;
|
|
687
|
-
case 144:
|
|
688
|
-
// Phoneme: 'ʐ', bytes: [202, 144]
|
|
689
|
-
// consonant features: {"position":"Retro-flex","position_index":7,"manner":"Sibilant fricative","voiced":true}
|
|
690
|
-
return 2;
|
|
691
|
-
break;
|
|
692
|
-
case 145:
|
|
693
|
-
// Phoneme: 'ʑ', bytes: [202, 145]
|
|
694
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Sibilant fricative","voiced":true}
|
|
695
|
-
return 2;
|
|
696
|
-
break;
|
|
697
|
-
case 157:
|
|
698
|
-
// Phoneme: 'ʝ', bytes: [202, 157]
|
|
699
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Non-sibilant fricative","voiced":true}
|
|
700
|
-
return 2;
|
|
701
|
-
break;
|
|
702
|
-
case 129:
|
|
703
|
-
// Phoneme: 'ʁ', bytes: [202, 129]
|
|
704
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Non-sibilant fricative","voiced":true}
|
|
705
|
-
return 2;
|
|
706
|
-
break;
|
|
707
|
-
case 149:
|
|
708
|
-
// Phoneme: 'ʕ', bytes: [202, 149]
|
|
709
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Non-sibilant fricative","voiced":true}
|
|
710
|
-
return 2;
|
|
711
|
-
break;
|
|
712
|
-
case 139:
|
|
713
|
-
// Phoneme: 'ʋ', bytes: [202, 139]
|
|
714
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Approximant","voiced":true}
|
|
715
|
-
if (max_length > 2) {
|
|
716
|
-
switch(string[cursor + 2]) {
|
|
717
|
-
|
|
718
|
-
case 204:
|
|
719
|
-
if (max_length > 3) {
|
|
720
|
-
switch(string[cursor + 3]) {
|
|
721
|
-
|
|
722
|
-
case 165:
|
|
723
|
-
// Phoneme: 'ʋ̥', bytes: [202, 139, 204, 165]
|
|
724
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Approximant","voiced":false}
|
|
725
|
-
return 4;
|
|
726
|
-
break;
|
|
727
|
-
}
|
|
728
|
-
} else {
|
|
729
|
-
return 3;
|
|
730
|
-
}
|
|
731
|
-
break;
|
|
732
|
-
default:
|
|
733
|
-
return 2;
|
|
734
|
-
}
|
|
735
|
-
} else {
|
|
736
|
-
return 2;
|
|
737
|
-
}
|
|
738
|
-
break;
|
|
739
|
-
case 153:
|
|
740
|
-
// Phoneme: 'ʙ', bytes: [202, 153]
|
|
741
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Trill","voiced":true}
|
|
742
|
-
if (max_length > 2) {
|
|
743
|
-
switch(string[cursor + 2]) {
|
|
744
|
-
|
|
745
|
-
case 204:
|
|
746
|
-
if (max_length > 3) {
|
|
747
|
-
switch(string[cursor + 3]) {
|
|
748
|
-
|
|
749
|
-
case 165:
|
|
750
|
-
// Phoneme: 'ʙ̥', bytes: [202, 153, 204, 165]
|
|
751
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Trill","voiced":false}
|
|
752
|
-
return 4;
|
|
753
|
-
break;
|
|
754
|
-
}
|
|
755
|
-
} else {
|
|
756
|
-
return 3;
|
|
757
|
-
}
|
|
758
|
-
break;
|
|
759
|
-
default:
|
|
760
|
-
return 2;
|
|
761
|
-
}
|
|
762
|
-
} else {
|
|
763
|
-
return 2;
|
|
764
|
-
}
|
|
765
|
-
break;
|
|
766
|
-
case 128:
|
|
767
|
-
// Phoneme: 'ʀ', bytes: [202, 128]
|
|
768
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Trill","voiced":true}
|
|
769
|
-
if (max_length > 2) {
|
|
770
|
-
switch(string[cursor + 2]) {
|
|
771
|
-
|
|
772
|
-
case 204:
|
|
773
|
-
if (max_length > 3) {
|
|
774
|
-
switch(string[cursor + 3]) {
|
|
775
|
-
|
|
776
|
-
case 165:
|
|
777
|
-
// Phoneme: 'ʀ̥', bytes: [202, 128, 204, 165]
|
|
778
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Trill","voiced":false}
|
|
779
|
-
return 4;
|
|
780
|
-
break;
|
|
781
|
-
}
|
|
782
|
-
} else {
|
|
783
|
-
return 3;
|
|
784
|
-
}
|
|
785
|
-
break;
|
|
786
|
-
default:
|
|
787
|
-
return 2;
|
|
788
|
-
}
|
|
789
|
-
} else {
|
|
790
|
-
return 2;
|
|
791
|
-
}
|
|
792
|
-
break;
|
|
793
|
-
case 156:
|
|
794
|
-
// Phoneme: 'ʜ', bytes: [202, 156]
|
|
795
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Trill","voiced":false}
|
|
796
|
-
return 2;
|
|
797
|
-
break;
|
|
798
|
-
case 162:
|
|
799
|
-
// Phoneme: 'ʢ', bytes: [202, 162]
|
|
800
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Trill","voiced":true}
|
|
801
|
-
return 2;
|
|
802
|
-
break;
|
|
803
|
-
case 142:
|
|
804
|
-
// Phoneme: 'ʎ', bytes: [202, 142]
|
|
805
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Lateral approximant","voiced":true}
|
|
806
|
-
if (max_length > 2) {
|
|
807
|
-
switch(string[cursor + 2]) {
|
|
808
|
-
|
|
809
|
-
case 204:
|
|
810
|
-
if (max_length > 3) {
|
|
811
|
-
switch(string[cursor + 3]) {
|
|
812
|
-
|
|
813
|
-
case 157:
|
|
814
|
-
// Phoneme: 'ʎ̝', bytes: [202, 142, 204, 157]
|
|
815
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Lateral fricative","voiced":true}
|
|
816
|
-
if (max_length > 4) {
|
|
817
|
-
switch(string[cursor + 4]) {
|
|
818
|
-
|
|
819
|
-
case 204:
|
|
820
|
-
if (max_length > 5) {
|
|
821
|
-
switch(string[cursor + 5]) {
|
|
822
|
-
|
|
823
|
-
case 138:
|
|
824
|
-
// Phoneme: 'ʎ̝̊', bytes: [202, 142, 204, 157, 204, 138]
|
|
825
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Lateral fricative","voiced":false}
|
|
826
|
-
return 6;
|
|
827
|
-
break;
|
|
828
|
-
}
|
|
829
|
-
} else {
|
|
830
|
-
return 5;
|
|
831
|
-
}
|
|
832
|
-
break;
|
|
833
|
-
default:
|
|
834
|
-
return 4;
|
|
835
|
-
}
|
|
836
|
-
} else {
|
|
837
|
-
return 4;
|
|
838
|
-
}
|
|
839
|
-
break;
|
|
840
|
-
case 165:
|
|
841
|
-
// Phoneme: 'ʎ̥', bytes: [202, 142, 204, 165]
|
|
842
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Lateral approximant","voiced":false}
|
|
843
|
-
return 4;
|
|
844
|
-
break;
|
|
845
|
-
case 134:
|
|
846
|
-
// Phoneme: 'ʎ̆', bytes: [202, 142, 204, 134]
|
|
847
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Lateral tap/flap","voiced":true}
|
|
848
|
-
return 4;
|
|
849
|
-
break;
|
|
850
|
-
}
|
|
851
|
-
} else {
|
|
852
|
-
return 3;
|
|
853
|
-
}
|
|
854
|
-
break;
|
|
855
|
-
default:
|
|
856
|
-
return 2;
|
|
857
|
-
}
|
|
858
|
-
} else {
|
|
859
|
-
return 2;
|
|
860
|
-
}
|
|
861
|
-
break;
|
|
862
|
-
case 159:
|
|
863
|
-
// Phoneme: 'ʟ', bytes: [202, 159]
|
|
864
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Lateral approximant","voiced":true}
|
|
865
|
-
if (max_length > 2) {
|
|
866
|
-
switch(string[cursor + 2]) {
|
|
867
|
-
|
|
868
|
-
case 204:
|
|
869
|
-
if (max_length > 3) {
|
|
870
|
-
switch(string[cursor + 3]) {
|
|
871
|
-
|
|
872
|
-
case 157:
|
|
873
|
-
// Phoneme: 'ʟ̝', bytes: [202, 159, 204, 157]
|
|
874
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Lateral fricative","voiced":true}
|
|
875
|
-
if (max_length > 4) {
|
|
876
|
-
switch(string[cursor + 4]) {
|
|
877
|
-
|
|
878
|
-
case 204:
|
|
879
|
-
if (max_length > 5) {
|
|
880
|
-
switch(string[cursor + 5]) {
|
|
881
|
-
|
|
882
|
-
case 138:
|
|
883
|
-
// Phoneme: 'ʟ̝̊', bytes: [202, 159, 204, 157, 204, 138]
|
|
884
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Lateral fricative","voiced":false}
|
|
885
|
-
return 6;
|
|
886
|
-
break;
|
|
887
|
-
}
|
|
888
|
-
} else {
|
|
889
|
-
return 5;
|
|
890
|
-
}
|
|
891
|
-
break;
|
|
892
|
-
default:
|
|
893
|
-
return 4;
|
|
894
|
-
}
|
|
895
|
-
} else {
|
|
896
|
-
return 4;
|
|
897
|
-
}
|
|
898
|
-
break;
|
|
899
|
-
case 165:
|
|
900
|
-
// Phoneme: 'ʟ̥', bytes: [202, 159, 204, 165]
|
|
901
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Lateral approximant","voiced":false}
|
|
902
|
-
return 4;
|
|
903
|
-
break;
|
|
904
|
-
case 160:
|
|
905
|
-
// Phoneme: 'ʟ̠', bytes: [202, 159, 204, 160]
|
|
906
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Lateral approximant","voiced":true}
|
|
907
|
-
return 4;
|
|
908
|
-
break;
|
|
909
|
-
case 134:
|
|
910
|
-
// Phoneme: 'ʟ̆', bytes: [202, 159, 204, 134]
|
|
911
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Lateral tap/flap","voiced":true}
|
|
912
|
-
return 4;
|
|
913
|
-
break;
|
|
914
|
-
}
|
|
915
|
-
} else {
|
|
916
|
-
return 3;
|
|
917
|
-
}
|
|
918
|
-
break;
|
|
919
|
-
default:
|
|
920
|
-
return 2;
|
|
921
|
-
}
|
|
922
|
-
} else {
|
|
923
|
-
return 2;
|
|
924
|
-
}
|
|
925
|
-
break;
|
|
926
|
-
}
|
|
927
|
-
} else {
|
|
928
|
-
return 1;
|
|
929
|
-
}
|
|
930
|
-
break;
|
|
931
|
-
case 111:
|
|
932
|
-
// Phoneme: 'o', bytes: [111]
|
|
933
|
-
// vowel features: {"F1":360,"F2":640,"rounded":true}
|
|
934
|
-
return 1;
|
|
935
|
-
break;
|
|
936
|
-
case 117:
|
|
937
|
-
// Phoneme: 'u', bytes: [117]
|
|
938
|
-
// vowel features: {"F1":350,"F2":650,"rounded":true}
|
|
939
|
-
return 1;
|
|
940
|
-
break;
|
|
941
|
-
case 109:
|
|
942
|
-
// Phoneme: 'm', bytes: [109]
|
|
943
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Nasal","voiced":true}
|
|
944
|
-
if (max_length > 1) {
|
|
945
|
-
switch(string[cursor + 1]) {
|
|
946
|
-
|
|
947
|
-
case 204:
|
|
948
|
-
if (max_length > 2) {
|
|
949
|
-
switch(string[cursor + 2]) {
|
|
950
|
-
|
|
951
|
-
case 165:
|
|
952
|
-
// Phoneme: 'm̥', bytes: [109, 204, 165]
|
|
953
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Nasal","voiced":false}
|
|
954
|
-
return 3;
|
|
955
|
-
break;
|
|
956
|
-
}
|
|
957
|
-
} else {
|
|
958
|
-
return 2;
|
|
959
|
-
}
|
|
960
|
-
break;
|
|
961
|
-
default:
|
|
962
|
-
return 1;
|
|
963
|
-
}
|
|
964
|
-
} else {
|
|
965
|
-
return 1;
|
|
966
|
-
}
|
|
967
|
-
break;
|
|
968
|
-
case 110:
|
|
969
|
-
// Phoneme: 'n', bytes: [110]
|
|
970
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Nasal","voiced":true}
|
|
971
|
-
if (max_length > 1) {
|
|
972
|
-
switch(string[cursor + 1]) {
|
|
973
|
-
|
|
974
|
-
case 204:
|
|
975
|
-
if (max_length > 2) {
|
|
976
|
-
switch(string[cursor + 2]) {
|
|
977
|
-
|
|
978
|
-
case 188:
|
|
979
|
-
// Phoneme: 'n̼', bytes: [110, 204, 188]
|
|
980
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Nasal","voiced":true}
|
|
981
|
-
return 3;
|
|
982
|
-
break;
|
|
983
|
-
case 165:
|
|
984
|
-
// Phoneme: 'n̥', bytes: [110, 204, 165]
|
|
985
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Nasal","voiced":false}
|
|
986
|
-
return 3;
|
|
987
|
-
break;
|
|
988
|
-
}
|
|
989
|
-
} else {
|
|
990
|
-
return 2;
|
|
991
|
-
}
|
|
992
|
-
break;
|
|
993
|
-
default:
|
|
994
|
-
return 1;
|
|
995
|
-
}
|
|
996
|
-
} else {
|
|
997
|
-
return 1;
|
|
998
|
-
}
|
|
999
|
-
break;
|
|
1000
|
-
case 112:
|
|
1001
|
-
// Phoneme: 'p', bytes: [112]
|
|
1002
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Stop","voiced":false}
|
|
1003
|
-
if (max_length > 1) {
|
|
1004
|
-
switch(string[cursor + 1]) {
|
|
1005
|
-
|
|
1006
|
-
case 204:
|
|
1007
|
-
if (max_length > 2) {
|
|
1008
|
-
switch(string[cursor + 2]) {
|
|
1009
|
-
|
|
1010
|
-
case 170:
|
|
1011
|
-
// Phoneme: 'p̪', bytes: [112, 204, 170]
|
|
1012
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Stop","voiced":false}
|
|
1013
|
-
return 3;
|
|
1014
|
-
break;
|
|
1015
|
-
}
|
|
1016
|
-
} else {
|
|
1017
|
-
return 2;
|
|
1018
|
-
}
|
|
1019
|
-
break;
|
|
1020
|
-
default:
|
|
1021
|
-
return 1;
|
|
1022
|
-
}
|
|
1023
|
-
} else {
|
|
1024
|
-
return 1;
|
|
1025
|
-
}
|
|
1026
|
-
break;
|
|
1027
|
-
case 98:
|
|
1028
|
-
// Phoneme: 'b', bytes: [98]
|
|
1029
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Stop","voiced":true}
|
|
1030
|
-
if (max_length > 1) {
|
|
1031
|
-
switch(string[cursor + 1]) {
|
|
1032
|
-
|
|
1033
|
-
case 204:
|
|
1034
|
-
if (max_length > 2) {
|
|
1035
|
-
switch(string[cursor + 2]) {
|
|
1036
|
-
|
|
1037
|
-
case 170:
|
|
1038
|
-
// Phoneme: 'b̪', bytes: [98, 204, 170]
|
|
1039
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Stop","voiced":true}
|
|
1040
|
-
return 3;
|
|
1041
|
-
break;
|
|
1042
|
-
}
|
|
1043
|
-
} else {
|
|
1044
|
-
return 2;
|
|
1045
|
-
}
|
|
1046
|
-
break;
|
|
1047
|
-
default:
|
|
1048
|
-
return 1;
|
|
1049
|
-
}
|
|
1050
|
-
} else {
|
|
1051
|
-
return 1;
|
|
1052
|
-
}
|
|
1053
|
-
break;
|
|
1054
|
-
case 116:
|
|
1055
|
-
// Phoneme: 't', bytes: [116]
|
|
1056
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Stop","voiced":false}
|
|
1057
|
-
if (max_length > 1) {
|
|
1058
|
-
switch(string[cursor + 1]) {
|
|
1059
|
-
|
|
1060
|
-
case 204:
|
|
1061
|
-
if (max_length > 2) {
|
|
1062
|
-
switch(string[cursor + 2]) {
|
|
1063
|
-
|
|
1064
|
-
case 188:
|
|
1065
|
-
// Phoneme: 't̼', bytes: [116, 204, 188]
|
|
1066
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Stop","voiced":false}
|
|
1067
|
-
return 3;
|
|
1068
|
-
break;
|
|
1069
|
-
}
|
|
1070
|
-
} else {
|
|
1071
|
-
return 2;
|
|
1072
|
-
}
|
|
1073
|
-
break;
|
|
1074
|
-
default:
|
|
1075
|
-
return 1;
|
|
1076
|
-
}
|
|
1077
|
-
} else {
|
|
1078
|
-
return 1;
|
|
1079
|
-
}
|
|
1080
|
-
break;
|
|
1081
|
-
case 100:
|
|
1082
|
-
// Phoneme: 'd', bytes: [100]
|
|
1083
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Stop","voiced":true}
|
|
1084
|
-
if (max_length > 1) {
|
|
1085
|
-
switch(string[cursor + 1]) {
|
|
1086
|
-
|
|
1087
|
-
case 204:
|
|
1088
|
-
if (max_length > 2) {
|
|
1089
|
-
switch(string[cursor + 2]) {
|
|
1090
|
-
|
|
1091
|
-
case 188:
|
|
1092
|
-
// Phoneme: 'd̼', bytes: [100, 204, 188]
|
|
1093
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Stop","voiced":true}
|
|
1094
|
-
return 3;
|
|
1095
|
-
break;
|
|
1096
|
-
}
|
|
1097
|
-
} else {
|
|
1098
|
-
return 2;
|
|
1099
|
-
}
|
|
1100
|
-
break;
|
|
1101
|
-
default:
|
|
1102
|
-
return 1;
|
|
1103
|
-
}
|
|
1104
|
-
} else {
|
|
1105
|
-
return 1;
|
|
1106
|
-
}
|
|
1107
|
-
break;
|
|
1108
|
-
case 99:
|
|
1109
|
-
// Phoneme: 'c', bytes: [99]
|
|
1110
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Stop","voiced":false}
|
|
1111
|
-
return 1;
|
|
1112
|
-
break;
|
|
1113
|
-
case 107:
|
|
1114
|
-
// Phoneme: 'k', bytes: [107]
|
|
1115
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Stop","voiced":false}
|
|
1116
|
-
return 1;
|
|
1117
|
-
break;
|
|
1118
|
-
case 103:
|
|
1119
|
-
// Phoneme: 'g', bytes: [103]
|
|
1120
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Stop","voiced":true}
|
|
1121
|
-
return 1;
|
|
1122
|
-
break;
|
|
1123
|
-
case 113:
|
|
1124
|
-
// Phoneme: 'q', bytes: [113]
|
|
1125
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Stop","voiced":false}
|
|
1126
|
-
return 1;
|
|
1127
|
-
break;
|
|
1128
|
-
case 115:
|
|
1129
|
-
// Phoneme: 's', bytes: [115]
|
|
1130
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Sibilant fricative","voiced":false}
|
|
1131
|
-
return 1;
|
|
1132
|
-
break;
|
|
1133
|
-
case 122:
|
|
1134
|
-
// Phoneme: 'z', bytes: [122]
|
|
1135
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Sibilant fricative","voiced":true}
|
|
1136
|
-
return 1;
|
|
1137
|
-
break;
|
|
1138
|
-
case 206:
|
|
1139
|
-
if (max_length > 1) {
|
|
1140
|
-
switch(string[cursor + 1]) {
|
|
1141
|
-
|
|
1142
|
-
case 178:
|
|
1143
|
-
// Phoneme: 'β', bytes: [206, 178]
|
|
1144
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Non-sibilant fricative","voiced":true}
|
|
1145
|
-
return 2;
|
|
1146
|
-
break;
|
|
1147
|
-
case 184:
|
|
1148
|
-
// Phoneme: 'θ', bytes: [206, 184]
|
|
1149
|
-
// consonant features: {"position":"Dental","position_index":4,"manner":"Non-sibilant fricative","voiced":false}
|
|
1150
|
-
if (max_length > 2) {
|
|
1151
|
-
switch(string[cursor + 2]) {
|
|
1152
|
-
|
|
1153
|
-
case 204:
|
|
1154
|
-
if (max_length > 3) {
|
|
1155
|
-
switch(string[cursor + 3]) {
|
|
1156
|
-
|
|
1157
|
-
case 188:
|
|
1158
|
-
// Phoneme: 'θ̼', bytes: [206, 184, 204, 188]
|
|
1159
|
-
// consonant features: {"position":"Linguo-labial","position_index":3,"manner":"Non-sibilant fricative","voiced":false}
|
|
1160
|
-
return 4;
|
|
1161
|
-
break;
|
|
1162
|
-
case 160:
|
|
1163
|
-
// Phoneme: 'θ̠', bytes: [206, 184, 204, 160]
|
|
1164
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Non-sibilant fricative","voiced":false}
|
|
1165
|
-
return 4;
|
|
1166
|
-
break;
|
|
1167
|
-
}
|
|
1168
|
-
} else {
|
|
1169
|
-
return 3;
|
|
1170
|
-
}
|
|
1171
|
-
break;
|
|
1172
|
-
default:
|
|
1173
|
-
return 2;
|
|
1174
|
-
}
|
|
1175
|
-
} else {
|
|
1176
|
-
return 2;
|
|
1177
|
-
}
|
|
1178
|
-
break;
|
|
1179
|
-
}
|
|
1180
|
-
} else {
|
|
1181
|
-
return 1;
|
|
1182
|
-
}
|
|
1183
|
-
break;
|
|
1184
|
-
case 102:
|
|
1185
|
-
// Phoneme: 'f', bytes: [102]
|
|
1186
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Non-sibilant fricative","voiced":false}
|
|
1187
|
-
return 1;
|
|
1188
|
-
break;
|
|
1189
|
-
case 118:
|
|
1190
|
-
// Phoneme: 'v', bytes: [118]
|
|
1191
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Non-sibilant fricative","voiced":true}
|
|
1192
|
-
return 1;
|
|
1193
|
-
break;
|
|
1194
|
-
case 120:
|
|
1195
|
-
// Phoneme: 'x', bytes: [120]
|
|
1196
|
-
// consonant features: {"position":"Velar","position_index":9,"manner":"Non-sibilant fricative","voiced":false}
|
|
1197
|
-
return 1;
|
|
1198
|
-
break;
|
|
1199
|
-
case 207:
|
|
1200
|
-
if (max_length > 1) {
|
|
1201
|
-
switch(string[cursor + 1]) {
|
|
1202
|
-
|
|
1203
|
-
case 135:
|
|
1204
|
-
// Phoneme: 'χ', bytes: [207, 135]
|
|
1205
|
-
// consonant features: {"position":"Uvular","position_index":10,"manner":"Non-sibilant fricative","voiced":false}
|
|
1206
|
-
return 2;
|
|
1207
|
-
break;
|
|
1208
|
-
}
|
|
1209
|
-
} else {
|
|
1210
|
-
return 1;
|
|
1211
|
-
}
|
|
1212
|
-
break;
|
|
1213
|
-
case 196:
|
|
1214
|
-
if (max_length > 1) {
|
|
1215
|
-
switch(string[cursor + 1]) {
|
|
1216
|
-
|
|
1217
|
-
case 167:
|
|
1218
|
-
// Phoneme: 'ħ', bytes: [196, 167]
|
|
1219
|
-
// consonant features: {"position":"Pharyngeal","position_index":11,"manner":"Non-sibilant fricative","voiced":false}
|
|
1220
|
-
return 2;
|
|
1221
|
-
break;
|
|
1222
|
-
}
|
|
1223
|
-
} else {
|
|
1224
|
-
return 1;
|
|
1225
|
-
}
|
|
1226
|
-
break;
|
|
1227
|
-
case 104:
|
|
1228
|
-
// Phoneme: 'h', bytes: [104]
|
|
1229
|
-
// consonant features: {"position":"Glottal","position_index":12,"manner":"Non-sibilant fricative","voiced":false}
|
|
1230
|
-
return 1;
|
|
1231
|
-
break;
|
|
1232
|
-
case 119:
|
|
1233
|
-
// Phoneme: 'w', bytes: [119]
|
|
1234
|
-
// consonant features: {"position":"Labio-velar","position_index":0,"manner":"Approximant","voiced":true}
|
|
1235
|
-
return 1;
|
|
1236
|
-
break;
|
|
1237
|
-
case 106:
|
|
1238
|
-
// Phoneme: 'j', bytes: [106]
|
|
1239
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Approximant","voiced":true}
|
|
1240
|
-
if (max_length > 1) {
|
|
1241
|
-
switch(string[cursor + 1]) {
|
|
1242
|
-
|
|
1243
|
-
case 204:
|
|
1244
|
-
if (max_length > 2) {
|
|
1245
|
-
switch(string[cursor + 2]) {
|
|
1246
|
-
|
|
1247
|
-
case 138:
|
|
1248
|
-
// Phoneme: 'j̊', bytes: [106, 204, 138]
|
|
1249
|
-
// consonant features: {"position":"Palatal","position_index":8,"manner":"Approximant","voiced":false}
|
|
1250
|
-
return 3;
|
|
1251
|
-
break;
|
|
1252
|
-
}
|
|
1253
|
-
} else {
|
|
1254
|
-
return 2;
|
|
1255
|
-
}
|
|
1256
|
-
break;
|
|
1257
|
-
default:
|
|
1258
|
-
return 1;
|
|
1259
|
-
}
|
|
1260
|
-
} else {
|
|
1261
|
-
return 1;
|
|
1262
|
-
}
|
|
1263
|
-
break;
|
|
1264
|
-
case 226:
|
|
1265
|
-
if (max_length > 1) {
|
|
1266
|
-
switch(string[cursor + 1]) {
|
|
1267
|
-
|
|
1268
|
-
case 177:
|
|
1269
|
-
if (max_length > 2) {
|
|
1270
|
-
switch(string[cursor + 2]) {
|
|
1271
|
-
|
|
1272
|
-
case 177:
|
|
1273
|
-
// Phoneme: 'ⱱ', bytes: [226, 177, 177]
|
|
1274
|
-
// consonant features: {"position":"Labio-dental","position_index":2,"manner":"Tap/flap","voiced":true}
|
|
1275
|
-
if (max_length > 3) {
|
|
1276
|
-
switch(string[cursor + 3]) {
|
|
1277
|
-
|
|
1278
|
-
case 204:
|
|
1279
|
-
if (max_length > 4) {
|
|
1280
|
-
switch(string[cursor + 4]) {
|
|
1281
|
-
|
|
1282
|
-
case 159:
|
|
1283
|
-
// Phoneme: 'ⱱ̟', bytes: [226, 177, 177, 204, 159]
|
|
1284
|
-
// consonant features: {"position":"Bi-labial","position_index":1,"manner":"Tap/flap","voiced":true}
|
|
1285
|
-
return 5;
|
|
1286
|
-
break;
|
|
1287
|
-
}
|
|
1288
|
-
} else {
|
|
1289
|
-
return 4;
|
|
1290
|
-
}
|
|
1291
|
-
break;
|
|
1292
|
-
default:
|
|
1293
|
-
return 3;
|
|
1294
|
-
}
|
|
1295
|
-
} else {
|
|
1296
|
-
return 3;
|
|
1297
|
-
}
|
|
1298
|
-
break;
|
|
1299
|
-
}
|
|
1300
|
-
} else {
|
|
1301
|
-
return 2;
|
|
1302
|
-
}
|
|
1303
|
-
break;
|
|
1304
|
-
}
|
|
1305
|
-
} else {
|
|
1306
|
-
return 1;
|
|
1307
|
-
}
|
|
1308
|
-
break;
|
|
1309
|
-
case 114:
|
|
1310
|
-
// Phoneme: 'r', bytes: [114]
|
|
1311
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Trill","voiced":true}
|
|
1312
|
-
if (max_length > 1) {
|
|
1313
|
-
switch(string[cursor + 1]) {
|
|
1314
|
-
|
|
1315
|
-
case 204:
|
|
1316
|
-
if (max_length > 2) {
|
|
1317
|
-
switch(string[cursor + 2]) {
|
|
1318
|
-
|
|
1319
|
-
case 165:
|
|
1320
|
-
// Phoneme: 'r̥', bytes: [114, 204, 165]
|
|
1321
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Trill","voiced":false}
|
|
1322
|
-
return 3;
|
|
1323
|
-
break;
|
|
1324
|
-
}
|
|
1325
|
-
} else {
|
|
1326
|
-
return 2;
|
|
1327
|
-
}
|
|
1328
|
-
break;
|
|
1329
|
-
default:
|
|
1330
|
-
return 1;
|
|
1331
|
-
}
|
|
1332
|
-
} else {
|
|
1333
|
-
return 1;
|
|
1334
|
-
}
|
|
1335
|
-
break;
|
|
1336
|
-
case 108:
|
|
1337
|
-
// Phoneme: 'l', bytes: [108]
|
|
1338
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Lateral approximant","voiced":true}
|
|
1339
|
-
if (max_length > 1) {
|
|
1340
|
-
switch(string[cursor + 1]) {
|
|
1341
|
-
|
|
1342
|
-
case 204:
|
|
1343
|
-
if (max_length > 2) {
|
|
1344
|
-
switch(string[cursor + 2]) {
|
|
1345
|
-
|
|
1346
|
-
case 165:
|
|
1347
|
-
// Phoneme: 'l̥', bytes: [108, 204, 165]
|
|
1348
|
-
// consonant features: {"position":"Alveolar","position_index":5,"manner":"Lateral approximant","voiced":false}
|
|
1349
|
-
return 3;
|
|
1350
|
-
break;
|
|
1351
|
-
}
|
|
1352
|
-
} else {
|
|
1353
|
-
return 2;
|
|
1354
|
-
}
|
|
1355
|
-
break;
|
|
1356
|
-
default:
|
|
1357
|
-
return 1;
|
|
1358
|
-
}
|
|
1359
|
-
} else {
|
|
1360
|
-
return 1;
|
|
1361
|
-
}
|
|
1362
|
-
break;
|
|
1363
|
-
}
|
|
1364
|
-
return 0;
|
|
1365
|
-
}
|