Code Monkey home page Code Monkey logo

Comments (2)

hexists avatar hexists commented on August 22, 2024

open-korean-text 빌드를 통한 사전 추가

히스토리

가이드를 보고 사용자 사전 추가하기, guide

  1. 개발 환경 설치: IntelliJ 설치 후 Scala Plugin을 설치합니다.

  2. repo clone: okt repo를 clone하고, IntelliJ에서 pom.xml 파일을 열어줍니다.

  3. noun의 적절한 파일에 사용자사전을 추가합니다.

- 가이드에 있는 wikipedia_title_nouns.txt에 "노잼노씨", "문자어"를 추가했습니다.
- src/main/resources/org/openkoreantext/processor/util/noun/wikipedia_title_nouns.txt
  1. src/main/scala/org/openkoreantext/processor/tools/DeduplicateAndSortDictionaries.scala 를 실행해서 사전을 정리합니다.

  2. 테스트를 실행해서 원하는대로 token이 나눠지는지 확인합니다.

- examples/src/main/scala/ScalaOpenKoreanTextExample.scala
- 위 파일을 누르고, run 버튼을 누릅니다.
  1. 터미널로 이동해서, mvn compile을 하고 문제가 없는 경우 mvn package로 패키징합니다.
$ mvn compile
$ mvn package
  1. konlpy는 소스를 받아 사용합니다.
git clone [email protected]:konlpy/konlpy.git
  1. target 디렉토리에 생성된 jar 파일을 konlpy로 복사하고, 기존에 있던 okt.jar 파일의 이름으로 symbolic link를 설정합니다. 기존 okt.jar 파일은 이름을 바꿔 따로 저장해놓습니다.
$ cp /path/to/open-korean-text/target/open-korean-text-2.3.2-SNAPSHOT.jar /path/to/konlpy/java/

$ cd /path/to/konlpy/java/
$ mv open-korean-text-2.1.0.jar open-korean-text-2.1.0.jar.org
$ ln -sf open-korean-text-2.3.2-SNAPSHOT.jar open-korean-text-2.1.0.jar
  1. 테스트합니다.
$ ./test_okt.py
Okt 명사 추출 Results
 ['노잼노씨', '잼', '신조어', '등', '문자어', '등록']

from test_konlpy.

hexists avatar hexists commented on August 22, 2024

참고 링크

from test_konlpy.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.