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