ting 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +16 -0
- data/README.rdoc +94 -0
- data/Rakefile +15 -0
- data/TODO +15 -0
- data/examples/cgiform/cgiform.rb +24 -0
- data/examples/cgiform/template.rhtml +69 -0
- data/examples/hello.rb +12 -0
- data/lib/ting.rb +93 -0
- data/lib/ting/conversion.rb +51 -0
- data/lib/ting/conversions.rb +75 -0
- data/lib/ting/conversions/hanyu.rb +77 -0
- data/lib/ting/data/comparison.csv +410 -0
- data/lib/ting/data/final.csv +10 -0
- data/lib/ting/data/initial.csv +7 -0
- data/lib/ting/data/paladiy.txt +421 -0
- data/lib/ting/data/rules.yaml +24 -0
- data/lib/ting/data/valid_pinyin.yaml +454 -0
- data/lib/ting/exception.rb +17 -0
- data/lib/ting/groundwork.rb +177 -0
- data/lib/ting/string.rb +17 -0
- data/lib/ting/support.rb +19 -0
- data/lib/ting/tones.rb +65 -0
- data/lib/ting/tones/accents.rb +62 -0
- data/lib/ting/tones/ipa.rb +24 -0
- data/lib/ting/tones/marks.rb +30 -0
- data/lib/ting/tones/no_tones.rb +7 -0
- data/lib/ting/tones/numbers.rb +25 -0
- data/lib/ting/tones/supernum.rb +24 -0
- data/test/test_comparison.rb +35 -0
- data/test/test_hanyu_coverage.rb +35 -0
- metadata +95 -0
@@ -0,0 +1,10 @@
|
|
1
|
+
"name","Empty","A","O","E","Ee","Ai","Ei","Ao","Ou","An","En","Ang","Eng","Ong","Er","I","Ia","Io","Ie","Iai","Iao","Iu","Ian","In","Iang","Ing","U","Ua","Uo","Uai","Ui","Uan","Un","Uang","Ueng","V","Ue","Van","Vn","Iong"
|
2
|
+
"hanyu","i","a","o","e",,"ai","ei","ao","ou","an","en","ang","eng","ong",,"i","ia",,"ie",,"iao","iu","ian","in","iang","ing","u","ua","uo","uai","ui","uan","un","uang",,"ü","üe","üan","ün","iong"
|
3
|
+
"hanyu_standalone",,"a","o","e","ê","ai","ei","ao","ou","an","en","ang","eng",,"er","yi","ya","yo","ye","yai","yao","you","yan","yin","yang","ying","wu","wa","wo","wai","wei","wan","wen","wang","weng","yu","yue","yuan","yun","yong"
|
4
|
+
"hanyu_no_abbrev","i","a","o","e",,"ai","ei","ao","ou","an","en","ang","eng","ong",,"i","ia","io","ie","iai","iao","iou","ian","ien","iang","ieng","u","ua","uo","uai","uei","uan","uen","uang","ueng","ü","üe","üan","üen","iong"
|
5
|
+
"ipa",,"a","ɔ","ə",,"ai","ei","au","ou","an","en","aŋ","eŋ","ʊŋ","aɻ","i",,,"iɛ",,,"iou","iɛn","ɪn",,"iŋ","u",,"uɔ",,"uei","uan",,,"ueŋ","y","yuɛ","yɛn","yn","yʊŋ"
|
6
|
+
"tongyong","ih","a","o","e",,"ai","ei","ao","ou","an","en","ang","eng","ong",,"i","ia",,"ie",,"iao","iou","ian","in","iang","ing","u","ua","uo","uai","uei","uan","un","uang",,"yu","yue","yuan","yun","yong"
|
7
|
+
"tongyong_standalone",,"a","o","e","ê","ai","ei","ao","ou","an","en","ang","eng",,"er","yi","ya","yo","ye","yai","yao","you","yan","yin","yang","ying","wu","wa","wo","wai","wei","wan","wun","wang","wong","yu","yue","yuan","yun","yong"
|
8
|
+
"wadegiles","ih","a","o","e",,"ai","ei","ao","ou","an","en","ang","eng","ung","erh","i","ia",,"ieh",,"iao","iu","ien","in","iang","ing","u","ua","uo","uai","ui","uan","un","uang",,"ü","üeh","üan","ün","iung"
|
9
|
+
"wadegiles_standalone",,,,,,,,,,,,,,,,,"ya",,"yeh",,"yao","yu","yan","yin","yang","ying","wu","wa","wo","wai","wei","wan","wen","wang","weng","yü","yüeh","yüan","yün","yung"
|
10
|
+
"zhuyin",,"ㄚ","ㄛ","ㄜ","ㄝ","ㄞ","ㄟ","ㄠ","ㄡ","ㄢ","ㄣ","ㄤ","ㄥ","ㄨㄥ","ㄦ","ㄧ","ㄧㄚ",,"ㄧㄝ",,"ㄧㄠ","ㄧㄡ","ㄧㄢ","ㄧㄣ","ㄧㄤ","ㄧㄥ","ㄨ","ㄨㄚ","ㄨㄛ","ㄨㄞ","ㄨㄟ","ㄨㄢ","ㄨㄣ","ㄨㄤ","ㄨㄥ","ㄩ","ㄩㄝ","ㄩㄢ","ㄩㄣ","ㄩㄥ"
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"name","Empty","Bo","Po","Mo","Fo","De","Te","Ne","Le","Ge","Ke","He","Ji","Qi","Xi","Zhi","Chi","Shi","Ri","Zi","Ci","Si"
|
2
|
+
"hanyu",,"b","p","m","f","d","t","n","l","g","k","h","j","q","x","zh","ch","sh","r","z","c","s"
|
3
|
+
"ipa",,"p","pʰ","m","f","t","tʰ","n","l","k","kʰ","x","tɕ","tɕʰ","ɕ","ʈʂ","ʈʂʰ","ʂ","ʐ","ts","tsʰ","s"
|
4
|
+
"ipa_alt",,,,,,,,,,,,,,,,,,,"ɻ",,,
|
5
|
+
"tongyong",,"b","p","m","f","d","t","n","l","g","k","h","j","c","s","jh","ch","sh","r","z","c","s"
|
6
|
+
"wadegiles",,"p","p`","m","f","t","t`","n","l","k","k`","h","ch","ch`","hs","ch","ch`","sh","j","ts","ts`","s"
|
7
|
+
"zhuyin",,"ㄅ","ㄆ","ㄇ","ㄈ","ㄉ","ㄊ","ㄋ","ㄌ","ㄍ","ㄎ","ㄏ","ㄐ","ㄑ","ㄒ","ㄓ","ㄔ","ㄕ","ㄖ","ㄗ","ㄘ","ㄙ"
|
@@ -0,0 +1,421 @@
|
|
1
|
+
a;а
|
2
|
+
ai;ай
|
3
|
+
an;ань
|
4
|
+
ang;ан
|
5
|
+
ao;ао
|
6
|
+
ba;ба
|
7
|
+
bai;бай
|
8
|
+
ban;бань
|
9
|
+
bang;бан
|
10
|
+
bao;бао
|
11
|
+
bei;бэй
|
12
|
+
ben;бэнь
|
13
|
+
beng;бэн
|
14
|
+
bi;би
|
15
|
+
bian;бянь
|
16
|
+
biao;бяо
|
17
|
+
bie;бе
|
18
|
+
bin;бинь
|
19
|
+
bing;бин
|
20
|
+
bo;бо
|
21
|
+
bu;бу
|
22
|
+
ca;ца
|
23
|
+
cai;цай
|
24
|
+
can;цань
|
25
|
+
cang;цан
|
26
|
+
cao;цао
|
27
|
+
ce;цэ
|
28
|
+
cen;цэнь
|
29
|
+
ceng;цэн
|
30
|
+
cha;ча
|
31
|
+
chai;чай
|
32
|
+
chan;чань
|
33
|
+
chang;чан
|
34
|
+
chao;чао
|
35
|
+
che;чэ
|
36
|
+
chen;чэнь
|
37
|
+
cheng;чэн
|
38
|
+
chi;чи
|
39
|
+
chong;чун
|
40
|
+
chou;чоу
|
41
|
+
chu;чу
|
42
|
+
chua;чуа
|
43
|
+
chuai;чуай
|
44
|
+
chuan;чуань
|
45
|
+
chuang;чуан
|
46
|
+
chui;чуй
|
47
|
+
chun;чунь
|
48
|
+
chuo;чуо
|
49
|
+
ci;цы
|
50
|
+
cong;цун
|
51
|
+
cou;цоу
|
52
|
+
cu;цу
|
53
|
+
cuan;цуань
|
54
|
+
cui;цуй
|
55
|
+
cun;цунь
|
56
|
+
cuo;цо
|
57
|
+
da;да
|
58
|
+
dai;дай
|
59
|
+
dan;дань
|
60
|
+
dang;дан
|
61
|
+
dao;дао
|
62
|
+
de;дэ
|
63
|
+
dei;дэй
|
64
|
+
den;дэнь
|
65
|
+
deng;дэн
|
66
|
+
di;ди
|
67
|
+
dia;дя
|
68
|
+
dian;дянь
|
69
|
+
diang;дян
|
70
|
+
diao;дяо
|
71
|
+
die;де
|
72
|
+
ding;дин
|
73
|
+
diu;дю
|
74
|
+
dong;дун
|
75
|
+
dou;доу
|
76
|
+
du;ду
|
77
|
+
duan;дуань
|
78
|
+
dui;дуй
|
79
|
+
dun;дунь
|
80
|
+
duo;дуо
|
81
|
+
e;э
|
82
|
+
ei;эй
|
83
|
+
en;энь
|
84
|
+
eng;эн
|
85
|
+
er;эр
|
86
|
+
fa;фа
|
87
|
+
fan;фань
|
88
|
+
fang;фан
|
89
|
+
fei;фэй
|
90
|
+
fen;фэнь
|
91
|
+
feng;фэн
|
92
|
+
fiao;фяо
|
93
|
+
fo;фо
|
94
|
+
fou;фоу
|
95
|
+
fu;фу
|
96
|
+
ga;га
|
97
|
+
gai;гай
|
98
|
+
gan;гань
|
99
|
+
gang;ган
|
100
|
+
gao;гао
|
101
|
+
ge;гэ
|
102
|
+
gei;гэй
|
103
|
+
gen;гэнь
|
104
|
+
geng;гэн
|
105
|
+
go;го
|
106
|
+
gong;гун
|
107
|
+
gou;гоу
|
108
|
+
gu;гу
|
109
|
+
gua;гуа
|
110
|
+
guai;гуай
|
111
|
+
guan;гуань
|
112
|
+
guang;гуан
|
113
|
+
gui;гуй
|
114
|
+
gun;гунь
|
115
|
+
guo;го
|
116
|
+
ha;ха
|
117
|
+
hai;хай
|
118
|
+
han;хань
|
119
|
+
hang;хан
|
120
|
+
hao;хао
|
121
|
+
he;хэ
|
122
|
+
hei;хэй
|
123
|
+
hen;хэнь
|
124
|
+
heng;хэн
|
125
|
+
hm;хм
|
126
|
+
hng;хнг
|
127
|
+
hong;хун
|
128
|
+
hou;хоу
|
129
|
+
hu;ху
|
130
|
+
hua;хуа
|
131
|
+
huai;хуай
|
132
|
+
huan;хуань
|
133
|
+
huang;хуан
|
134
|
+
hui;хой
|
135
|
+
hun;хунь
|
136
|
+
huo;хо
|
137
|
+
ji;цзи
|
138
|
+
jia;цзя
|
139
|
+
jian;цзянь
|
140
|
+
jiang;цзян
|
141
|
+
jiao;цзяо
|
142
|
+
jie;цзе
|
143
|
+
jin;цзинь
|
144
|
+
jing;цзин
|
145
|
+
jiong;цзюн
|
146
|
+
jiu;цзю
|
147
|
+
ju;цзюй
|
148
|
+
juan;цзюань
|
149
|
+
jue;цзюе
|
150
|
+
jun;цзюнь
|
151
|
+
ka;ка
|
152
|
+
kai;кай
|
153
|
+
kan;кань
|
154
|
+
kang;кан
|
155
|
+
kao;као
|
156
|
+
ke;кэ
|
157
|
+
kei;кэй
|
158
|
+
ken;кэнь
|
159
|
+
keng;кэн
|
160
|
+
kong;кун
|
161
|
+
kou;коу
|
162
|
+
ku;ку
|
163
|
+
kua;куа
|
164
|
+
kuai;куай
|
165
|
+
kuan;куань
|
166
|
+
kuang;куан
|
167
|
+
kui;куй
|
168
|
+
kun;кунь
|
169
|
+
kuo;ко
|
170
|
+
la;ла
|
171
|
+
lai;лай
|
172
|
+
lan;лань
|
173
|
+
lang;лан
|
174
|
+
lao;лао
|
175
|
+
le;лэ
|
176
|
+
lei;лэй
|
177
|
+
leng;лэн
|
178
|
+
li;ли
|
179
|
+
lia;ля
|
180
|
+
lian;лянь
|
181
|
+
liang;лян
|
182
|
+
liao;ляо
|
183
|
+
lie;ле
|
184
|
+
lin;линь
|
185
|
+
ling;лин
|
186
|
+
liu;лю
|
187
|
+
lo;ло
|
188
|
+
long;лун
|
189
|
+
lou;лоу
|
190
|
+
lu;лу
|
191
|
+
lü;люй
|
192
|
+
luan;луань
|
193
|
+
lüe;люэ
|
194
|
+
lun;лунь
|
195
|
+
luo;ло
|
196
|
+
m;м
|
197
|
+
ma;ма
|
198
|
+
mai;май
|
199
|
+
man;мань
|
200
|
+
mang;ман
|
201
|
+
mao;мао
|
202
|
+
me;мэ
|
203
|
+
mei;мэй
|
204
|
+
men;мэнь
|
205
|
+
meng;мэн
|
206
|
+
mi;ми
|
207
|
+
mian;мянь
|
208
|
+
miao;мяо
|
209
|
+
mie;ме
|
210
|
+
min;минь
|
211
|
+
ming;мин
|
212
|
+
miu;мю
|
213
|
+
mm;мм
|
214
|
+
mo;мо
|
215
|
+
mou;моу
|
216
|
+
mu;му
|
217
|
+
n;н
|
218
|
+
na;на
|
219
|
+
nai;най
|
220
|
+
nan;нань
|
221
|
+
nang;нан
|
222
|
+
nao;нао
|
223
|
+
ne;нэ
|
224
|
+
nei;нэй
|
225
|
+
nen;нэнь
|
226
|
+
neng;нэн
|
227
|
+
ng;нг
|
228
|
+
ni;ни
|
229
|
+
nia;ня
|
230
|
+
nian;нянь
|
231
|
+
niang;нян
|
232
|
+
niao;няо
|
233
|
+
nie;не
|
234
|
+
nin;нинь
|
235
|
+
ning;нин
|
236
|
+
niu;ню
|
237
|
+
nong;нун
|
238
|
+
nou;ноу
|
239
|
+
nu;ну
|
240
|
+
nü;нюй
|
241
|
+
nuan;нуань
|
242
|
+
nüe;нюэ
|
243
|
+
nuo;но
|
244
|
+
o;о
|
245
|
+
ou;оу
|
246
|
+
pa;па
|
247
|
+
pai;пай
|
248
|
+
pan;пань
|
249
|
+
pang;пан
|
250
|
+
pao;пао
|
251
|
+
pei;пэй
|
252
|
+
pen;пэнь
|
253
|
+
peng;пэн
|
254
|
+
pi;пи
|
255
|
+
pian;пянь
|
256
|
+
piao;пяо
|
257
|
+
pie;пе
|
258
|
+
pin;пинь
|
259
|
+
ping;пин
|
260
|
+
po;по
|
261
|
+
pou;поу
|
262
|
+
pu;пу
|
263
|
+
qi;ци
|
264
|
+
qia;ця
|
265
|
+
qian;цянь
|
266
|
+
qiang;цян
|
267
|
+
qiao;цяо
|
268
|
+
qie;це
|
269
|
+
qin;цинь
|
270
|
+
qing;цин
|
271
|
+
qiong;цюн
|
272
|
+
qiu;цю
|
273
|
+
qu;цюй
|
274
|
+
quan;цюань
|
275
|
+
que;цюэ
|
276
|
+
qun;цюнь
|
277
|
+
ran;жань
|
278
|
+
rang;жан
|
279
|
+
rao;жао
|
280
|
+
re;жэ
|
281
|
+
ren;жэнь
|
282
|
+
reng;жэн
|
283
|
+
ri;жи
|
284
|
+
rong;жун
|
285
|
+
rou;жоу
|
286
|
+
ru;жу
|
287
|
+
rua;жуа
|
288
|
+
ruan;жуань
|
289
|
+
rui;жуй
|
290
|
+
run;жунь
|
291
|
+
ruo;жо
|
292
|
+
sa;са
|
293
|
+
sai;сай
|
294
|
+
san;сань
|
295
|
+
sang;сан
|
296
|
+
sao;сао
|
297
|
+
se;сэ
|
298
|
+
sen;сэнь
|
299
|
+
seng;сэн
|
300
|
+
sha;ша
|
301
|
+
shai;шай
|
302
|
+
shan;шань
|
303
|
+
shang;шан
|
304
|
+
shao;шао
|
305
|
+
she;шэ
|
306
|
+
shei;шэй
|
307
|
+
shen;шэнь
|
308
|
+
sheng;шэн
|
309
|
+
shi;ши
|
310
|
+
shou;шоу
|
311
|
+
shu;шу
|
312
|
+
shua;шуа
|
313
|
+
shuai;шуай
|
314
|
+
shuan;шуань
|
315
|
+
shuang;шуан
|
316
|
+
shui;шуй
|
317
|
+
shun;шунь
|
318
|
+
shuo;шуо
|
319
|
+
si;сы
|
320
|
+
song;сун
|
321
|
+
sou;соу
|
322
|
+
su;су
|
323
|
+
suan;суань
|
324
|
+
sui;суй
|
325
|
+
sun;сунь
|
326
|
+
suo;суо
|
327
|
+
ta;та
|
328
|
+
tai;тай
|
329
|
+
tan;тань
|
330
|
+
tang;тан
|
331
|
+
tao;тао
|
332
|
+
te;тэ
|
333
|
+
teng;тэн
|
334
|
+
ti;ти
|
335
|
+
tian;тянь
|
336
|
+
tiao;тяо
|
337
|
+
tie;те
|
338
|
+
ting;тин
|
339
|
+
tong;тун
|
340
|
+
tou;тоу
|
341
|
+
tu;ту
|
342
|
+
tuan;туань
|
343
|
+
tui;туй
|
344
|
+
tun;тунь
|
345
|
+
tuo;туо
|
346
|
+
wa;ва
|
347
|
+
wai;вай
|
348
|
+
wan;вань
|
349
|
+
wang;ван
|
350
|
+
wei;вэй
|
351
|
+
wen;вэнь
|
352
|
+
weng;вэн
|
353
|
+
wo;во
|
354
|
+
wu;у
|
355
|
+
xi;си
|
356
|
+
xia;ся
|
357
|
+
xian;сянь
|
358
|
+
xiang;сян
|
359
|
+
xiao;сяо
|
360
|
+
xie;се
|
361
|
+
xin;синь
|
362
|
+
xing;син
|
363
|
+
xiong;сюн
|
364
|
+
xiu;сю
|
365
|
+
xu;сюй
|
366
|
+
xuan;сюань
|
367
|
+
xue;сюэ
|
368
|
+
xun;сюнь
|
369
|
+
ya;я
|
370
|
+
yai;яй
|
371
|
+
yan;янь
|
372
|
+
yang;ян
|
373
|
+
yao;яо
|
374
|
+
ye;е
|
375
|
+
yi;и
|
376
|
+
yin;инь
|
377
|
+
ying;ин
|
378
|
+
yo;ё
|
379
|
+
yong;юн
|
380
|
+
you;ю
|
381
|
+
yu;юй
|
382
|
+
yuan;юань
|
383
|
+
yue;юэ
|
384
|
+
yun;юнь
|
385
|
+
za;цза
|
386
|
+
zai;цзай
|
387
|
+
zan;цзань
|
388
|
+
zang;цзан
|
389
|
+
zao;цзао
|
390
|
+
ze;цзэ
|
391
|
+
zei;цзэй
|
392
|
+
zen;цзэнь
|
393
|
+
zeng;цзэн
|
394
|
+
zha;чжа
|
395
|
+
zhai;чжай
|
396
|
+
zhan;чжань
|
397
|
+
zhang;чжан
|
398
|
+
zhao;чжао
|
399
|
+
zhe;чжэ
|
400
|
+
zhei;чжэй
|
401
|
+
zhen;чжэнь
|
402
|
+
zheng;чжэн
|
403
|
+
zhi;чжи
|
404
|
+
zhong;чжун
|
405
|
+
zhou;чжоу
|
406
|
+
zhu;чжу
|
407
|
+
zhua;чжуа
|
408
|
+
zhuai;чжуай
|
409
|
+
zhuan;чжуань
|
410
|
+
zhuang;чжуан
|
411
|
+
zhui;чжуй
|
412
|
+
zhun;чжунь
|
413
|
+
zhuo;чжо
|
414
|
+
zi;цзы
|
415
|
+
zong;цзун
|
416
|
+
zou;цзоу
|
417
|
+
zu;цзу
|
418
|
+
zuan;цзуань
|
419
|
+
zui;цзуй
|
420
|
+
zun;цзунь
|
421
|
+
zuo;цзо
|
@@ -0,0 +1,24 @@
|
|
1
|
+
hanyu: - match: (j|q|x)ü
|
2
|
+
subst: \1u
|
3
|
+
wadegiles: - match: pie\Z
|
4
|
+
subst: pieh
|
5
|
+
- match: (ts|ch)`eh
|
6
|
+
subst: \1`e
|
7
|
+
- match: ts`ih
|
8
|
+
subst: tz`u
|
9
|
+
- match: (k|k`|h)e\Z
|
10
|
+
subst: \1o
|
11
|
+
- match: (k|k`)ui\Z
|
12
|
+
subst: \1uei
|
13
|
+
- match: (sh|ch)o\Z
|
14
|
+
subst: \1e
|
15
|
+
- match: (ch|ch`|ts`|t|t`|l|n|j|s)uo
|
16
|
+
subst: \1o
|
17
|
+
- match: tsih
|
18
|
+
subst: tzu
|
19
|
+
- match: sih
|
20
|
+
subst: ssu
|
21
|
+
tongyong: - match: feng
|
22
|
+
subst: fong
|
23
|
+
|
24
|
+
|