A python binding for mecab-ko
Project description
python-mecab-ko
A python binding for mecab-ko
Prerequisites
- python3-dev
- wget
Installation
Using pip:
# Use the -v option to check the progress of MeCab installation
pip install -v python-mecab-ko
Usage
import mecab
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))
# ]
Acknowledgments
- APIs are inspired by
KoNLPy
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
File details
Details for the file python-mecab-ko-1.0.13.tar.gz.
File metadata
- Download URL: python-mecab-ko-1.0.13.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4c1a9e84d8d1a2534d5ac2c03fe3f0c6c29421f8cb51674e0aa8bf23c79f221
|
|
| MD5 |
8fb2a8699f4ed1c60a7074cd317f726f
|
|
| BLAKE2b-256 |
8cd5dd7aa9fae2ed1a8820772d16e304da8374f0d5c1ba5cfae266543d0ef379
|