반응형

가상환경에  https://github.com/lovit/customized_konlpy  들어가서 내려받은 후에 잘 적용시켜야 한다. 

 

https://inspiringpeople.github.io/data%20analysis/ckonlpy/ 에서는 이미 가상환경을 잘 알고 있다는 가정하에 작성된거 같다.

 

1. 대상 폴더에 내려받고

2. python 가상환경 들어간 후에  "  activate main " 

   - 나는  main 이라는 가상환경을 따로 만들었다.

3. 내려받은 파일의  setup.py를 실행. 

4. python 실행 시킨후 예제 구문 실행해보면 되는 것을 확인 할 수 있다.

  - 2022-07-04 다시 확인해봤는데 잘 된다. 

 

한국어 자연어처리를 할 수 있는 파이썬 패키지, KoNLPy의 customized version입니다.

customized_KoNLPy는 확실히 알고 있는 단어들에 대해서는 라이브러리를 거치지 않고 주어진 어절을 아는 단어들로 토크나이징 / 품사판별을 하는 기능을 제공합니다. 이를 위해 template 기반 토크나이징을 수행합니다.

사전: {'아이오아이': 'Noun', '는': 'Josa'}
탬플릿: Noun + Josa

위와 같은 단어 리스트와 탬플릿이 있다면 '아이오아이는' 이라는 어절은 [('아이오아이', 'Noun'), ('는', 'Josa')]로 분리됩니다.

Install

$ git clone https://github.com/lovit/customized_konlpy.git

$ pip install customized_konlpy

Requires

  • JPype >= 0.6.1
  • KoNLPy >= 0.4.4

 

반응형
반응형

komorandocs.readthedocs.io/ko/latest/pykomoran/installation.html

 

PyKomoran 설치하기 — KOMORAN documentation

이 문서에서는 Python에서 KOMORAN을 사용하기 위해 PyKOMORAN을 설치하는 방법을 살펴보도록 하겠습니다. 주석 PyKOMORAN은 KOMORAN을 Python에서 사용할 수 있도록 하는 프로젝트입니다. 이는 KOMORAN을 Python

komorandocs.readthedocs.io

konlpy-ko.readthedocs.io/ko/latest/api/konlpy.tag/#okt-class

 

tag Package — KoNLPy 0.5.2 documentation

매개 변수: jvmpath -- The path of the JVM passed to init_jvm(). userdic -- The path to the user dictionary. This enables the user to enter custom tokens or phrases, that are mandatorily assigned to tagged as a particular POS. Each line of the dictionar

konlpy-ko.readthedocs.io

konlpy-ko.readthedocs.io/ko/latest/api/konlpy.tag/#module-konlpy.tag._komoran

 

tag Package — KoNLPy 0.5.2 documentation

매개 변수: jvmpath -- The path of the JVM passed to init_jvm(). userdic -- The path to the user dictionary. This enables the user to enter custom tokens or phrases, that are mandatorily assigned to tagged as a particular POS. Each line of the dictionar

konlpy-ko.readthedocs.io

> pip install PyKomoran

> python

>>> from PyKomoran import *
>>> komoran = Komoran(DEFAULT_MODEL['FULL'])
>>>
>>> from konlpy.tag import Okt
>>> okt = Okt()

>>> okt.nouns(u'오픈소스에 관심 많은 ')
['오픈소스', '관심']

>>> komoran.nouns(u'오픈소스에 관심 많은 ')
['오픈', '소스', '관심']
>>>

 

 

 

반응형

+ Recent posts