ksx1026.normalization module¶
Hangul normalization functions defined in KS X 1026-1¶
Reference¶
-
ksx1026.normalization.
composeHangul
(source)[source]¶ returns a Wanseong Modern Hangul Syllable Block for the given Johab Modern Hangul Syllable Block. Even when a portion of an Old Hangul Syllable Block is a Modern Hangul Syllable Block, unlike UAX #15, that portion is not transformed to a Wanseong Modern Hangul Syllable Block.
Parameters: source (string) – unicode string.
-
ksx1026.normalization.
decomposeHangul
(S)[source]¶ returns a Johab Modern Hangul Syllable Block for the given Wanseong Modern Hangul Syllable Block
Parameters: S (char) – Single character Hangul Syllable. If not, return input.
-
ksx1026.normalization.
decomposeHangulStr
(source)[source]¶ returns a Johab Modern Hangul Syllable String for the given Wanseong Modern Hangul Syllable String
Parameters: source (string) – Single character Hangul Syllable. If not, return input.
-
ksx1026.normalization.
normalizeJamoKDKC
(source)[source]¶ Normalizing Compatibility/Halfwidth Hangul Letters and Hangul-embedded symbols (NormalizeJamoKDKC)
Parameters: source (string) – unicode string
-
ksx1026.normalization.
recomposeHangul
(source)[source]¶ If one uses a UAX #15 algorithm instead of the above composeHangul function for normalization, an Old Hangul Syllable Block can be decomposed into a Wanseong Modern Hangul Syllable Block and Johab Hangul Letter(s). In such cases, after applying, one can use the following recomposition algorithm to restore a character string in Normalization Form NFC or NFKC to an L V T format.
Parameters: source (string) – unicode string