-
Notifications
You must be signed in to change notification settings - Fork 16
Usage
Brooke M. Fujita edited this page Apr 6, 2015
·
3 revisions
Before you start using Natto::MeCab
, I highly suggest trying out mecab
from the command-line. Spend some time acquainting yourself with the many high-level options that come with MeCab. If you find that the stock output formats do not do what you want, then come up with your own. Also, please pay close attention to the encodings of both MeCab and the dictionaries used.
Please use Ruby 1.9 or greater. Strings and encodings are handled correctly from Ruby 1.9 onward, which will make your parsing and processing that much easier.
Here are some simple examples for using Natto::MeCab
:
-
とりあえず使ってみよう!: Start using
Natto::MeCab
to check your MeCab and dictionary info, parse a sentence using defaultchasen
format - わかち書き Parsing: Tokenize a sentence into its parts of speech
- N-Best 読み: Obtain the 2 best probable readings for a list of kanji
- 振り仮名変換: Converting kanji in text to furigana
- 出力フォーマットの指定: User-defined Output Formatting
- 制約付き解析(部分解析): Constraint Parsing (Partial Parsing)