- Notifications
You must be signed in to change notification settings - Fork1
Japanese Morphological Analyzer written in Rust
License
NotificationsYou must be signed in to change notification settings
togatoga/kanpyo
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Kanpyo is Japanese morphological analyzer written in Rust inspired byikawaha/Kagome.
This is a work in progress. I would break the API without notice.
You can installkanpyo
viacargo
orgit
(development version).
cargo install kanpyo
or
cargo install --git https://github.com/togatoga/kanpyo kanpyo
You need a dictionary to usekanpyo
and can build and install a dictionary by the following.
cd kanpyo-dicttar xvf resource/mecab-ipadic-2.7.0-20070801.tar.gz -C resourcecargo run --release --bin ipa-dict-builder -- --dict resource/mecab-ipadic-2.7.0-20070801
A dictionary is installed in the following directory:
- Linux
- $HOME/.config/kanpyo/
- macOS
- $HOME/Library/Application Support/kanpyo
You're ready to usekanpyo
!
kanpyo --helpJapanese Morphological AnalyzerUsage: kanpyo [COMMAND]Commands: tokenize Tokenize input text graphviz Output latticein Graphviz formathelp Print this message or thehelp of the given subcommand(s)Options: -h, --help Printhelp -V, --version Print version
kanpyo tokenize"すもももももももものうち" すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモも 助詞,係助詞,*,*,*,*,も,モ,モもも 名詞,一般,*,*,*,*,もも,モモ,モモも 助詞,係助詞,*,*,*,*,も,モ,モもも 名詞,一般,*,*,*,*,もも,モモ,モモの 助詞,連体化,*,*,*,*,の,ノ,ノうち 名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチEOS
kanpyo自然言語処理自然 名詞,形容動詞語幹,*,*,*,*,自然,シゼン,シゼン言語 名詞,一般,*,*,*,*,言語,ゲンゴ,ゲンゴ処理 名詞,サ変接続,*,*,*,*,処理,ショリ,ショリEOS形態素解析形態素 名詞,一般,*,*,*,*,形態素,ケイタイソ,ケイタイソ解析 名詞,サ変接続,*,*,*,*,解析,カイセキ,カイセキEOS
echo"自然言語処理"| kanpyo自然 名詞,形容動詞語幹,*,*,*,*,自然,シゼン,シゼン言語 名詞,一般,*,*,*,*,言語,ゲンゴ,ゲンゴ処理 名詞,サ変接続,*,*,*,*,処理,ショリ,ショリEOS
Print lattice in Graphviz format for debugging.
kanpyo graphviz"自然言語処理"| dot -Tpng -o lattice.png
- Support various dictionaries(Sudachi, UniDic, neologd, etc.)
- Support server mode
- Support search mode
- Tests for load dictionary and tokenize
About
Japanese Morphological Analyzer written in Rust
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Contributors2
Uh oh!
There was an error while loading.Please reload this page.