Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread를 지원하는 analyze() 메소드 추가 #4

Open
9bow opened this issue Mar 20, 2019 · 3 comments
Open

Thread를 지원하는 analyze() 메소드 추가 #4

9bow opened this issue Mar 20, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@9bow
Copy link
Member

9bow commented Mar 20, 2019

기능 설명

Komoran.analyze(List<String>, int) 메소드를 지원하도록 합니다.

추가 정보

없음

@gamamoe
Copy link
Member

gamamoe commented Mar 20, 2019

Java method를 wrapping하는 것이 아니라 Python 자체 기능으로 구현해도 괜찮을 것 같음

@9bow
Copy link
Member Author

9bow commented Mar 20, 2019

3가지 옵션이 있을 수 있을 것 같습니다.

  1. Java 메소드를 KOMORANEntryPoint에서 wrapping한 후 Python-side에서 호출
    ; 현재 진행하려는 방법입니다. 현재 버전에서 가장 쉽게(?) 구현이 가능합니다. 실제로 JVM 위에서 잘 돌아가는지는 찾아봐야 할 것 같습니다.
  2. Java 메소드를 따로 wrapping하지 않고, Python-side에서 멀티 쓰레드 -> 각각 호출
    ; 현재 JVM을 하나만 띄우는 것으로 하였기 때문에 가장 수정이 많이 필요할 것 같습니다. 또한, Heap 크기에 따라 잡아먹는 메모리의 양도 많이 달라질 것 같습니다;
  3. 2와 같은 구조이나, JVM을 Python-side에서 띄우지 않음
    ; 2보다는 현실성 있어보이는 방법인데요, Py4J에서 제공하는 기본 방법(?)처럼 gateway server를 띄우고 Python-side에서 붙는 방법입니다. 다만 사용자가 별도로 Java를 띄워야 하는 불편함이 있습니다.

우선은 1번으로 진행하여 성능을 측정해보고, 추후 필요 시 2 또는 3을 고려해보도록 하겠습니다.

@9bow
Copy link
Member Author

9bow commented Mar 21, 2019

  • KOMORAN 3.4.0 Release 후 해당 Jar를 반영합니다.
  • EntryPoint 내에 analyze(List<String>, int)를 호출하는 메서드를 추가하고 Python-side에 반영합니다.

@9bow 9bow added the enhancement New feature or request label Mar 30, 2019
@9bow 9bow added this to the 3.4.0 milestone Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants