Skip to main content

MeCab binding for many OSs (Windows, macOS, and Linux)

Project description

Unofficial MeCab binding Python module for many OSs (Windows, macOS, and Linux)

Official Japanese document about MeCab is available: https://taku910.github.io/mecab/

Japanese document about this Python wrapper is available: https://qiita.com/yukinoi/items/990b6933d9f21ba0fb43

Installation

$ pip install mecab

or

$ python -m pip install mecab

NOTE: If you use Python 64-bit on Windows, MeCab 64-bit binary is required.

If you encountered the error such as MeCab_wrap.cxx:178:11: fatal error: ‘Python.h’ file not found, please try the following command:

$ CPLUS_INCLUDE_PATH=`python-config –prefix`/Headers:$CPLUS_INCLUDE_PATH pip install mecab

Usage

>>> import MeCab
>>> t = MeCab.Tagger()
>>> sentence = "太郎はこの本を女性に渡した。"
>>> print(t.parse(sentence))
太郎    名詞,固有名詞,人名,,*,*,太郎,タロウ,タロー
      助詞,係助詞,*,*,*,*,,,
この    連体詞,*,*,*,*,*,この,コノ,コノ
      名詞,一般,*,*,*,*,,ホン,ホン
      助詞,格助詞,一般,*,*,*,,,
女性    名詞,一般,*,*,*,*,女性,ジョセイ,ジョセイ
      助詞,格助詞,一般,*,*,*,,,
渡し    動詞,自立,*,*,五段サ行,連用形,渡す,ワタシ,ワタシ
      助動詞,*,*,*,特殊,基本形,,,
      記号,句点,*,*,*,*,,,
EOS
>>> n = t.parseToNode(sentence)
>>> while n:
>>>     print(n.surface, "\t", n.feature)
>>>     m = m.next
           BOS/EOS,*,*,*,*,*,*,*,*
太郎     名詞,固有名詞,人名,,*,*,太郎,タロウ,タロー
       助詞,係助詞,*,*,*,*,,,
この     連体詞,*,*,*,*,*,この,コノ,コノ
       名詞,一般,*,*,*,*,,ホン,ホン
       助詞,格助詞,一般,*,*,*,,,
女性     名詞,一般,*,*,*,*,女性,ジョセイ,ジョセイ
       助詞,格助詞,一般,*,*,*,,,
渡し     動詞,自立,*,*,五段サ行,連用形,渡す,ワタシ,ワタシ
       助動詞,*,*,*,特殊,基本形,,,
       記号,句点,*,*,*,*,,,
         BOS/EOS,*,*,*,*,*,*,*,*

License

MeCab is copyrighted free software by Taku Kudo <taku@chasen.org> and Nippon Telegraph and Telephone Corporation, and is released under any of the GPL (see the file GPL), the LGPL (see the file LGPL), or the BSD License (see the file BSD).

Also, this Python binding is under any of the GPL, the LGPL, or the BSD License.

Changes

0.996.5 (2024/10/15)

  • Update MeCab_wrap.cxx by SWIG 4.2.1 for support latest macOS

0.996.2 (2020/02/11)

  • Bugfix: memory leak for MeCab.Tagger().parseToNode()

Contributing

See https://github.com/ikegami-yukino/mecab/blob/master/mecab/python/CONTRIBUTING.md

Project details


Download files

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

Source Distribution

mecab-0.996.5.tar.gz (64.0 kB view details)

Uploaded Source

Built Distributions

mecab-0.996.5-cp313-cp313-win_amd64.whl (497.5 kB view details)

Uploaded CPython 3.13 Windows x86-64

mecab-0.996.5-cp313-cp313-win32.whl (731.1 kB view details)

Uploaded CPython 3.13 Windows x86

mecab-0.996.5-cp312-cp312-win_amd64.whl (497.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

mecab-0.996.5-cp312-cp312-win32.whl (731.0 kB view details)

Uploaded CPython 3.12 Windows x86

mecab-0.996.5-cp311-cp311-win_amd64.whl (497.0 kB view details)

Uploaded CPython 3.11 Windows x86-64

mecab-0.996.5-cp311-cp311-win32.whl (731.0 kB view details)

Uploaded CPython 3.11 Windows x86

mecab-0.996.5-cp310-cp310-win_amd64.whl (497.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

mecab-0.996.5-cp310-cp310-win32.whl (730.9 kB view details)

Uploaded CPython 3.10 Windows x86

mecab-0.996.5-cp39-cp39-win_amd64.whl (506.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

mecab-0.996.5-cp39-cp39-win32.whl (735.0 kB view details)

Uploaded CPython 3.9 Windows x86

mecab-0.996.5-cp38-cp38-win_amd64.whl (505.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

mecab-0.996.5-cp38-cp38-win32.whl (733.7 kB view details)

Uploaded CPython 3.8 Windows x86

mecab-0.996.5-cp37-cp37m-win_amd64.whl (505.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

mecab-0.996.5-cp37-cp37m-win32.whl (733.4 kB view details)

Uploaded CPython 3.7m Windows x86

mecab-0.996.5-cp36-cp36m-win_amd64.whl (517.7 kB view details)

Uploaded CPython 3.6m Windows x86-64

mecab-0.996.5-cp36-cp36m-win32.whl (742.1 kB view details)

Uploaded CPython 3.6m Windows x86

mecab-0.996.5-cp27-cp27m-win_amd64.whl (498.8 kB view details)

Uploaded CPython 2.7m Windows x86-64

mecab-0.996.5-cp27-cp27m-win32.whl (728.5 kB view details)

Uploaded CPython 2.7m Windows x86

File details

Details for the file mecab-0.996.5.tar.gz.

File metadata

  • Download URL: mecab-0.996.5.tar.gz
  • Upload date:
  • Size: 64.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5.tar.gz
Algorithm Hash digest
SHA256 fdf37f85c337d908b4ddcf43b4eff5a3c354958ca9c22fca783d24de54cfeae7
MD5 1504611722da6d75d575d7521a17feb0
BLAKE2b-256 a744b7049fcc00c34819aa59d0994b130217b615a5238de8b02ca0e0350af7f4

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 497.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 1275ff516b8a1183f55f2033c552f9c67bbb86e46ec9d07361d4f7bd0e545710
MD5 67aa72ad92a72e8840de08022b54ffe8
BLAKE2b-256 1a5220b8ea2cd4fd5b68b54c08f4857ab2ca16bafdc0859eb255d8fc4d50bd03

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp313-cp313-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp313-cp313-win32.whl
  • Upload date:
  • Size: 731.1 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 74d75484027eaf97886491c750a3ab2f5dd67e5eae481bd1e12fdea5df4791b8
MD5 5013fa72123e6cf3d0bf5a8ab76a457e
BLAKE2b-256 99641cd80997f0d9d48bca11763161da4b2a2b0f876829341e7630ee3abf84fa

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 497.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 01514faeca31f845cd9d012abbb1fe9710ce5d35af6b30ed74938782e8607619
MD5 5a138d6b09c4c1908e77ee6a1ef7c601
BLAKE2b-256 a77aee182b0b53e04c412aae553361ff7d4e3f566a9f751c733402d684e3ef71

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp312-cp312-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp312-cp312-win32.whl
  • Upload date:
  • Size: 731.0 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 2c3284eed8525e2414f08163571f772ba41a24f0f06bfdb319e8954d8ac7a5a4
MD5 ec1531ae1eb508645dd5a14fd39f3ec5
BLAKE2b-256 55241a72ba5992d534e4381f2a2f319e58542b2389d8cf6488aff3cb0d6a1f34

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 497.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 aefd430f2ed0f882065b29aa1f007033f71f2fbde72ced5432ef8525c679c909
MD5 e5320b08ad83727026b70af4ba0b4ecb
BLAKE2b-256 d047db99ab4ade1f42a1ab0217b03995c7b746121b596313f987ec7eee4e5448

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp311-cp311-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp311-cp311-win32.whl
  • Upload date:
  • Size: 731.0 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1b169dc2087cd2c0dc169a1de7c330267b8ef8e9788d3230feb96ea641ac4a89
MD5 1ac4a5c49354351287f67b5dbdf8dd63
BLAKE2b-256 9d268dafa561d6e6957f1db97084166257d4d6bc292648a0b01a38785d833f6d

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 497.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5ffbb1992e04646f1030f95c4c03b95adf89a16ad092910b77b3fe26444cc5c4
MD5 bcf3bdb492ad7ccc08621682cff126aa
BLAKE2b-256 72480ebd1cb4e3e4a8efc0c859617b86c9889710fd3f46f8e3390ec7a5079035

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp310-cp310-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp310-cp310-win32.whl
  • Upload date:
  • Size: 730.9 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 9d9ed9e1c1794484fe1c8b195fa6f1b8e1bfeef4823dd90c68efa9c1e12e2033
MD5 2945c9121ed7ad811577f8d0983f8b21
BLAKE2b-256 515517b9336ab96c2a0fe1d2445989c6b669a26304c483b3b105024ffc88e5d1

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 506.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 932cf16d54c8f0216b89131389c1ad827650ef1363324c2b98e77906f70b9916
MD5 d6dd84db5066b2efe505407d5968e0f6
BLAKE2b-256 0f9254442d54b994d77640ad29cc122f4d14979380c61176182b718b5e553ec8

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp39-cp39-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp39-cp39-win32.whl
  • Upload date:
  • Size: 735.0 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 8f4b3337df0974aaa006baf2ca54b9a5bb4a59911786d142479ebb73389c88ff
MD5 453d71ab484b2b2e379405401e913d57
BLAKE2b-256 a8183679577e721fbbb4e5d67e3555db7eedda715544c254b2503420d310f7cf

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 505.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e5f5e3db3c0afeac6b41d6cdff2b7b99a7697d0191c4b4655303d8b5704676fa
MD5 50b2584c0b53c7906531656111f2a450
BLAKE2b-256 e547d6f694bc0a1cb94825b3905595200625446423cc8077f9c5d94283f48398

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp38-cp38-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp38-cp38-win32.whl
  • Upload date:
  • Size: 733.7 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 a11864695aab41372a3409fe160ce53792c4db834b362cc01b031d476a3ab750
MD5 9fb75820d04a3147a72dcb49e55cf091
BLAKE2b-256 8f077b50e6ba544c9872cd22792993cec79199a044b5a129832ed0dbeb17961a

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 505.1 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 554ba2d3755b67aa0b16b6bdf59ac1a6e9b755d614d8f3e3ae386b67238d1ca2
MD5 09136ef9a49323bb813342a68d86f1a3
BLAKE2b-256 8689eb68f3d99bdee558a8ae32cf6ab729a450bca77fa05a9c1fdd5d532afe06

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp37-cp37m-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 733.4 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 c4894b41d9c753c4ce2c540226d2723211f28931b57d3c2cbc59b16d10b5730e
MD5 e0ade8fb8b783b20e597fa2347053c9d
BLAKE2b-256 4d1e5587ff8166e7b362540d13169c9646cbdfa1bb4db352a35504da87aa990c

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 517.7 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 ba803c7bd1d44718161c7430e195b487852a73456c7770aff9b0f1376e784f20
MD5 9cfacc72be736c8496df4054c5bfbbdf
BLAKE2b-256 c8bc9760ba24803cb9a1cdd242c9899e12c8765d2a4d9baae6f0d3763e709128

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp36-cp36m-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 742.1 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 0053eb09c66927d9db5f77e4e9f44321b28a1d64371d4d3c72886bac1078c17d
MD5 b2234c8c500d9f5cebfe3e981b5a6629
BLAKE2b-256 e48ddf81efe9f46f59e83d0a8dea0d12920fc4ad7373ef676cb5588d902a8419

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: mecab-0.996.5-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 498.8 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 32ecf5299108703fc67045ea39a45050c7801c22849d935fccf3ebec8f071aac
MD5 a6926d509c371b596361c13111d46299
BLAKE2b-256 a7c8c59a68330e2cac36a4e4deb75834b35de848099af993fed2218bd1a522e7

See more details on using hashes here.

File details

Details for the file mecab-0.996.5-cp27-cp27m-win32.whl.

File metadata

  • Download URL: mecab-0.996.5-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 728.5 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mecab-0.996.5-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a691ec5daa91318bf2c863fbe94d1fe201968cfb2eeefe061d4ec2692a46b4e6
MD5 08412e1a22e6c63c0b08a7f78486382d
BLAKE2b-256 3d0330b57b09bc2dfd5106908e6a7c1e98b76baa920138cf493c26b16a4e79dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page