Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This is a Python wrapper for the MeCab morphological analyzer for Japanese text. It currently works with Python 3.8 and greater.

Note: If using MacOS Big Sur, you'll need to upgrade pip to version 20.3 or higher to use wheels due to a pip issue.

issueを英語で書く必要はありません。

Note that Windows wheels require a Microsoft Visual C++ Redistributable, so be sure to install that.

Basic usage

>>> import MeCab
>>> wakati = MeCab.Tagger("-Owakati")
>>> wakati.parse("pythonが大好きです").split()
['python', 'が', '大好き', 'です']

>>> tagger = MeCab.Tagger()
>>> print(tagger.parse("pythonが大好きです"))
python  python  python  python  名詞-普通名詞-一般
が      ガ      ガ      が      助詞-格助詞
大好き  ダイスキ        ダイスキ        大好き  形状詞-一般
です    デス    デス    です    助動詞  助動詞-デス     終止形-一般
EOS

The API for mecab-python3 closely follows the API for MeCab itself, even when this makes it not very “Pythonic.” Please consult the official MeCab documentation for more information.

Installation

Binary wheels are available for MacOS X, Linux, and Windows (64bit) are installed by default when you use pip:

pip install mecab-python3

These wheels include a copy of the MeCab library, but not a dictionary. In order to use MeCab you'll need to install a dictionary. unidic-lite is a good one to start with:

pip install unidic-lite

To build from source using pip,

pip install --no-binary :all: mecab-python3

Dictionaries

In order to use MeCab, you must install a dictionary. There are many different dictionaries available for MeCab. These UniDic packages, which include slight modifications for ease of use, are recommended:

  • unidic: The latest full UniDic.
  • unidic-lite: A slightly modified UniDic 2.1.2, chosen for its small size.

The dictionaries below are not recommended due to being unmaintained for many years, but they are available for use with legacy applications.

For more details on the differences between dictionaries see here.

Common Issues

If you get a RuntimeError when you try to run MeCab, here are some things to check:

Windows Redistributable

You have to install this to use this package on Windows.

Installing a Dictionary

Run pip install unidic-lite and confirm that works. If that fixes your problem, you either don't have a dictionary installed, or you need to specify your dictionary path like this:

tagger = MeCab.Tagger('-r /dev/null -d /usr/local/lib/mecab/dic/mydic')

Note: on Windows, use nul instead of /dev/null. Alternately, if you have a mecabrc you can use the path after -r.

Specifying a mecabrc

If you get this error:

error message: [ifs] no such file or directory: /usr/local/etc/mecabrc

You need to specify a mecabrc file. It's OK to specify an empty file, it just has to exist. You can specify a mecabrc with -r. This may be necessary on Debian or Ubuntu, where the mecabrc is in /etc/mecabrc.

You can specify an empty mecabrc like this:

tagger = MeCab.Tagger('-r/dev/null -d/home/hoge/mydic')

Using Unsupported Output Modes like -Ochasen

Chasen output is not a built-in feature of MeCab, you must specify it in your dicrc or mecabrc. Notably, Unidic does not include Chasen output format. Please see the MeCab documentation.

Alternatives

  • fugashi is a Cython wrapper for MeCab with a Pythonic interface, by the current maintainer of this library
  • SudachiPy is a modern tokenizer with an actively maintained dictionary
  • pymecab-ko is a wrapper of the Korean MeCab fork mecab-ko based on mecab-python3
  • KoNLPy is a library for Korean NLP that includes a MeCab wrapper

Licensing

Like MeCab itself, mecab-python3 is copyrighted free software by Taku Kudo taku@chasen.org and Nippon Telegraph and Telephone Corporation, and is distributed under a 3-clause BSD license (see the file BSD). Alternatively, it may be redistributed under the terms of the GNU General Public License, version 2 (see the file GPL) or the GNU Lesser General Public License, version 2.1 (see the file LGPL).

Metadata

Release files for mecab-python3 1.0.11.dev5

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

Source distribution (sdist)

Source distribution for mecab-python3 1.0.11.dev5
File Size Uploaded
mecab_python3-1.0.11.dev5.tar.gz 78.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for mecab-python3 1.0.11.dev5
File
mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ ARM64 Details
mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ ARM64 Details
mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ ARM64 Details
mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ ARM64 Details
mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ ARM64 Details
mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ ARM64 Details

Total release size: 7.0 MB

Release files / mecab_python3-1.0.11.dev5.tar.gz

Download URL mecab_python3-1.0.11.dev5.tar.gz
Size 78.7 kB
Tags Source
SHA-256 checksum
How to use checksums
16a5a879d184d5bfcfb93df66c3084e270a6d3b7ae0d1cc17c1f07a19852edc1
BLAKE2b-256 checksum
How to use checksums
00275a4aa560421bcd064c8a3eeb675e631fb2b261c4b42e7e4c25a840d3417a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 591.1 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
964f186fda84aa50c276dceb7812beae88b73d718b55b8db8a4ef0aff4970a64
BLAKE2b-256 checksum
How to use checksums
3db677eeaed4f10fdffe8cbe81020249dc4c3bd2e8d4c3ac4f9e5977a09b5847
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 568.9 kB
Tags CPython 3.13 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
728ce698a8ac88700592ee6c8706e31168f40a9c67f9a9fe8c4a8a15fead1831
BLAKE2b-256 checksum
How to use checksums
696809deccccad436a654017b54451cc3b491361920655a2ed9ba72fcd34f7ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 591.3 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
3b2a120634fad4ae7c383cafb4b6d840807424a3424880da077bd249890964fb
BLAKE2b-256 checksum
How to use checksums
f3fca99793ccc205538284acd75acbbc8e7ac24cb92b36c220f0986e65b18248
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 569.1 kB
Tags CPython 3.12 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
b063533489f92a61be1709f9ff1ffc23123a44b18664c7932ca3134c3e742354
BLAKE2b-256 checksum
How to use checksums
4ff89b85d7b60c864e142e02f6a19c8fe422eb3a6ec06b3deaae7e2c1d0ac158
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 588.9 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
b0e7432553529bffa4bd5d28274abd9b77d72fa3da57a00ceb09680b75e3a3a6
BLAKE2b-256 checksum
How to use checksums
2ad5687397641bfa05574a4b720e0c8eb32101f30cae4e8efa782e6d14bceee6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 567.6 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
384551ad922779020b2fd804e2b719eea26996b455a232964e13cfc773dd3d1f
BLAKE2b-256 checksum
How to use checksums
5c5c118d3441d360f6d4bfe56e621204f8292dae94cc6dc7559d83f9ab7ac0c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 581.8 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
66e6daacc3d8369bac3e6aacc535ecdd69c5f2137b4decde42121092849c3341
BLAKE2b-256 checksum
How to use checksums
3dcc68ed17d708f4055f8d66ed69928d9b84ec44df71f9b5920866c73b2be18b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 560.3 kB
Tags CPython 3.10 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6ed58f0247393adc673b24f312d862cec962f61f8b6a23fb3bce9ab5a26a7ae1
BLAKE2b-256 checksum
How to use checksums
ba9a09a4fe04fba6c47afd85844a9bce03eaa7fa8a6cd38cd368c7333b125b74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 581.7 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
1c3e8b1ac08ebcb4ddb6fd9a893806256a483629a0c06b3841342b4a05b2cf05
BLAKE2b-256 checksum
How to use checksums
89c5f6fcd8d49cf4879f1d9b2f3c34c27d98069aef2fe6493e5e86fdc91c43ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 560.0 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
8b3e623d58a60403394628c163ca3da6a74d639587f6dab715de9c34845fada7
BLAKE2b-256 checksum
How to use checksums
96913cccc9a5157ae67c4c94ee16812b037b590415b35efa8a664032a36bd4e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 577.9 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
aced2ac3e09744eb58eafb39fc69c89c4e11d47e68a6d8d7709d090f0dafec81
BLAKE2b-256 checksum
How to use checksums
626746be3ccca24038c8a21ef4d5273d61a7210774282d4165f61bfb9e26f647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release files / mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL mecab_python3-1.0.11.dev5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 555.2 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
ab81491d589738bb47ede4438572e3016a7e1e638e15c2b02634859695ce43d2
BLAKE2b-256 checksum
How to use checksums
9eeffe9293c8ae677173bf1a39ecdd3d71adbe7180efe0a3d8526cca1c0d2b6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 2, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.11.dev5 This release

13 release files

1.0.9

35 release files

1.0.8

29 release files

1.0.7

23 release files

1.0.5

21 release files

1.0.4

17 release files

1.0.2

35 release files

1.0.0

33 release files

0.996.1

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

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