Skip to main content

mecabwrap

https://travis-ci.org/kota7/mecabwrap-py.svg?branch=master https://ci.appveyor.com/api/projects/status/oidn1rfte6u8kavs/branch/master?svg=true https://badge.fury.io/py/mecabwrap.svg

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.

Requirement

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

  • MeCab 0.996

Installation

1. Install MeCab

Ubuntu

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

Mac OSX

$ brew install mecab mecab-ipadic

Windows

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 https://github.com/kota7/mecabwrap-py.git
$ 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, print_token
>>> for token in tokenize(u"すもももももももものうち"):
...     print_token(token)
...
すもも 名詞,一般,*,*,*,*,すもも,スモモ,スモモ
   助詞,係助詞,*,*,*,*,,,
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
   助詞,係助詞,*,*,*,*,,,
もも  名詞,一般,*,*,*,*,もも,モモ,モモ
   助詞,連体化,*,*,*,*,,,
うち  名詞,非自立,副詞可能,*,*,*,うち,ウチ,ウチ

Usage

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

Release files for mecabwrap 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mecabwrap 0.3.4
File Size Uploaded
mecabwrap-0.3.4.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mecabwrap 0.3.4
File Interpreter ABI Platform
mecabwrap-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / mecabwrap-0.3.4.tar.gz

Download URL mecabwrap-0.3.4.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
565a0f392e94c881b61ee2a8ef8dd15daba5b67feadc5f4f1cd835e2e8a8f789
BLAKE2b-256 checksum
How to use checksums
11e288aa1cd3f0f5930d2fd536ca2f83793b8d199bb2bb86123c6ed0fd07191b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Release files / mecabwrap-0.3.4-py3-none-any.whl

Download URL mecabwrap-0.3.4-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
979c43ef7b0b3c946baa01c08ff97eb8ea1f5edf56e2411cbbc1135891cbddbb
BLAKE2b-256 checksum
How to use checksums
c7dc9e1356262052bd2e3e8dac84e86e6c8bdce0b21f605d95af061249ad1d93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.3.4 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

3 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page