(chibi mecab)

A wrapper around MeCab, a part-of-speech and morphological analyzer for Japanese. (let ((mecab (make-mecab "/var/lib/mecab/dic/ipadic-utf8/"))) (mecab-parse mecab "今日学校に行きます")) => (("今日" "名詞,時相名詞,*,*,今日,きょう,代表表記:今日/きょう カテゴリ:時間") ...) (mecab-tokenize "今日学校に行きます") => ("今日" "学校" "に" "行き" "ます" "n") (mecab-yomi "今日学校に行きます") => "きょうがっこうにいきますn" Note in addition to the mecab library you will need a dictionary in utf-8 format installed, e.g. in Ubuntu from the mecab-ipadic-utf8 or mecab-jumandic-utf8 packages.

mecab-dictionary-path

A parameter holding the default path of the dictionary to use for make-mecab.

(make-mecab . o)

Create a new mecab parser.

(mecab-parse mecab str)

Parses the string str with the mecab parser, and returns a list of parses.

mecab-tokenizer

A parameter holding the mecab parser used for mecab-tokenize.

(mecab-tokenize str)

Splits str into a list of tokens.

mecab-pronouncer

A parameter holding the mecab parser used for mecab-yomi.

(mecab-yomi str)

Returns the hiragana pronunciation of str.

(mecab-last-error)

Returns the last error generated by mecab-parse.

(mecab? obj)

(%make-mecab string)

(mecab-version)

(mecab-strerror mecab_t)

(mecab-get-partial mecab_t)

(mecab-set-partial mecab_t int)

(mecab-get-theta mecab_t)

(mecab-set-theta mecab_t float)

(mecab-get-lattice-level mecab_t)

(mecab-set-lattice-level mecab_t int)

(mecab-get-all-morphs mecab_t)

(mecab-set-all-morphs mecab_t int)

(%mecab-parse mecab_t string)