LoginSignup
3
3

More than 5 years have passed since last update.

OS XへのText::MeCabのインストール

Last updated at Posted at 2012-07-24

OS Xだからってわけじゃないけどハマった。

ミソは、

  • cpanに上がってるバージョン(0.20013)は古いのでgithubから落とす。
  • homebrewで入れたmecab-ipadicを使う場合、文字コードをデフォルトから変更する必要があるので--interactiveで実行する

って辺り。

% mecab --version
mecab of 0.994
% brew install mecab
% brew install mecab-ipadic
% git clone https://github.com/lestrrat/Text-MeCab.git   
% cd Text-MeCab
% cpanm --interactive .
…
Encoding of your mecab dictionary? (shift_jis, euc-jp, utf-8) [euc-jp] utf-8
…

途中でこんなこと言われたら、おとなしく指示に従ってcpanmする。

Please install the following modules first:

 + Module::Install::CheckLib
 + Module::Install::XSUtil

UTF-8以外の辞書を使いたければ、ここを見て自分で辞書をビルドすればいいんだけど、テストが通らないのでこのpullreqを適用すれば通るようになる。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3