Hello World from OSS Silicon Valley
HowToUse/MeCab/0.996
_ Prerequisite
- Cent OS installation (You can refer HowToUse/CentOS/6.5)
_ Install&Setup
- Step.1
- Add repository.
$ sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
- Step.2
- Update package information.
$ sudo yum makecache
- Step.3
- Install MeCab.
$ sudo yum install mecab mecab-ipadic mecab-devel
- Step.4
- Install binding program for python.
$ pip install mecab-python3
_ HowToUse
_ Execute from command
- Step.1
- Execute the morphological analysis in Japanese.
$ mecab <enter string>
_ Execute from python
- Step.1
- Create a sample code as below.
# coding: utf-8 import MeCab m=MeCab.Tagger('mecabrc') result=m.parse("すもももももももものうち") print(result)
- Step.2
- Execute the following command.
$ python <script name>
_ Author
S.Yatsuzuka
[ back ]
Last-modified: 2016-12-13 (Tue) 06:35:00 (2992d)