Created
May 5, 2014 23:11
-
-
Save nezuQ/11549730 to your computer and use it in GitHub Desktop.
Ubuntu環境へCaboChaをインストールし、Pythonで呼び出す。 ref: http://qiita.com/nezuq/items/e1ae073b77d966a27f3c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import CaboCha | |
c = CaboCha.Parser() | |
sent = '国境の長いトンネルを抜けると雪国であった。夜の底が白くなった。信号所に汽車が止まった。' | |
print c.parseToString(sent) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install mecab libmecab-dev mecab-utils mecab-ipadic-utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install libcabocha-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find / -name CaboCha.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo python setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
国境の---D | |
長い-D | |
トンネルを-D | |
抜けると-D | |
雪国であった。-----D | |
夜の-D | | |
底が-D | |
白くなった。-----D | |
信号所に---D | |
汽車が-D | |
止まった。 | |
EOS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment