Installs MeCab, its program language bindings, and its well-known dictionary.
Currently installing MeCab with Cef has some difficulty:
- MeCab binary is hosted at Google Drive.
- MeCab source hosted at GitHub is huge.
This recipe is implemented in a somewhat forcible manner, so there are some problems remains:
- It takes long running time because it checks out huge git repository of MeCab from github.
- Immutability
Because of above intractability, it is a good idea to use package manager like apt
or yum
alternative of this cookbook.
The following platforms and versions are tested and supported using test-kitchen
- Ubuntu (14.04)
- Debian (8.0)
- CentOS (7.0)
See source for default values.
node['mecab']['version']
- Flavor of the version you would like to install. Following values are available:0.996
0.995
0.994
0.993
0.991
0.99
HEAD
- use the latest commit of MeCab's repository
node['mecab']['git_repos']
- Repository to use.node['mecab']['prefix']
- Prefix of path to install built binaries.node['mecab']['utf8-only']
- Enable UTF-8 only mode if its value is true.node['mecab']['clone_timeout']
- Timeout for cloning repository from github.node['mecab']['charset']
- Charset of dictionary. Following values are available:utf8
shift-jis
euc
node['ipadic']['version']
- Flavor of the version of ipadic you would like to install.2.7.0-20070801
2.7.0-20070610
2.7.0-20060707
2.7.0-20051110
HEAD
- use the latest commit of MeCab's repository
node['jumandic']['version']
- Flavor of the version of jumandic you would like to install.7.0-20130310
5.1-20070304
HEAD
- use the latest commit of MeCab's repository
node['unidic']['version']
- Flavor of the version iof unidic you would like to install.2.1.2
2.1.1
HEAD
- use the latest commit of MeCab's repository
node['naistjdic']['version']
- Flavor of the version iof naistjdic you would like to install.0.6.3b-20111013
0.6.3-20100801
0.6.2-20100208
0.6.1-20090630
0.6.0-20090616
0.5.0-20090512
HEAD
- use the latest commit of MeCab's repository
This recipe just build binding and copy it to node['mecab-java']['install_to']
. You need to place the built resuilts to java.library.path
to use it.
node['mecab-java']['version']
- Flavor of the version of Java binding you would like to install. It requires the same value with MeCab itself.node['mecab-java']['install_to']
- A path to installMeCab.jar
andlibMeCab.so
. Perhaps
node['mecab-perl']['version']
- Flavor of the version of Perl binding you would like to install. It requires the same value with MeCab itself.node['mecab-perl']['perl_path']
- Path to perl executable.
node['mecab-python']['version']
- Flavor of the version of Python binding you would like to install. It requires the same value with MeCab itself.node['mecab-python']['prefix']
- A prefix of path to install to.
node['mecab-perl']['version']
- Flavor of the version of Perl binding you would like to install. It requires the same value with MeCab itself.node['mecab-perl']['perl_path']
- Path to perl executable.
node['mecab-perl']['version']
- Flavor of the version of Ruby binding you would like to install. It requires the same value with MeCab itself.
recipe[mecab]
orrecipe[mecab::default]
- Install MeCab and IPA Dictionary. (default)recipe[mecab::ipadic]
- Install MeCab and IPA Dictionary.recipe[mecab::jumandic]
- Install MeCab and Juman Dictionary.recipe[mecab::unidic]
- Install MeCab and Unidic Dictionary.recipe[mecab::naistjdic]
- Install MeCab and NAIST-JDIC Dictionary.
recipe[mecab::mecab-java]
- Install Java bindingrecipe[mecab::mecab-perl]
- Install Perl bindingrecipe[mecab::mecab-python]
- Install Python bindingrecipe[mecab::mecab-ruby]
- Install Ruby binding
Just include mecab
in your node's run_list
:
- Install MeCab binaries, ipadic, and python binding
{
"run_list": [
"recipe[mecab]"
"recipe[mecab:::mecab-python]
]
}
- Install MeCab binaries, unidic, and ruby binding
{
"run_list": [
"recipe[mecab::unidic]"
"recipe[mecab:::mecab-ruby]
]
}