-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconstant.go
150 lines (145 loc) · 4.37 KB
/
constant.go
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
package hangul
// Hangul Compatibility Jamo. Range: 3130-318F
const (
_ = 0x3130 + iota
G // HANGUL LETTER KIYEOK
GG // HANGUL LETTER SSANGKIYEOK
GS // HANGUL LETTER KIYEOK-SIOS
N // HANGUL LETTER NIEUN
NJ // HANGUL LETTER NIEUN-CIEUC
NH // HANGUL LETTER NIEUN-HIEUH
D // HANGUL LETTER TIKEUT
DD // HANGUL LETTER SSANGTIKEUT
L // HANGUL LETTER RIEUL
LG // HANGUL LETTER RIEUL-KIYEOK
LM // HANGUL LETTER RIEUL-MIEUM
LB // HANGUL LETTER RIEUL-PIEUP
LS // HANGUL LETTER RIEUL-SIOS
LT // HANGUL LETTER RIEUL-THIEUTH
LP // HANGUL LETTER RIEUL-PHIEUPH
LH // HANGUL LETTER RIEUL-HIEUH
M // HANGUL LETTER MIEUM
B // HANGUL LETTER PIEUP
BB // HANGUL LETTER SSANGPIEUP
BS // HANGUL LETTER PIEUP-SIOS
S // HANGUL LETTER SIOS
SS // HANGUL LETTER SSANGSIOS
ZS // HANGUL LETTER IEUNG (zero sound)
J // HANGUL LETTER CIEUC
JJ // HANGUL LETTER SSANGCIEUC
C // HANGUL LETTER CHIEUCH
K // HANGUL LETTER KHIEUKH
T // HANGUL LETTER THIEUTH
P // HANGUL LETTER PHIEUPH
H // HANGUL LETTER HIEUH
A // HANGUL LETTER A
AE // HANGUL LETTER AE
YA // HANGUL LETTER YA
YAE // HANGUL LETTER YAE
EO // HANGUL LETTER EO
E // HANGUL LETTER E
YEO // HANGUL LETTER YEO
YE // HANGUL LETTER YE
O // HANGUL LETTER O
WA // HANGUL LETTER WA
WAE // HANGUL LETTER WAE
OE // HANGUL LETTER OE
YO // HANGUL LETTER YO
U // HANGUL LETTER U
WEO // HANGUL LETTER WEO
WE // HANGUL LETTER WE
WI // HANGUL LETTER WI
YU // HANGUL LETTER YU
EU // HANGUL LETTER EU
YI // HANGUL LETTER YI
I // HANGUL LETTER I
NG = ZS
)
// Hangul Jamo. Range 1100-11FF
const (
leadBase = 0x1100 // HANGUL CHOSEONG KIYEOK
medialBase = 0x1161 // HANGUL JUNGSEONG A
tailBase = 0x11A8 // HANGUL JONGSEONG KIYEOK
)
// Initial consonants 초성
const (
_ = (leadBase - 1) + iota
LeadG // HANGUL CHOSEONG KIYEOK
LeadGG // HANGUL CHOSEONG SSANGKIYEOK
LeadN // HANGUL CHOSEONG NIEUN
LeadD // HANGUL CHOSEONG TIKEUT
LeadDD // HANGUL CHOSEONG SSANGTIKEUT
LeadR // HANGUL CHOSEONG RIEUL
LeadM // HANGUL CHOSEONG MIEUM
LeadB // HANGUL CHOSEONG PIEUP
LeadBB // HANGUL CHOSEONG SSANGPIEUP
LeadS // HANGUL CHOSEONG SIOS
LeadSS // HANGUL CHOSEONG SSANGSIOS
LeadZS // HANGUL CHOSEONG IEUNG (zero sound)
LeadJ // HANGUL CHOSEONG CIEUC
LeadJJ // HANGUL CHOSEONG SSANGCIEUC
LeadC // HANGUL CHOSEONG CHIEUCH
LeadK // HANGUL CHOSEONG KHIEUKH
LeadT // HANGUL CHOSEONG THIEUTH
LeadP // HANGUL CHOSEONG PHIEUPH
LeadH // HANGUL CHOSEONG HIEUH
)
const maxLeadIdx = LeadH - LeadG
// Medial vowels 중성
const (
_ = (medialBase - 1) + iota
MedialA // HANGUL JUNGSEONG A
MedialAE // HANGUL JUNGSEONG AE
MedialYA // HANGUL JUNGSEONG YA
MedialYAE // HANGUL JUNGSEONG YAE
MedialEO // HANGUL JUNGSEONG EO
MedialE // HANGUL JUNGSEONG E
MedialYEO // HANGUL JUNGSEONG YEO
MedialYE // HANGUL JUNGSEONG YE
MedialO // HANGUL JUNGSEONG O
MedialWA // HANGUL JUNGSEONG WA
MedialWAE // HANGUL JUNGSEONG WAE
MedialOE // HANGUL JUNGSEONG OE
MedialYO // HANGUL JUNGSEONG YO
MedialU // HANGUL JUNGSEONG U
MedialWEO // HANGUL JUNGSEONG WEO
MedialWE // HANGUL JUNGSEONG WE
MedialWI // HANGUL JUNGSEONG WI
MedialYU // HANGUL JUNGSEONG YU
MedialEU // HANGUL JUNGSEONG EU
MedialYI // HANGUL JUNGSEONG YI
MedialI // HANGUL JUNGSEONG I
)
const maxMedialIdx = MedialI - MedialA
// Final consonants 종성
const (
_ = (tailBase - 1) + iota
TailG // HANGUL JONGSEONG KIYEOK
TailGG // HANGUL JONGSEONG SSANGKIYEOK
TailGS // HANGUL JONGSEONG KIYEOK-SIOS
TailN // HANGUL JONGSEONG NIEUN
TailNJ // HANGUL JONGSEONG NIEUN-CIEUC
TailNH // HANGUL JONGSEONG NIEUN-HIEUH
TailD // HANGUL JONGSEONG TIKEUT
TailL // HANGUL JONGSEONG RIEUL
TailLG // HANGUL JONGSEONG RIEUL-KIYEOK
TailLM // HANGUL JONGSEONG RIEUL-MIEUM
TailLB // HANGUL JONGSEONG RIEUL-PIEUP
TailLS // HANGUL JONGSEONG RIEUL-SIOS
TailLT // HANGUL JONGSEONG RIEUL-THIEUTH
TailLP // HANGUL JONGSEONG RIEUL-PHIEUPH
TailLH // HANGUL JONGSEONG RIEUL-HIEUH
TailM // HANGUL JONGSEONG MIEUM
TailB // HANGUL JONGSEONG PIEUP
TailBS // HANGUL JONGSEONG PIEUP-SIOS
TailS // HANGUL JONGSEONG SIOS
TailSS // HANGUL JONGSEONG SSANGSIOS
TailNG // HANGUL JONGSEONG IEUNG
TailJ // HANGUL JONGSEONG CIEUC
TailC // HANGUL JONGSEONG CHIEUCH
TailK // HANGUL JONGSEONG KHIEUKH
TailT // HANGUL JONGSEONG THIEUTH
TailP // HANGUL JONGSEONG PHIEUPH
TailH // HANGUL JONGSEONG HIEUH
)
const maxTailIdx = TailH - TailG