Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mozc for Python: Kana-Kanji converter

License

NotificationsYou must be signed in to change notification settings

ikegami-yukino/mozcpy

Repository files navigation

mozcpy

circlecipyversionlatest versionlicense

Mozc for Python: yet another Kana-Kanji converter

INSTALLATION

$ pip install mozcpy

USAGE

importmozcpyconverter=mozcpy.Converter()converter.convert('まほうしょうじょ')# => '魔法少女'converter.convert('まほうしょうじょ',n_best=10)# => ['魔法少女', '魔法消除', '魔法省所', '魔法小所', '魔法昇叙', '魔砲少女', 'マホウ少女', '魔法証所', '魔法賞所']converter.convert_wakati('もうなにもこわくない')# => 'もう 何 も 怖く ない'converter.convert_wakati('もうなにもこわくない',n_best=3)# => ['もう 何 も 怖く ない', 'もう 何 も こわく ない', 'もう 何 も 恐く ない']converter.wakati("もうなにもこわくない")# => 'もう なに も こわく ない'converter.wakati("もうなにもこわくない",n_best=10)# duplicatetions are ignored# => ['もう なに も こわく ない']

FOR DEVELOPER

This module uses Git LFS to pull dictionary files.

ACKNOWLEDGEMENT

This module relies on Mozc and MeCab.

  • . T. Kudo, T. Hanaoka, J. Mukai, Y. Tabata, H. Komatsu. 2011. Efficient dictionary and language model compression for input method editors. In Proceedings of the Workshop on Advances in Text Input Methods (WTIM 2011), pp 19-25.
  • . T. Kudo, H. Komatsu, T. Hanaoka, A. Mukai, Y. Tabata, K. Yamamoto, Y. Matsumoto. 2004. Applying Conditional Random Fields to Japanese Morphological Analysis. In Proceedings of the EMNLP 2004, pp 230-237.

About

Mozc for Python: Kana-Kanji converter

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp