MeCab explained

MeCab
Developer:Taku Kudou, Google Japanese Input project
Latest Release Version:0.996
Programming Language:C++, has modules for C, C#, Java, Perl, Python, and Ruby
License:Tri-licensed under GPL, LGPL and BSD licenses
Platform:Cross-platform
Website:https://taku910.github.io/mecab

MeCab is an open-source text segmentation library for Japanese written text. It was originally developed by the Nara Institute of Science and Technology and is maintained by Taku Kudou (工藤拓) as part of his work on the Google Japanese Input project.[1] [2] The name derives from the developer's favorite food, (和布蕪), a Japanese dish made from wakame leaves.

The software was originally based on ChaSen and was developed under the name ChaSenTNG, but now it is developed independently from ChaSen and was rewritten from scratch. MeCab's analysis accuracy is comparable to ChaSen, and it is about 3–4 times faster.

MeCab analyzes and segments a sentence into its parts of speech. There are several dictionaries available for MeCab, but IPADIC is the most commonly used one as with ChaSen.

In 2007, Google used MeCab to generate n-gram data for a large corpus of Japanese text, which it published on its Google Japan blog.[3]

MeCab is also used for Japanese input on Mac OS X 10.5 and 10.6, and in iOS since version 2.1.[4] [5]

Example

Input:Japanese: italic=no|<pre> ウィキペディア(Wikipedia)は誰でも編集できるフリー百科事典です</pre>Results in:Japanese: italic=no|<pre> ウィキペディア 名詞,一般,*,*,*,*,* ( 記号,括弧開,*,*,*,*,(,(,( Wikipedia 名詞,固有名詞,組織,*,*,*,* ) 記号,括弧閉,*,*,*,*,),),) は 助詞,係助詞,*,*,*,*,は,ハ,ワ 誰 名詞,代名詞,一般,*,*,*,誰,ダレ,ダレ でも 助詞,副助詞,*,*,*,*,でも,デモ,デモ 編集 名詞,サ変接続,*,*,*,*,編集,ヘンシュウ,ヘンシュー できる 動詞,自立,*,*,一段,基本形,できる,デキル,デキル フリー 名詞,一般,*,*,*,*,フリー,フリー,フリー 百科 名詞,一般,*,*,*,*,百科,ヒャッカ,ヒャッカ 事典 名詞,一般,*,*,*,*,事典,ジテン,ジテン です 助動詞,*,*,*,特殊・デス,基本形,です,デス,デス EOS </pre>

Besides segmenting the text, MeCab also lists the part of speech of the word, and, if applicable and in the dictionary, its pronunciation. In the above example, the verb できる (dekiru, "to be able to") is classified as an ichidan (一段) verb (動詞) in the infinitive tense (基本形). The word でも (demo) is identified as an adverbial particle (副助詞). As not all columns apply to all words, when a column does not apply to a word, an asterisk is used; this makes it possible to format the information after the word and the tab character as the comma-separated values.

MeCab also supports several output formats; one of which,, outputs tab-separated values in a format that programs written for ChaSen can use. Another format, (from 読む yomu, to read), outputs the pronunciation of the input text as katakana,[6] as shown below.

Japanese: italic=no|<pre>ウィキペディア(Wikipedia)ハダレデモヘンシュウデキルフリーヒャッカジテンデス</pre>

Notes and References

  1. Web site: 「ググる」の精度を高めるために必要なもの - @IT自分戦略研究所. ITmedia. 2006-03-15. 2009-04-09. ja. What Google needs to improve its accuracy.
  2. Web site: 思いどおりの日本語入力 - Google 日本語入力. Google. 2009-12-03. 2009-12-03. ja. Towards more accurate Japanese input.
  3. Web site: Google Japan Blog: 大規模日本語 n-gram データの公開. Google. 2007-11-01. 2009-04-09. ja. Publication of n-gram data across large Japanese text corpus.
  4. Web site: 大規模テキスト処理を支える形態素解析技術(工藤拓氏・Google). 2009-12-03. 2009-12-03. ja. (Lecture) Morphological analysis supports large scale text processing (By Mr. Taku Kudou, employee at Google).
  5. Web site: iPhoneの仮名漢字変換はMeCabを利用. 2009-12-03. 2009-12-03. https://web.archive.org/web/20080918005625/http://yebo-blog.blogspot.com/2008/09/iphonemecab.html. 2008-09-18. ja. iPhone uses MeCab for kana-kanji conversion. dead.
  6. Web site: Kudou. Taku. MeCab: Yet Another Part-of-Speech and Morphological Analyzer. taku910.github.io. 23 January 2018. ja.