Skip to content

markburns/mecab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MeCab

Build Status

This fork exists solely to make mecab easier to install. I've also renamed the gem from mecab-ruby-gem to just mecab. I don't take any credit for this gem.

Original is at https://github.com/hotchpotch/mecab-ruby-gem

Example Usage

require 'mecab'

sentence = "太郎はこの本を二郎を見た女性に渡した。"
tagger = MeCab::Tagger.new
puts tagger.parse sentence

太郎	名詞,固有名詞,人名,,*,*,太郎,タロウ,タロー
	助詞,係助詞,*,*,*,*,,,
この	連体詞,*,*,*,*,*,この,コノ,コノ
	名詞,一般,*,*,*,*,,ホン,ホン
	助詞,格助詞,一般,*,*,*,,,
	名詞,,*,*,*,*,,,
	名詞,一般,*,*,*,*,,ロウ,ロー
	助詞,格助詞,一般,*,*,*,,,
	動詞,自立,*,*,一段,連用形,見る,,
	助動詞,*,*,*,特殊・タ,基本形,,,
女性	名詞,一般,*,*,*,*,女性,ジョセイ,ジョセイ
	助詞,格助詞,一般,*,*,*,,,
渡し	動詞,自立,*,*,五段・サ行,連用形,渡す,ワタシ,ワタシ
	助動詞,*,*,*,特殊・タ,基本形,,,
	記号,句点,*,*,*,*,,,
EOS

Installation

gem install mecab

Installing prerequisites

  • Mecab (0.996)
  • mecab-ipadic

Homebrew

$ brew update
$ brew install mecab mecab-ipadic

Unix

curl https://mecab.googlecode.com/files/mecab-0.996.tar.gz
tar zxf mecab-0.996.tar.gz
cd mecab-0.996
./configure --with-charset=utf8 --enable-utf8-only
make
sudo make install

About

MeCab ruby binding with gemspec

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.0%
  • Ruby 1.0%