LoginSignup
101
72

More than 5 years have passed since last update.

ColaboratoryでMeCabを使えようにする。

Last updated at Posted at 2018-03-19

タイトル通りです。
Colaboratoryを使い始めたのですが、ColaboratoryってUbuntuで動いているみたいですね。
だったら、UbuntuにMeCabを入れる要領でやれば、使えるでしょって思ったのでやってみました。

関連記事

MeCabのインストール方法、辞書のカスタマイズ方法、使い方についてのメモ。

Colaboratoryって何?

【秒速で無料GPUを使う】TensorfFow/Keras/PyTorch/Chainer環境構築 on Colaboratory

MeCabのインストール

インストールの前にnotebook上のランタイム>ランタイムのタイプの変更、でランタイムのタイプがPython3になっているか確認してください。
MeCabのインストールはこんな感じ。
コマンド3つを実行するだけです。
!apt install aptitude
!aptitude install mecab libmecab-dev mecab-ipadic-utf8 git make curl xz-utils file -y
!pip install mecab-python3==0.7
自分の場合、特にエラーは出ずに無事にインストールは完了しました。

試してみる

img2.PNG
うまくいきました:blush:

101
72
3

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
101
72