MeCab binding for many OSs (Windows, macOS, and Linux)
Project description
Unofficial MeCab binding module for many OSs (Windows, macOS, and Linux)
Instlation
$ pip install mecab
or
$ python -m 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.
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
mecab-0.996.tar.gz
(63.5 kB
view hashes)
Built Distributions
mecab-0.996-cp38-cp38-win_amd64.whl
(509.5 kB
view hashes)
mecab-0.996-cp38-cp38-win32.whl
(738.8 kB
view hashes)
mecab-0.996-cp37-cp37m-win_amd64.whl
(509.4 kB
view hashes)
mecab-0.996-cp37-cp37m-win32.whl
(738.6 kB
view hashes)
mecab-0.996-cp36-cp36m-win_amd64.whl
(509.4 kB
view hashes)
mecab-0.996-cp36-cp36m-win32.whl
(738.6 kB
view hashes)
mecab-0.996-cp27-cp27m-win_amd64.whl
(499.7 kB
view hashes)
mecab-0.996-cp27-cp27m-win32.whl
(729.2 kB
view hashes)
Close
Hashes for mecab-0.996-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90966b002eeeee74d7251c1bbb257437c1918803f918afc69df78a87d081ef07 |
|
MD5 | 62bbfb164d309505383a0866f769d38c |
|
BLAKE2b-256 | a0a18b01ea3c8a10a86fbb63d1429b9e1db6144c344e95904404b70f923facd2 |
Close
Hashes for mecab-0.996-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7fd48a6e2a9dbfc22f3b5391ce0b08d9bb4400a7da90d536cce490a0094dd77 |
|
MD5 | ad3bebfe204a6bcd82efe854ca60eba0 |
|
BLAKE2b-256 | 469202b78f00cf2154831f416e484c6e372b93a8c24edaf969e44093d1482673 |
Close
Hashes for mecab-0.996-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e07c90472592bcf961eda718d38267af50c1bb7cd724fe4ba0d85b47f72209f1 |
|
MD5 | 9cd4a69673a04bef418464fe145e9ad0 |
|
BLAKE2b-256 | 46048951252c8356b1674eda5b472df08c7cbfcb35f2fd44ee578510eb63c691 |
Close
Hashes for mecab-0.996-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 856cc1c3463e72bda075c13ab392383c7a4f9d4e0b2e024842eb024ccc28b7ab |
|
MD5 | 8e6d77f687b940c8fcec8c5665165888 |
|
BLAKE2b-256 | 11b1c340f77126af3aa80a220412ef00216ddc8535ad15b04bd2bf4299ab74ff |
Close
Hashes for mecab-0.996-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0332dfdc215497fa2e8edf87f5638f232f96fbc87edef6136175eaa7d586964 |
|
MD5 | e86137e4821f17d4e51f800ecb8d76fe |
|
BLAKE2b-256 | c64f92b281aea90a3b9c11550cdb09278a9b3828ee71b0fe9f8da66245846e7f |
Close
Hashes for mecab-0.996-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 366c5d9d57afdab92216e3c1569f22b992d3a063a67d5d4f42aced26011f6a4b |
|
MD5 | ff350f9432f640c5071e7b98045bdad9 |
|
BLAKE2b-256 | 568c0378d3492dacd1e610d71bbf20159d81c302c64589dfe05ad491137a4dc1 |
Close
Hashes for mecab-0.996-cp27-cp27m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd5763bf7e0bcd80ba844b981841ad159ec07d9ccf764a9b2c8ad57b31cecf7b |
|
MD5 | 70a99ae8d06bd2be056ca53bda6a6d6c |
|
BLAKE2b-256 | 447d880dba649c11cc8271bf457e4dc1495ded3172139454e9563af3452c7d53 |