LoginSignup
19
15

More than 3 years have passed since last update.

MeCab NEologd辞書をWindows Subsystem for LinuxでビルドしてWindowsで使うための手順

Last updated at Posted at 2018-07-02

Windows Subsystem for Linuxのインストール

まず、Windows Subsystem for Linux をインストールします。

Ubuntuの実行

スタートメニューのUbuntuを右クリックして管理者としてUbuntuを実行します。
ubuntu.png

ユーザーの登録

Ubuntuでのユーザー名とパスワードを入力します。

Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: xxx
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ビルドに必要なものをインストール

$ sudo apt update
$ sudo apt install -y make mecab libmecab-dev

NEologdのビルド&コピー

Program Files (x86)にコピーするために、右クリックメニューなどからUbuntuを「管理者として実行」している必要があります。

$ git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git /tmp/mecab-ipadic-neologd
$ bash /tmp/mecab-ipadic-neologd/bin/install-mecab-ipadic-neologd -n -y
$ cp -R `mecab-config --dicdir`/mecab-ipadic-neologd "/mnt/c/Program Files (x86)/MeCab/dic"
$ rm -rf /tmp/mecab-ipadic-neologd

もしも野良ビルドの64bit版MeCabをご利用の方は、3行目のコマンドのコピー先を下記の通りにしてください。

$ cp -R `mecab-config --dicdir`/mecab-ipadic-neologd "/mnt/c/Program Files/MeCab/dic"
19
15
1

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
19
15