Skip to main content

Yet another python binding for mecab-ko

Project description

python-mecab-kor

GitHub release Issues

1. Why another package?

python-mecab-ko is great package but sadly it is not being maintained well now. So I decided to maintain it myself and I've fixed a lot of problems about installation. Be careful that the package name is changed ko to kor because I can't keep the package name same with the original.

2. What OS have you tested successfully so far?

It has been successfully installed on the following OS list. If the installation succeeds or fails on your OS, please report it through the issue page. I will do my best to fix your errors.

  • Linux Ubuntu
  • Linux CentOS
  • Amazon Linux
  • Mac OS

Please note that I don't have any plan with Windows OS.

3. Installation

pip install python-mecab-kor

4. Usage

Usage of the package is same with the original.

from mecab import MeCab

mecab = MeCab()

mecab.morphs('영등포구청역에 있는 맛집 좀 알려주세요.')
# ['영등포구청역', '에', '있', '는', '맛집', '좀', '알려', '주', '세요', '.']

mecab.nouns('우리나라에는 무릎 치료를 잘하는 정형외과가 없는가!')
# ['우리', '나라', '무릎', '치료', '정형외과']

mecab.pos('자연주의 쇼핑몰은 어떤 곳인가?')
# [('자연주의', 'NNG'), ('쇼핑몰', 'NNG'), ('은', 'JX'), ('어떤', 'MM'), ('곳', 'NNG'), ('인가', 'VCP+EF'), ('?', 'SF')]

mecab.parse('즐거운 하루 보내세요!')
# [
#     ('즐거운', Feature(
#         pos='VA+ETM', semantic=None, has_jongseong=True, reading='즐거운',
#         type='Inflect', start_pos='VA', end_pos='ETM',
#         expression='즐겁/VA/*+ᆫ/ETM/*')),
#     ('하루', Feature(
#         pos='NNG', semantic=None, has_jongseong=False, reading='하루',
#         type=None, start_pos=None, end_pos=None,
#         expression=None)),
#     ('보내', Feature(
#         pos='VV', semantic=None, has_jongseong=False, reading='보내',
#         type=None, start_pos=None, end_pos=None,
#         expression=None)),
#     ('세요', Feature(
#         pos='EP+EF', semantic=None, has_jongseong=False, reading='세요',
#         type='Inflect', start_pos='EP', end_pos='EF',
#         expression='시/EP/*+어요/EF/*')),
#     ('!', Feature(
#         pos='SF', semantic=None, has_jongseong=None, reading=None,
#         type=None, start_pos=None, end_pos=None,
#         expression=None))
# ]

5. References

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

python-mecab-kor-1.1.20.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file python-mecab-kor-1.1.20.tar.gz.

File metadata

  • Download URL: python-mecab-kor-1.1.20.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.7.3

File hashes

Hashes for python-mecab-kor-1.1.20.tar.gz
Algorithm Hash digest
SHA256 bd888ff9946f9956fea3f2c2cf95e6c6da6206b9715ec20295f5fa4b01bfbd84
MD5 80741d4c01da77b4ee740e4477895d5b
BLAKE2b-256 cd13a550c370ca30ab965e0dfb4036288132d44ed092f740af7d5b090ec3f9e6

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