This project has been moved to https://github.com/jeongukjae/mecab-bind
A repository to bind mecab for Python 3.5+. Not using swig nor pybind.
Support only Linux, macOS
Original source codes: taku910/mecab
pip install python-mecab
with eunjeon/mecab-ko-dic.
>>> from mecab import Tagger
>>> tagger = Tagger() # or Tagger('path/to/dic')
>>> tagger.parse("안녕하세요. 이 프로젝트는 python-mecab입니다.")
(('안녕', 'NNG,행위,T,안녕,*,*,*,*'), ('하', 'XSV,*,F,하,*,*,*,*'), ('세요', 'EP+EF,*,F,세요,Inflect,EP,EF,시/EP/*+어요/EF/*'), ('.', 'SF,*,*,*,*,*,*,*'), ('이', 'MM,~명사,F,이,*,*,*,*'), ('프로젝트', 'NNG,*,F,프로젝트,*,*,*,*'), ('는', 'JX,*,T,는,*,*,*,*'), ('python', 'SL,*,*,*,*,*,*,*'), ('-', 'SY,*,*,*,*,*,*,*'), ('mecab', 'SL,*,*,*,*,*,*,*'), ('입니다', 'VCP+EF,*,F,입니다,Inflect,VCP,EF,이/VCP/*+ᄇ니다/EF/*'), ('.', 'SF,*,*,*,*,*,*,*'))
>>> parsed = tagger.parse("안녕하세요. 이 프로젝트는 python-mecab입니다.")
>>> print(*parsed, sep='\n')
('안녕', 'NNG,행위,T,안녕,*,*,*,*')
('하', 'XSV,*,F,하,*,*,*,*')
('세요', 'EP+EF,*,F,세요,Inflect,EP,EF,시/EP/*+어요/EF/*')
('.', 'SF,*,*,*,*,*,*,*')
('이', 'MM,~명사,F,이,*,*,*,*')
('프로젝트', 'NNG,*,F,프로젝트,*,*,*,*')
('는', 'JX,*,T,는,*,*,*,*')
('python', 'SL,*,*,*,*,*,*,*')
('-', 'SY,*,*,*,*,*,*,*')
('mecab', 'SL,*,*,*,*,*,*,*')
('입니다', 'VCP+EF,*,F,입니다,Inflect,VCP,EF,이/VCP/*+ᄇ니다/EF/*')
('.', 'SF,*,*,*,*,*,*,*')
mecab
mecab-dict-index
mecab-dict-gen
mecab-test-gen
mecab-cost-train
mecab-system-eval