forked from MaigoAkisame/MCPDict
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
122 changed files
with
15,509 additions
and
4,748 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from tables._表 import 表 as _表 | ||
|
||
class 表(_表): | ||
sms = {"b#":"p", | ||
"p#":"pʰ", | ||
"bb#":"ɓ", | ||
"m#":"m", | ||
"f#":"f", | ||
"d#":"t", | ||
"t#":"tʰ", | ||
"dd#":"ɗ", | ||
"n#":"n", | ||
"l#":"l", | ||
"z#":"ts", | ||
"c#":"tsʰ", | ||
"s#":"s", | ||
"sl#":"ɬ", | ||
"g#":"k", | ||
"k#":"kʰ", | ||
"ng#":"ŋ", | ||
"gw#":"kʋ", | ||
"kw#":"kʰʋ", | ||
"ngw#":"ŋʋ", | ||
"h#":"h", | ||
"w#":"ʋ", | ||
"j#":"j", | ||
"nj#":"ȵ", | ||
"#":"ʔ"} | ||
yms = {"aa":"aː", | ||
"aai":"aːj", | ||
"aau":"aːw", | ||
"aan":"aːn", | ||
"aang":"aːŋ", | ||
"aam":"aːm", | ||
"aat":"at̚", | ||
"aak":"ak̚", | ||
"aap":"ap̚", | ||
"ai":"ɐj", | ||
"au":"ɐw", | ||
"an":"ɐn", | ||
"ang":"ɐŋ", | ||
"am":"ɐm", | ||
"at":"ɐt̚", | ||
"ak":"ɐk̚", | ||
"ap":"ɐp̚", | ||
"e":"ɛ", | ||
"ei":"ɛj", | ||
"eu":"e̯ɛw", | ||
"en":"e̯ɛn", | ||
"eng":"e̯ɛŋ", | ||
"em":"e̯ɛm", | ||
"et":"e̯ɛt̚", | ||
"ek":"e̯ɛk̚", | ||
"ep":"e̯ɛp̚", | ||
"i":"i", | ||
"iu":"iw", | ||
"in":"in", | ||
"ing":"iŋ", | ||
"im":"im", | ||
"it":"ɪt̚", | ||
"ik":"ɪk̚", | ||
"ip":"ɪp̚", | ||
"o":"ɔ", | ||
"oi":"u̯ɔj", | ||
"eoi":"ɵj", | ||
"ou":"u̯ɔw", | ||
"ooau":"u̯ɔɒw", | ||
"on":"u̯ɔn", | ||
"ong":"u̯ɔŋʷ", | ||
"ot":"u̯ɔt̚", | ||
"ok":"u̯ɔk̚", | ||
"u":"ʋ̩", | ||
"ui":"ʋ̩j", | ||
"un":"un", | ||
"ung":"uŋʷ", | ||
"ut":"ʊt̚", | ||
"uk":"ʊk̚", | ||
"ng":"ŋ̍", | ||
"m":"m̩", | ||
"n":"n̩", | ||
"":"" | ||
} | ||
列序 = {"化州下江":1, "化州上江":2} | ||
|
||
def 析(自, 列): | ||
字, yb, js = 列[0], 列[自.列序[自.簡稱]], 列[3] | ||
if not yb: return | ||
yb = yb.lstrip("又").replace("gv", "gw") | ||
yb, sd = 自.分音(yb) | ||
if sd.isdigit(): | ||
if yb[-1] in "ptk": | ||
if sd == "1": sd = "7" | ||
elif sd == "3": sd = "8" | ||
elif sd == "6": sd = "9" | ||
else: | ||
sd = "" | ||
for ym in sorted(自.yms.keys(), key=lambda x:-len(x)): | ||
if yb.endswith(ym): | ||
sm = yb[:-len(ym)] | ||
break | ||
yb = 自.sms[sm+"#"] + 自.yms[ym] + sd | ||
return 字, yb, js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.