Here is a summary of how to run MeCab in Python on Ubuntu 18.04 LTS.
sudo apt install mecab libmecab-dev mecab-ipadic-utf8
command to install MeCab.sudo apt install git make curl xz-utils file
command to install the required packages.cd / tmp
command and change to the tmp directory.git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
command to clone mecab-ipadic-NEologd.cd mecab-ipadic-neologd
command and change to the cloned directory../bin/install-mecab-ipadic-neologd -n
command to install mecab-ipadic-NEologd.yes
.sudo apt install unidic-mecab
command to install UniDic.sudo update-alternatives --config mecab-dictionary
command to change the default dictionary to UniDic./ usr / lib / mecab / dic
directory.sudo apt install git make curl xz-utils file
command to install the required packages.cd / tmp
command and change to the tmp directory.git clone --depth 1 https://github.com/neologd/mecab-unidic-neologd
command to clone mecab-unidic-NEologd.cd mecab-unidic-neologd
command to change to the cloned directory../bin/install-mecab-unidic-neologd -n
command to install mecab-unidic-NEologd.yes
.pip install mecab-python
command to install the official MeCab Python bindings.pip install mecab-python3
command to install the official MeCab Python bindings.natto-py
Run the pip install natto-py
command to install natto-py
.It seems that the update will be done twice a week (Monday, Thursday).
cd / tmp
command and change to the tmp directory.git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
command to clone mecab-ipadic-NEologd.cd mecab-ipadic-neologd
command and change to the cloned directory../bin/install-mecab-ipadic-neologd -n
command to install mecab-ipadic-NEologd.git clone --depth 1 https://github.com/neologd/mecab-unidic-neologd.git
command to clone mecab-unidic-NEologd.cd mecab-unidic-neologd
command to change to the cloned directory../bin/install-mecab-unidic-neologd -n
command to install mecab-unidic-NEologd.Give -d / var / lib / mecab / dic / {dictionary name}
to the argument of MeCab.
Give -d / usr / lib / mecab / dic / {dictionary name}
to the argument of MeCab.
Recommended Posts