This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
448 lines (324 loc) · 8.38 KB
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
'áéíóúaeiouy'
'iau|iei|ioi|iou|ioy|uay|uei|uey|uoy'
'pl|bl|tl|fl|cl|gl|pr|br|tr|fr|cr|gr|dr'
''
1. TRIPTONGO
['iai', 'iau', 'iei', 'ieu', 'ioi', 'iou', 'iái', 'iáu', 'iéi', 'iéu', 'iói', 'ióu', 'uai', 'uau', 'uei', 'ueu', 'uoi', 'uou', 'uái', 'uáu', 'uéi', 'uéu', 'uói', 'uóu', 'üei', 'üeu']
2. Y_TRIPTONGO
['iay$', 'iey$', 'ioy$', 'iáy$', 'iéy$', 'ióy$', 'uay$', 'uey$', 'uoy$', 'uáy$', 'uéy$', 'uóy$', 'üey$']
--必需位于词尾
https://www.spanishdict.com/translate/c%C3%B3ccyx
el paraguayo, la paraguaya(pah-rah-gwah-yoh)
Paraguay(peh-ruh-gwey)
3. DIPTRONGO
['ai', 'au', 'ei', 'eu', 'oi', 'ou', 'ia', 'ie', 'io', 'ua', 'ue', 'uo', 'iu', 'ui', 'ái', 'áu', 'éi', 'éu', 'ói', 'óu', 'iá', 'uá', 'ié', 'ué', 'ió', 'uó', 'üe', 'üi']
4. Y_DIPTRONGO
- 必需位于词尾
['ay$', 'ey$', 'oy$', 'uy$', 'áy$', 'éy$', 'óy$', 'üy$']
4.1 还有Y 处于2个辅音之间的情况
Y 处于两个辅音之间 是一个元音
bodysurfista
bypass
byte
copyleft
copyright
cybermetría
cóccyx
exabyte
gigabytes
gymkhana
hollywood
hypercard
hypersearch
hytelnet
jekyl
kilobyte
ladybird
megabyte
mylar
nylon
petabyte
storyboard
terabyte
tymnet
zetabyte
RESOURCES# cat words.cat | egrep by
abyecto
baby
bypass
byte
exabyte
gigabytes
hobby
kilobyte
megabyte
petabyte
rugby
subyacente
subyacer
subyugación
subyugado
subyugar
terabyte
zetabyte
RESOURCES# essila subyacente
-----------------------------
sub-ya-cen-te
-----------------------------
{
'silabas':
[
'sub',
'ya',
'cen',
'te'
],
'accent_pos': 2,
'accent': 'cen',
'stress_char_pos': 1,
'stress_char': 'e'
}
-----------------------------
['sub', 'ya', 'cen', 'te']
RESOURCES#
subyacente(soob-yah-sehn-teh)
4.3 V_Y_C Y 前面是元音后面是辅音
RESOURCES# cat words.cat | egrep "[aeiouáéíóúü]y[^aeiouáéíóúü]"
aymara
honeypot
joystick
peyronie
playboy
reykjavik
5. SOLO_Y
y ----单独使用
6. LAST_Y
- y在位于词尾时可以被视为一个元音
['$y']
7. CL_CONSONANT
[
'pl', 'bl', 'tl', 'fl', 'cl', 'gl',
'pr', 'br', 'tr', 'fr', 'cr', 'gr',
'dr'
]
8. DI_CONSONANT
['ch', 'll', 'rr']
9. CONSONANT
['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'v', 'w', 'x', 'y', 'z', 'ñ']
10. VOWEL
['a', 'e', 'i', 'o', 'u', 'á', 'é', 'í', 'ó', 'ú','ü']
11. 3个辅音,没有连缀 没有
前两个归前面
三个辅音在一起,如果有辅音连缀,则辅音连缀和后面的元音构成1个音节,另一个辅音归属其他音节;如果没有,则2:1(即:前2个归前,后1个归后)
conspirar(kohns-pee-rahr)
# 字母表
AC_A,AC_E,AC_I,AC_O,AC_U
DI_U
ENE
UD_QM
UD_EXCM
CE_C
ALPHABETA 所有字母
======
VOWEL = "áéíóúaeiouü"
ACUTE_VOWEL = "áéíóú"
DI$U_VOWEL = 'ü'
NORMAL_VOWEL = "aeiou"
NORMAL_STRONG_VOWEL = "aeo"
NORMAL_WEAK_VOWEL = 'iu'
interface VowelViaShape {
di_u:'ü',
acute:'áéíóú',
normal:{
strong:'aeo',
weak:'iu'
}
}
STRONG_VOWEL = "áéíóúaeo"
STRONG_ACUTE_VOWEL = 'áéíóú'
STRONG_NORMAL_VOWEL = 'aeo'
WEAK_VOWEL = 'iuü'
WEAK_DI$U_VOWEL = 'ü'
WEAK_NORMAL_VOWEL = 'iu'
interface VowelViaStrong {
strong:{
acute:'áéíóú',
normal:'aeo'
},
weak:{
di_u:'ü',
normal:'iu'
}
}
#命令行分割系统
#每一级只用一次split
lv_sps = ['-','_','#','@','$']
get_rsib_of_fstance_having_rsib
['get the rsib of fst ance that has rsib']
['get'] - ['the rsib of fst ance that has rsib']
['the rsib'] _ of _ ['fst ance that has rsib']
['the']#['rsib']_of_['fst ance']#['that has rsib']
['fst']@['ance']#['that']@['has']@['rsib']
get-the#rsib_of_fst@ance#that@has@rsib
get [the#rsib_of_fst@ance#that@has@rsib]
get [the#rsib] of [fst@ance#that@has@rsib]
get the rsib of [fst@ance] [that@has@rsib]
get the rsib of fst ance that has rsib
cmd = 'get-the#rsib_of_fst@ance#that@has@rsib'
root = {
"cmd":'get-the#rsib_of_fst@ance#that@has@rsib',
"children":[],
"depth":0
}
from xlist import map
from xlist import fltr
unhandled = [
root
]
lv_sps = ['-','_','#','@','$']
def creat_root(cmd):
root = {
"cmd":root,
"children":[],
"depth":0
}
return(root)
def cmd_to_child(cmd,pdepth):
d = {
"cmd":cmd,
"children":[],
"depth":pdepth+1
}
return(d)
def get_children(ele,lv_sps):
cmd = ele['cmd']
depth= ele['depth']
sp = lv_sps[depth]
ch_cmds = cmd.split(sp)
children = map.mapv(ch_cmds,lambda cmd:cmd_to_child(cmd,depth))
ele['children'] = children
return(children)
def is_leaf(ele,lv_sps):
cmd = ele['cmd']
for sp in lv_sps:
cond = sp in cmd
if(cond):
return(False)
else:
pass
return(True)
def get_nonleaf_children(children,lv_sps):
nonleaf_children = fltr.fltrv(children,lambda ch:not(is_leaf(ele,lv_sps)))
return(nonleaf_children)
while(len(unhandled)>0):
next_unhandled = []
for i in range(len(unhandled)):
ele = unhandled[i]
children = get_children(ele,lv_sps)
nonleaf_children = get_nonleaf_children(children,lv_sps)
next_unhandled = next_unhandled + nonleaf_children
unhandled = next_unhandled
nest
new_root
creat_root(raw)
_cfg:{} #一些通用德全局参数
_guid
_children:[]
_depth:
raw: //客户自定义参数
new_child()
creat_child(raw)
get_children(ele)
is_leaf(ele)
get_nonleaf_children(ele)
def creat_nest_tree(raw):
root = creat_root(raw)
unhandled = [root]
while(len(unhandled)>0):
next_unhandled = []
for i in range(len(unhandled)):
ele = unhandled[i]
children = get_children(ele)
nonleaf_children = get_nonleaf_children(children)
next_unhandled = next_unhandled + nonleaf_children
unhandled = next_unhandled
return(root)
class NestTree:
#####
def __init__(self,raw,**kwargs):
self.creat_ele = kwargs['creat_ele']
self.is_leaf = kwargs['is_leaf']
self.get_children = kwargs['get_children']
self.tree = self._creat_nest_tree(raw)
def __repr__(self):
s = self.tree.__repr__()
return(s)
####
@classmethod
def get_nonleaf_children(children):
nonleaf_children = fltr.fltrv(children,lambda ch:not(self.is_leaf(ele)))
return(nonleaf_children)
#####
def _creat_nest_tree(self,raw):
root = self.creat_ele(raw)
unhandled = [root]
while(len(unhandled)>0):
next_unhandled = []
for i in range(len(unhandled)):
ele = unhandled[i]
children = self.get_children(ele)
nonleaf_children = self._get_nonleaf_children(children)
unhandled = next_unhandled
return(root)
class Test:
def __init__(self,x):
self.x = x
def tst(self,n):
self.x(n)
self.cls2()
@classmethod
def _cls2(cls):
print('aaaaa')
word[单词] lexcate[词性] syllables[音节数组] accent_pos[重读音节位置] stress_char_pos[重读字母相对位置]
meaning[意思] 变位
syllable {
accent:
accent_pos:
stress_char:
stress_char_pos
}
token分割表
//TOK 表
word tokens
tok {
raw:''
prop:'' // 三元音 ,双元音,......连辅音,双辅音
}
//音节表 去查音节表
word syllables syllable_0 syllable_1 .......... accent_pos accent stress_char_pos tress_char
//词性表
word lexcate
https://dle.rae.es/abrir?m=form#conjugacioncc42use
https://dle.rae.es/silla#A7DGqoA
https://developer.oxforddictionaries.com/
http://www.esdict.cn/dicts/es/ni%c3%b1a?recordid=NjExODg=
如果两个辅音开头非连缀:
kyoto
myanmar Myanmar(myahn-mar)
nyala
tok
v 元音组
tri 不带y的三元音
tri-y$ 带y的三元音 y必需在结尾
dip 不带y的双元音
dip-y$ 带y的双元音 y必需在结尾
dio-v-y-c 带y的双元音 y前面是元音后面是辅音
y$ y 在结尾
c-y-c y 在两个辅音之间
^y$ 单y
其他单字母元音
c 辅音组
cl 辅音连缀
dl 双音
y 不在结尾 不在两个辅音之间 不是单独y
其他单字母辅音