How To Install mecab-naist-jdic on Ubuntu 18.04

In this tutorial we learn how to install mecab-naist-jdic on Ubuntu 18.04. mecab-naist-jdic is free Japanese Dictionaries for mecab (replacement of mecab-ipadic)

Introduction

In this tutorial we learn how to install mecab-naist-jdic on Ubuntu 18.04.

What is mecab-naist-jdic

mecab-naist-jdic is:

NAIST Japanese Dictionary is a Dictionary for MeCab, Japanese morphological analysis implementation.

This is based on mecab-ipadic, however it is released under BSD style license now by NAIST (Nara Institute of Science and Technology, Japan), so it is free and can replace mecab-ipadic-utf8.

This is empty package and generates UTF-8 data from mecab-naist-jdic-eucjp with its installation.

There are three methods to install mecab-naist-jdic on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install mecab-naist-jdic Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install mecab-naist-jdic using apt-get by running the following command:

sudo apt-get -y install mecab-naist-jdic

Install mecab-naist-jdic Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install mecab-naist-jdic using apt by running the following command:

sudo apt -y install mecab-naist-jdic

Install mecab-naist-jdic Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install mecab-naist-jdic using aptitude by running the following command:

sudo aptitude -y install mecab-naist-jdic

How To Uninstall mecab-naist-jdic on Ubuntu 18.04

To uninstall only the mecab-naist-jdic package we can use the following command:

sudo apt-get remove mecab-naist-jdic

Uninstall mecab-naist-jdic And Its Dependencies

To uninstall mecab-naist-jdic and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove mecab-naist-jdic

Remove mecab-naist-jdic Configurations and Data

To remove mecab-naist-jdic configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge mecab-naist-jdic

Remove mecab-naist-jdic configuration, data, and all of its dependencies

We can use the following command to remove mecab-naist-jdic configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge mecab-naist-jdic

References

Summary

In this tutorial we learn how to install mecab-naist-jdic package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.