Note
Initial runs of each class method may require some time to load dictionaries (< 1 min). Second runs should be faster.
Wrapper for JHannanum.
JHannanum is a morphological analyzer and POS tagger written in Java, and developed by the Semantic Web Research Center (SWRC) at KAIST since 1999.
from konlpy.tag import Hannanum
hannanum = Hannanum()
print hannanum.morph(u'롯데마트의 흑마늘 양념 치킨이 논란이 되고 있다.')
print hannanum.nouns(u'다람쥐 헌 쳇바퀴에 타고파')
print hannanum.pos(u'웃으면 더 행복합니다!')
Parameters: | jvmpath – The path of the JVM passed to init_jvm(). |
---|
Morphological analyzer.
This analyzer consists of two parts: 1) Dictionary search (chart), 2) Unclassified term segmentation.
Noun extractor.
POS tagger.
This tagger is HMM based, and calculates the probability of tags.
Parameters: | ntags – The number of tags. It can be either 9 or 22. |
---|
Wrapper for Kkma.
Kkma is a morphological analyzer and natural language processing system written in Java, developed by the Intelligent Data Systems (IDS) Laboratory at SNU.
from konlpy.tag import Kkma
kkma = Kkma()
print kkma.sentences(u'저는 대학생이구요. 소프트웨어 관련학과 입니다.')
print kkma.nouns(u'대학에서 DB, 통계학, 이산수학 등을 배웠지만...')
print kkma.pos(u'자주 사용을 안하다보니 모두 까먹은 상태입니다.')
Parameters: | jvmpath – The path of the JVM passed to init_jvm(). |
---|
Noun extractor.
POS tagger.
Sentence detection.
Wrapper for MeCab-ko morphological analyzer.
MeCab, originally a Japanese morphological analyzer and a POS tagger developed by the Graduate School of Informatics in Kyoto University, was modified to MeCab-ko by the Eunjeon Project to adapt to the Korean language.
In order to use MeCab-ko within KoNLPy, follow the directions in Optional installations.
from konlpy.tag import Mecab
# MeCab installation needed
mecab = Mecab()
print mecab.nouns(u'우리나라에는 무릎 치료를 잘하는 정형외과가 없는가!')
print mecab.pos(u'자연주의 쇼핑몰은 어떤 곳인가?')
Parameters: | dicpath – The path of the MeCab-ko dictionary. |
---|
Noun extractor.
POS tagger.
See also
Korean POS tags comparison chart
Compare POS tags between several Korean analytic projects. (In Korean)