Python wrapper for the MeCab morphological analyzer for Japanese
Project description
This is a Python wrapper for the MeCab morphological analyzer for Japanese text. It works with Python 3.5 and greater, as well as Python 2.7. (Note: Python 3.5 is not supported on OSX, see this issue).
Basic usage
>>> import MeCab
>>> wakati = MeCab.Tagger("-Owakati")
>>> wakati.parse("pythonが大好きです").split()
['python', 'が', '大好き', 'です']
>>> chasen = MeCab.Tagger("-Ochasen")
>>> print(chasen.parse("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 MeCab
documentation for more information.
Installation
Binary wheels are available for MacOS X and Linux, and are installed
by default when you use pip
:
pip install mecab-python3
These wheels include an internal (statically linked) copy of the MeCab
library, and a copy of the mecab-ipadic
dictionary (using
UTF-8 text encoding), which is automatically used by default. If you
wish to use a different dictionary, you will need to install it
yourself, write a mecabrc
file directing MeCab to use it, and set
the environment variable MECABRC
to point to this file.
To build from source using pip,
pip install --no-binary :all: mecab-python3
Alternatively, you can use pip to download the source, then build it by hand:
pip download --no-binary :all: mecab-python3
tar zxf mecab-python3-{version}.tar.gz
cd mecab-python3-{version}
python3 setup.py build
# install as you like
When the module is built from source, it requires the system to
provide the MeCab library and at least one dictionary. You must have
SWIG, the MeCab library and headers, and a dictionary installed
before running pip install
or setup.py build
. For instance, on
Debian-based Linux,
sudo apt-get install swig libmecab-dev mecab-ipadic-utf8
Building wheels with a bundled library and dictionary is only
supported in a sanitized CI environment. Consult the scripts in the
scripts
subdirectory of the source tree to see how it’s done.
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
).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for mecab_python3-0.996.6rc2-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbcf020aed366245b385410fb5667f4a3cfac52743b0e8a6e2d010fef678cf6a |
|
MD5 | ce2f06581f4772c5f1df7d7c73efc411 |
|
BLAKE2b-256 | 05a89c333f0a8fd35adcf6fa04ccac1a7dcb10df81ae5bd1101dcf6a04c844f0 |
Hashes for mecab_python3-0.996.6rc2-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e204df93b48b9558182303d8d1468b15cfd7d0623e5b79840f93a58e821e09e |
|
MD5 | 669c6b5587e11c7095da030c62c37bad |
|
BLAKE2b-256 | ca068d88b7c3ca4f5bb1b4c5a33c449f6bee2cf07d515c9ac73fda4904f96bdf |
Hashes for mecab_python3-0.996.6rc2-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a6f5babd17d397cf72bef7ed69b886ce8c74f21fb7622f6bb8951b514e128c4 |
|
MD5 | dcc36da3bf6d336c2287279a5306c874 |
|
BLAKE2b-256 | 7106da1237c6ecb28dda156f3831d5db6d7606f77a574c7a9d12f58bac5d7bd8 |
Hashes for mecab_python3-0.996.6rc2-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5c13bbe9e38c7dbb4a5fa941d4e1601eef7da0957170b50d7784fbffc3931a0 |
|
MD5 | 3f672e075c3d30567830a77756d6cff1 |
|
BLAKE2b-256 | a2b4e27c5d7f803aed4d6145eb44791a2cc13ab527bb2b59d60b9412d996b8c2 |
Hashes for mecab_python3-0.996.6rc2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3efdb6c84d414f557df441d7fb8a9c18cdd25c87060d98ddc2901d77742137c9 |
|
MD5 | 13ac208747d54c7c36526afec83c976b |
|
BLAKE2b-256 | 5a072bf829ff80051511dffc00680e01e3c45c06e7c79db163666e063c828652 |
Hashes for mecab_python3-0.996.6rc2-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e70228328a10e2eef19dc95bfb6c3c74a5cc7cfb49db29e04505946c3f945ea8 |
|
MD5 | f6d6aeb13bf5e96a49bd16a87b62c881 |
|
BLAKE2b-256 | 25c0ff05204af037a8f69b8034fca8f7ada5c8e8adb6fd3254664bded8ed53f4 |
Hashes for mecab_python3-0.996.6rc2-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d35091cbf82a76515dfc46d32eadf6a8cd9049a6edc2013b9021b506d2b08b0c |
|
MD5 | 6338f4878abc9b3d279885ccfe9a414d |
|
BLAKE2b-256 | 51ac4faba3fd61666fb27713bba17b97b40fb143de6c883bf750e8dcb94bc5ae |
Hashes for mecab_python3-0.996.6rc2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428fbfc444e26d2ec3dce0eca1debdd13b810512e5c81f6d8051bb58d3a02a62 |
|
MD5 | ac46b83d670cd57e7cd185742cd56a71 |
|
BLAKE2b-256 | c6111bf6902e2b3da633188ee002ea20dcbafc49f55320099ac310636282e18c |
Hashes for mecab_python3-0.996.6rc2-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2994fc44c238b084253e7a726266736bf921337326bd6ea372356d47a9eb815f |
|
MD5 | 93ed506156cd883d50af9b976bfa0fa5 |
|
BLAKE2b-256 | 5a447ab257180440d9556718162b180f3551ae18a9c46ae9f309a4a9014d52e7 |
Hashes for mecab_python3-0.996.6rc2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed2421f20c7aefceb10a74e7d3ed6e0b98ab5bbef6e893d214917208bf06abd5 |
|
MD5 | feb8553d097417f5500b94e3e3ed9e4b |
|
BLAKE2b-256 | 2fbbf5bcae7c4f622ce08d696f03a6151fcc4bf5f5a1b25c4f81a641d0e85526 |
Hashes for mecab_python3-0.996.6rc2-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75b38920a2f8297b30d1c93d78767eaccdc0f93d0a0307d90c3d0e17cbece61 |
|
MD5 | 78036b918a9fca7b48e0c44d3d7bcaf7 |
|
BLAKE2b-256 | 8c9b2d0598980956b7730b7b5a0142ef4491fc8c78f876289611c0b7c1bfd03b |
Hashes for mecab_python3-0.996.6rc2-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7fe29b4ce425d4fe1c0e0784d4057b84448f99c180dd2862f74e61abc49a060 |
|
MD5 | 7819c38f8cfe2de899bde5e2698b0192 |
|
BLAKE2b-256 | eca48ad1b29e75fd43f0859d14efab7fb7f36249e921b714796ec99d85d3a0d7 |
Hashes for mecab_python3-0.996.6rc2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c587dfdb43a9b25486529aa4b5a0411199d316df6f2eb82478be815195a4086a |
|
MD5 | bbb6c12ef474510ed4ce5ef76b74d79c |
|
BLAKE2b-256 | 3bafc50f24f2eb845b60e651d001b96d976ab6fc71dff062c2211033be9522f1 |
Hashes for mecab_python3-0.996.6rc2-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef0c9bb57d8ab6c8ba059595b28a7bb8b4e641036bb37a1782a1286eb54fd772 |
|
MD5 | 9f23532faeb02c986fa334f76130bdab |
|
BLAKE2b-256 | 190b5c53deb1d84bda889360501bea25d9fed5460a1aaab3e25de01499b00166 |
Hashes for mecab_python3-0.996.6rc2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f3985119334119582523ceff7bdfb287d6c6ba64db7b79ce6ee2fda3235e842 |
|
MD5 | 8c50fe884a1007ecdcb747fcba566d6d |
|
BLAKE2b-256 | 478e44d0c1f08dc45eeed8f78e2ab0a1fb64de13d89ac24f92240a9dfaadb99c |
Hashes for mecab_python3-0.996.6rc2-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6415584e9ecbd968736f45a18809075908db33b7e45f961b646f5989a82c8eb3 |
|
MD5 | b82cdc7a69b54b3ba0efcac1030b6395 |
|
BLAKE2b-256 | 48872bdcfdd4fb6b38109a81567b1e7726bdda7a1976b4ddd74582094e5e13f1 |
Hashes for mecab_python3-0.996.6rc2-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 295c279dca6d8449494565927ac19d4c1875fd7c7f3e22bf0042afac82c9edc9 |
|
MD5 | 196f132236a0fb95b109543c05cd5716 |
|
BLAKE2b-256 | 46e6985bf95cc36a08f8c7deefaa5ec617be2c57104b0c857e25afb5eb7faa4e |
Hashes for mecab_python3-0.996.6rc2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71c8a6feebbbac81e65b66c5baec73c1b95b17250d9eba3fdedff6ef7b59793a |
|
MD5 | 1deed06436c0604d485dc7b527ecf5e7 |
|
BLAKE2b-256 | 415aa990a1623e8866914f40c5b235452b4ab0a715bd56ff088287ddaddb1c7e |
Hashes for mecab_python3-0.996.6rc2-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86cb048bbd660c7d07f798d6eab06a6bb888436851a82e36b24b90709a22dd47 |
|
MD5 | 8b0f763163f796685baf3b27704ab30c |
|
BLAKE2b-256 | 251d9fb7e00c8798c5356249b4bfaec145850d28910b68d1b6e15eb454ca0d3d |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | faca7d30e128616632db0948b7a2a3c75144b19ac30f61e935d7d4e7e586e26e |
|
MD5 | 183953cc19a9bddad6c17b35c4a11bd8 |
|
BLAKE2b-256 | ebb8a17606b36a9bb37825f301dcdf29baddf75b0dc707ff082738dbef92beca |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27mu-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0332fc4449ca1c5f9bfa63ca7d70e9cea51b4f94e2dafd0daae736d9b924e202 |
|
MD5 | aab3e0eed400e8b07f2778ec8070f1d6 |
|
BLAKE2b-256 | 1d5db33e4102a35fde2d6b67aa53b3bd93b7a6c456cb5924fe313d78531e348f |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 199e8096a081281c2ee033bac1760e2b610e0a60b7ba49466d06459b04dc9574 |
|
MD5 | 174d8f0858de4febad6dda92c89088ac |
|
BLAKE2b-256 | 1298e99e8c7d58315e2888dacf990aa63257994c72c063bcdc6c3c8e11c4718f |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27mu-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3116313c5fc9ba89d993af23f87a54598abd4958edaff84a452179e97f610d0e |
|
MD5 | 216634d33640c8dcc5f823b141965148 |
|
BLAKE2b-256 | 7844e0c8cbac6febf309e7ba79ba410e191307ede87924d7e8b48f18d5b4dd87 |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9626d36e507aead2a705ea0260499e6b172e5033dbdfbaba6f4b1500e7696811 |
|
MD5 | fac3c8def3ee7a1bbe01ed25c46af33d |
|
BLAKE2b-256 | 5b95fbeddd59e7b7be7e9d9af9d9b62bd34413012716c6e412121093ca233b43 |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23f60386899f7e471bdabb33b2cef57eb181c435622dc25e7bd1eeee2fbce5d8 |
|
MD5 | 6aa34bae1a19659d8dc19694b94cb799 |
|
BLAKE2b-256 | 7de13a2d365fc038442e3c81a6fa93abac62c588d388d6256aae20609ab3f641 |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4db09afa9d19636505a046883b0f86d8e4f1f1b9c4be06c79fb0daac2ce40bd |
|
MD5 | 60acd6f13f8813f0f131bb5a04456f80 |
|
BLAKE2b-256 | 33cb05f5cbd06ac766f6108e936d6ec7fda29d10a76abda11d0cea7707d197f3 |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45802e16b147c56b983fee954a0d1ff51038ba141087e42dd465ec5e8290f89c |
|
MD5 | 735a9d1bd9e410598a0b9e06fc29fa28 |
|
BLAKE2b-256 | ade7ee158b3c9f5713c999046d1500c36832c555f810a1f3eecabbbb78776eb2 |
Hashes for mecab_python3-0.996.6rc2-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c1cb76f20700948f4d495ea5fc84352fbbc21336e971d44af3082f5261ea664 |
|
MD5 | c1b0a6b9296c1e961070c4bf19bbbd79 |
|
BLAKE2b-256 | 4fcf14a2090deaf7c82a94a6a28065bc365a53f55ad7b0b80255bfbb4dc1cf5e |