The stable version is available in PyPI:
$ easy_install hangulize
We can also get a development version from the GitHub repository:
$ pip install git+git://github.com/sublee/hangulize.git#egg=hangulize
$ git clone git://github.com/sublee/hangulize.git
$ cd hangulize
$ python setup.py install
Transcribes a loanword to Hangul.
>>> print hangulize(u'gloria', 'ita')
글로리아
Parameters: |
|
---|
Checks if hangulize supports the given language.
>>> supports('ita')
True
>>> supports('kat.narrow')
True
>>> supports('kor')
False
Returns a language instance from the given code.
Returns the supported language code list.
Removes diacritics from the string and converts to lowercase.
>>> normalize_roman(u'Eèé')
u'eee'
Inserts the default jungseong or jongseong if it is not exists.
>>> complete_syllable((Jungseong(YO),))
(u'ㅇ', u'ㅛ', u'')
>>> print hangulize.hangul.join(_)
요
Separates each syllables and completes every syllable.
Returns the splitted phonemes from the word.
>>> split_phonemes(u'안녕')
(<Choseong 'ㅇ'>, <Jungseong 'ㅏ'>, <Jongseong 'ㄴ'>,
<Choseong 'ㄴ'>, <Jungseong 'ㅕ'>, <Jongseong 'ㅇ'>)
Returns the word from the splitted phonemes.
>>> print join_phonemes((Jungseong(A), Jongseong(N),
... Choseong(N), Jungseong(YEO), Jongseong(NG)))
안녕