「Mecab/インストール・実装」の版間の差分
ナビゲーションに移動
検索に移動
編集の要約なし |
編集の要約なし |
||
| (同じ利用者による、間の3版が非表示) | |||
| 5行目: | 5行目: | ||
==linux版ダウンロード&インストール== | ==linux版ダウンロード&インストール== | ||
===rocky10=== | |||
<pre> | |||
# EPELリポジトリ追加 | |||
sudo dnf install epel-release | |||
# CRBリポジトリを有効化 | |||
sudo dnf config-manager --set-enabled crb | |||
sudo dnf install dnf-plugins-core | |||
# 本体追加 | |||
sudo dnf install mecab mecab-devel | |||
# 辞書インストール | |||
sudo dnf install mecab-ipadic | |||
</pre> | |||
====設定確認==== | |||
<pre> | |||
$ mecab -D | |||
filename: /usr/lib64/mecab/dic/ipadic/sys.dic | |||
</pre> | |||
===centos7=== | |||
本体 | 本体 | ||
$ cd /usr/local/src | $ cd /usr/local/src | ||
| 15行目: | 35行目: | ||
$ sudo make install | $ sudo make install | ||
==インストールエラー対応方法== | ====インストールエラー対応方法==== | ||
configure: error: no acceptable C compiler found in $PATH | configure: error: no acceptable C compiler found in $PATH | ||
configure: error: Your compiler is not powerful enough to compile MeCab. If it should be, see config.log for more information of why it failed. | configure: error: Your compiler is not powerful enough to compile MeCab. If it should be, see config.log for more information of why it failed. | ||
| 21行目: | 41行目: | ||
$ sudo yum install gcc-c++ | $ sudo yum install gcc-c++ | ||
==辞書インストール== | ====辞書インストール==== | ||
<pre> | |||
wget http://sourceforge.net/projects/mecab/files/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz | |||
tar zxvf mecab-ipadic-2.7.0-20070801.tar.gz | |||
cd mecab-ipadic-2.7.0-20070801 | |||
./configure --with-mecab-config=/usr/bin/mecab-config --prefix=/usr/local/ --with-charset=utf8 | |||
make | |||
sudo make install | |||
</pre> | |||
==辞書インストールしてない時のエラー== | ====辞書インストールしてない時のエラー==== | ||
param.cpp(69) [ifs] no such file or directory: /usr/local/lib/mecab/dic/ipadic/dicrc | param.cpp(69) [ifs] no such file or directory: /usr/local/lib/mecab/dic/ipadic/dicrc | ||
2026年4月7日 (火) 02:09時点における版
windows版ダウンロード&インストール
- http://mecab.sourceforge.net/
- mecab-0.98.exe実行
linux版ダウンロード&インストール
rocky10
# EPELリポジトリ追加 sudo dnf install epel-release # CRBリポジトリを有効化 sudo dnf config-manager --set-enabled crb sudo dnf install dnf-plugins-core # 本体追加 sudo dnf install mecab mecab-devel # 辞書インストール sudo dnf install mecab-ipadic
設定確認
$ mecab -D filename: /usr/lib64/mecab/dic/ipadic/sys.dic
centos7
本体
$ cd /usr/local/src $ wget https://mecab.googlecode.com/files/mecab-0.996.tar.gz $ tar zxfv mecab-0.996.tar.gz $ cd mecab-0.996 $ ./configure --with-charset=utf8 $ make $ make check $ sudo make install
インストールエラー対応方法
configure: error: no acceptable C compiler found in $PATH configure: error: Your compiler is not powerful enough to compile MeCab. If it should be, see config.log for more information of why it failed. $ sudo yum -y install gcc $ sudo yum install gcc-c++
辞書インストール
wget http://sourceforge.net/projects/mecab/files/mecab-ipadic/2.7.0-20070801/mecab-ipadic-2.7.0-20070801.tar.gz tar zxvf mecab-ipadic-2.7.0-20070801.tar.gz cd mecab-ipadic-2.7.0-20070801 ./configure --with-mecab-config=/usr/bin/mecab-config --prefix=/usr/local/ --with-charset=utf8 make sudo make install
辞書インストールしてない時のエラー
param.cpp(69) [ifs] no such file or directory: /usr/local/lib/mecab/dic/ipadic/dicrc
動作確認
$ echo "すもももももももものうち" | mecab すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ も 助詞,係助詞,*,*,*,*,も,モ,モ もも 名詞,一般,*,*,*,*,もも,モモ,モモ も 助詞,係助詞,*,*,*,*,も,モ,モ もも 名詞,一般,*,*,*,*,もも,モモ,モモ の 助詞,連体化,*,*,*,*,の,ノ,ノ うち 名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチ EOS