[PYTHON] The story of adding MeCab to ubuntu 16.04

I needed to make a Japanese corpus, so I will write a story with MeCab.

1 What is MeCab?

An open source morphological analysis engine. Roughly speaking, morphological analysis means "decomposing to the smallest unit of a word". In English, the smallest unit words like "This is a pen." Are separated by spaces, but in Japanese they are stuck together, so you need to analyze and decompose them. If you don't do that, you won't be able to do it. Official URL: http://taku910.github.io/mecab/ license:

2 Install MeCab

I have referred to this site entirely. https://gist.github.com/YoshihitoAso/9048005 Thank you very much. m (__) m If you write the procedure, $ sudo apt-get install mecab libmecab-dev mecab-ipadic $ sudo aptitude install mecab-ipadic-utf8 $ sudo apt-get install python-mecab The first is the installation of the MeCab core, the second is the UTF8 version of the IPA dictionary, and the last is the library called from python.

3 Confirmation of installation

This time I wanted to make a word-separation, so I created the following sample source. a.jpg The result of moving it is like this. b.jpg

4 Regarding MeCab options

The following site has a clear description of MeCab options, thanks. In my case, I only wanted to write in a word, so I only needed "-Owakati", but I may use it later. http://www.mwsoft.jp/programming/munou/mecab_command.html

Recommended Posts

The story of adding MeCab to ubuntu 16.04
The story of pep8 changing to pycodestyle
The story of sys.path.append ()
The story of moving from Pipenv to Poetry
The story of building Zabbix 4.4
[Apache] The story of prefork
The story of wanting to buy Ring Fit Adventure
The story of using circleci to build manylinux wheels
[Ubuntu] How to delete the entire contents of a directory
The story of introducing jedi (python auto-completion package) to emacs
The story of copying data from S3 to Google's TeamDrive
After all, the story of returning from Linux to Windows
The story of Python and the story of NaN
The story of participating in AtCoder
Change the background of Ubuntu (GNOME)
The story of the "hole" in the file
The story of remounting the application server
Supplement to the explanation of vscode
The story of writing a program
A story that struggled to handle the Python package of PocketSphinx
[Pythonista] The story of making an action to copy selected text
The story of failing to update "calendar.day_abbr" on the admin screen of django
The story of an error in PyOCR
Script to change the description of fasta
10 methods to improve the accuracy of BERT
How to check the version of Django
The story of verifying the open data of COVID-19
The story of making Python an exe
The story of making an immutable mold
The story of manipulating python global variables
The story of trying deep3d and losing
The story of deciphering Keras' LSTM model.predict
The story of blackjack A processing (python)
zoom I tried to quantify the degree of excitement of the story at the meeting
The story of developing a web application that automatically generates catchphrases [MeCab]
I tried to extract and illustrate the stage of the story using COTOHA
I tried the common story of using Deep Learning to predict the Nikkei 225
The story of trying to push SSH_AUTH_SOCK obsolete on screen with LD_PRELOAD
How to calculate the volatility of a brand
Try installing only the core part of Ubuntu
The story of doing deep learning with TPU
How to find the area of the Voronoi diagram
Try adding fisheye lens distortion to the image
The story of low learning costs for Python
Combinatorial optimization to find the hand of "Millijan"
The story of IPv6 address that I want to keep at a minimum
Setting to output the log of cron execution
The inaccuracy of Tensorflow was due to log (0)
Set the range of active strips to the preview range
The story of making the Mel Icon Generator version2
Use the latest version of PyCharm on Ubuntu
How to run MeCab on Ubuntu 18.04 LTS Python
I tried to touch the API of ebay
I tried to correct the keystone of the image
Change the decimal point of logging from, to.
Image processing? The story of starting Python for
The story of making a lie news generator
The story of finding the optimal n in N fist
Story of trying to use tensorboard with pytorch
The story of misreading the swap line of the top command
The story of reading HSPICE data in Python