3 steps to put Python + mecab in yum only

Use mecab from python script

sudo rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-> 1.noarch.rpm sudo yum install mecab mecab-devel mecab-ipadic -y sudo pip install https://mecab.googlecode.com/files/mecab-python-0.996.tar.gz

mecab.py


# coding: utf-8

import MeCab
m = MeCab.Tagger ("-Ochasen")
print m.parse ("How are you")

python mecab.py

result: Go Prefix-Noun Connection Mood Kigen Mood Noun-General Ha ha is a particle-a particle How is it? How is it? Noun-adjectival noun stem It's a desho auxiliary verb special / death imperfect form Uuu auxiliary verb invariant basic form Ka Ka Ka Particles-Sub-particles / Parallel particles / Final particles EOS

that's all.

--If you don't have mecab-devel, you will get an error saying that you don't have mecab-config with pip install mecab.

--mecab-ipadic is a dictionary file. People silently put in all three, such as gcc compilation errors, make, and yum.

Recommended Posts

3 steps to put Python + mecab in yum only
Put MeCab in "Windows 10; Python3.5 (64bit)"
[Itertools.permutations] How to put permutations in Python
PUT gzip directly to S3 in Python
First steps to try Google CloudVision in Python
Steps to develop a web application in Python
To add a module to python put in Julialang
Sample to put Python Kivy in one file
How to run setUp only once in python unittest
How to read csv containing only integers in Python
To flush stdout in Python
Login to website in Python
Speech to speech in python [text to speech]
How to develop in Python
Post to Slack in Python
[Python] How to do PCA in Python
How to collect images in Python
Put python, numpy, opencv3 in ubuntu14
How to use SQLite in Python
Until you put Python in Docker
In the python command python points to python3.8
Put only kubectl in Amazon Linux 2
Windows10: Install MeCab library in python
Try to calculate Trace in Python
Try to put data in MongoDB
How to use Mysql in python
How to wrap C in Python
How to use ChemSpider in Python
6 ways to string objects in Python
How to use PubChem in Python
Steps to install python3 on mac
How to handle Japanese in Python
An alternative to `pause` in Python
I want to solve APG4b with Python (only 4.01 and 4.04 in Chapter 4)
How to use python put in pyenv on macOS with PyCall
[Python / AWS Lambda layers] I want to reuse only module in AWS Lambda Layers
I put Python 2.7 in Sakura VPS 1GB.
I tried to implement PLSA in Python
Challenge Fizz Buzz! Problems with Python in 5 patterns (only now up to 398)
[Introduction to Python] How to use class in Python?
Try logging in to qiita with Python
From Python to using MeCab (and CaboCha)
Install Pyaudio to play wave in python
How to access environment variables in Python
I tried to implement permutation in Python
Method to build Python environment in Xcode 6
Python to remember only with hello, worlds
How to dynamically define variables in Python
How to do R chartr () in Python
Pin current directory to script directory in Python
Send email to multiple recipients in Python (Python 3)
Convert psd file to png in Python
Sample script to trap signals in Python
I tried to implement PLSA in Python 2
To set default encoding to utf-8 in python
[Python] How to put any number of standard inputs in a list
Decorator to avoid UnicodeEncodeError in Python 3 print ()
How to work with BigQuery in Python
Steps to install Python environment on Ubuntu
Log in to Slack using requests in Python
How to get a stacktrace in python