-
Notifications
You must be signed in to change notification settings - Fork 16
Requirements
Brooke M. Fujita edited this page Mar 28, 2015
·
2 revisions
natto requires the following:
- MeCab 0.996
- A system dictionary, like mecab-ipadic (recommended) or mecab-jumandic
- Ruby 1.9 or greater
- ffi rubygem
If you have the luxury of compiling from scratch, then I recommend using the option of --enable-utf8-only
to force MeCab to only use UTF-8:
$ tar zxf mecab-0.996.tar.gz
$ cd mecab-0.996
$ ./configure --enable-utf8-only
$ make && make install
$ tar zxf mecab-ipadic-2.7.0-20070801.tar.gz
$ cd mecab-ipadic-2.7.0-20070801
$ ./configure --with-charset=utf8
$ make && make install
However, natto will work no matter which character encoding you choose.
On Mac OS, you can use the Homebrew package manager::
$ brew install mecab
$ brew install mecab-ipadic
On a Linux distribution like Ubuntu, you can use apt-get
:
$ sudo apt-get install mecab libmecab-dev
$ sudo apt-get install mecab-ipadic-utf8
On FreeBSD, you can install as a package or compile from ports::
# install the packages
$ pkg install japanese/mecab
$ pkg install japanese/mecab-ipadic
# or use the ports
$ cd /usr/ports/japanese/mecab/ && make install clean
$ cd /usr/ports/japanese/mecab-ipadic/ && make install clean
On Windows, you only need the mecab-win installer. This includes the mecab-ipadic
dictionary.
If you are on a 64-bit Windows and you use a 64-bit Ruby or JRuby, then you might want to build a 64-bit version of libmecab.dll.