Skip to main content

Yet another interface to MeCab morphological analyzer

Project description

mecabwrap is yet another Python interface to MeCab Morphological Analyzer.

Its goal is to provide intuitive APIs that work on Unix and Windows machines seamlessly.


  • Python 2.7+ or 3.4+ (May also work on older versions)
  • MeCab 0.996


1. Install MeCab


$ sudo apt-get install mecab libmecab-dev mecab-ipadic-utf8


$ brew install mecab mecab-ipadic


Download and run the installer.

See also: official website

2. Install this Package

Install from PyPI

$ pip install mecabwrap

or, from GitHub

$ git clone --depth 1
$ cd mecabwrap-py
$ pip install -U .

Quick Check

Following command will print the MeCab version. Otherwise, you do not have MeCab installed or MeCab is not on the search path.

$ mecab -v
# should print `mecab of 0.996` or similar.

To verify that the package is successfully installed, try the following:

$ python
>>> from mecabwrap import tokenize
>>> for token in tokenize(u"すもももももももものうち"):
...     print(token)
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
うち  名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチ


See the example notebook (or a cleaner version on nbviewer) for more detail.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mecabwrap, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size mecabwrap-0.3.2-py3-none-any.whl (11.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mecabwrap-0.3.2.tar.gz (10.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page