(alphabetize s)
Takes a Korean text string and returns a string of the deconstructed alphabet. Ignores (passes along) non-valid Korean characters.
Takes a Korean text string and returns a string of the deconstructed alphabet. Ignores (passes along) non-valid Korean characters.
(construct [i m f])
Takes a vector of valid jamo chars and constructs a syllable char.
Takes a vector of valid jamo chars and constructs a syllable char.
(construct-str c)
Takes a collection of vectors of jamo and joins them into a string of syllables. [[ㄱ ㅏ ㅇ] [ㅅ ㅏ ㄴ]] => "강산"
Takes a collection of vectors of jamo and joins them into a string of syllables. [[ㄱ ㅏ ㅇ] [ㅅ ㅏ ㄴ]] => "강산"
(deconstruct c)
Takes a single Korean syllable char and deconstructs it into its constituent jamo char: 강 => [ㄱ ㅏ ㅇ]
Takes a single Korean syllable char and deconstructs it into its constituent jamo char: 강 => [ㄱ ㅏ ㅇ]
(deconstruct-str s)
Splits a string of Korean syllables into a sequence of Korean jamo
Splits a string of Korean syllables into a sequence of Korean jamo
(korean-syllable? c)
Checks whether a given char lies within the Unicode codepoint range for Korean.
Checks whether a given char lies within the Unicode codepoint range for Korean.
(syllabize s)
Takes a string of Korean alphabets, and reconstructs Korean text. The initial value for the reduce fn is a vector containing the accumulated result, the current syllable under consideration, and the most recent consonant in limbo (to be classified as initial or final).
Each new char read in from the input string is either added to the current syllable vector or sent into limbo, and can trigger the syllable to be conj'd onto the accumulator once it's fully constructed.
The cond branches could use more cleanup.
Takes a string of Korean alphabets, and reconstructs Korean text. The initial value for the reduce fn is a vector containing the accumulated result, the current syllable under consideration, and the most recent consonant in limbo (to be classified as initial or final). Each new char read in from the input string is either added to the current syllable vector or sent into limbo, and can trigger the syllable to be conj'd onto the accumulator once it's fully constructed. The cond branches could use more cleanup.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close