[입 개발] mecab 설치 with 은전한닢 (mac)

1. Download Files
– 은전한닢 mecab & dic
* https://bitbucket.org/eunjeon/mecab-ko
* https://bitbucket.org/eunjeon/mecab-ko-dic/downloads/mecab-ko-dic-1.6.1-20140515.tar.gz
– python binding
* https://bitbucket.org/eunjeon/mecab-python-0.996

2. Build
– mecab-ko
* ./configure
* make
* make install

3. mecab-ko-dic
* ./autogen.sh
* ./configure
* make
* make install

4. python binding
* python setup.py build
* python setup.py install

5. Test

import MeCab
m = MeCab.Tagger('-d /usr/local/lib/mecab/dic/mecab-ko-dic')
ret = m.parse("아버지가 방에 들어가신다.")

아버지	NNG,*,F,아버지,*,*,*,*,*
가	JKS,*,F,가,*,*,*,*,*
방	NNG,*,T,방,*,*,*,*,*
에	JKB,*,F,에,*,*,*,*,*
들어가	VV,*,F,들어가,*,*,*,*,*
신다	EP+EF,*,F,신다,Inflect,EP,EF,시/EP+ᆫ다/EF,*
.	SF,*,*,*,*,*,*,*,*
EOS
Advertisements