KOMORAN 설치
형태소분석,Lucene,mecap,komoran,tf-idf vector반응형
# KoNLPy 를 설치하면 KOMORAN 까지 한방에 다 해결되니 아래 링크로 보자.
https://storycode.tistory.com/466
# https://github.com/shineware/PyKOMORAN
pip install PyKomoran
# 혹은
git clone https://github.com/shineware/PyKOMORAN
cd PyKOMORAN/python
sudo python setup.py install
sudo apt install openjdk-11-jre-headless
> vi test.py
from PyKomoran import *
komoran = Komoran("EXP")
print(komoran.get_plain_text("KOMORAN은 한국어 형태소 분석기입니다."))
print(komoran.get_plain_text("① 대한민국은 민주공화국이다."))
komoran = Komoran("STABLE")
print(komoran.get_plain_text("KOMORAN은 한국어 형태소 분석기입니다."))
print(komoran.get_plain_text("① 대한민국은 민주공화국이다."))
> python test.py
# EXP ( = Full )
KOMORAN/SL 은/JX 한국어/NNP 형태소/NNP 분석기/NNG 이/VCP ㅂ니다/EF ./SF
①/SW 대한민국/NNP 은/JX 민주공화국/NNP 이/VCP 다/EF ./SF
# STABLE ( = Light )
KOMORAN/SL 은/JX 한국어/NNP 형태소/NNG 분석기/NNG 이/VCP ㅂ니다/EF ./SF
①/SW 대한민국/NNP 은/JX 민주/NNG 공화국/NNG 이/VCP 다/EF ./SF
반응형
'형태소분석,Lucene,mecap,komoran,tf-idf vector' 카테고리의 다른 글
KoNLPy, TF-IDF Vectorizor (0) | 2022.01.24 |
---|---|
Mecab Kor 사용법 (0) | 2022.01.24 |
기본 설치 및 테스트 (0) | 2019.04.25 |