RMeCab

capture_002_24052014_101858

RMeCab is an interface from R to MeCab.

% R
> result <- RMeCabFreq("Abe.txt")

The above code gives you a word count table from the text file “Abe.txt”, Policy Speech by Prime Minister Shinzo Abe to the 186th Session of the Diet, Friday, January 24, 2014.

From the table, you can draw graphs such as the most used nouns in the text. The most used noun was “world” shown as red in the graph, which appears 29 times in the speech. Other words in descending order is: “local regions (in green)”, “economy (in pink)”, “my fellow Japanese (in blue)”, and so on.

Leave a Reply

Your email address will not be published. Required fields are marked *