-
Notifications
You must be signed in to change notification settings - Fork 331
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
Fix #199 #200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빠름! 👍
@@ -12,7 +12,7 @@ | |||
from konlpy import utils | |||
|
|||
|
|||
def init_jvm(jvmpath=None): | |||
def init_jvm(jvmpath=None, max_heap_size=1024): | |||
"""Initializes the Java virtual machine (JVM). | |||
|
|||
:param jvmpath: The path of the JVM. If left empty, inferred by :py:func:`jpype.getDefaultJVMPath`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:param max_heap_size:
이하에 간단한 설명 추가 부탁드립니다. (ex: Heap size를 언제 늘리면 좋은지, 너무 많이 늘리면 어떤 문제가 생기는지 등)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
init_jvm 및 jvm 을 이용하는 태거들의 param 에 설명을 추가하였습니다.
konlpy/tag/_hannanum.py
Outdated
@@ -60,6 +60,7 @@ class Hannanum(): | |||
[('웃', 'P'), ('으면', 'E'), ('더', 'M'), ('행복', 'N'), ('하', 'X'), ('ㅂ니다', 'E'), ('!', 'S')] | |||
|
|||
:param jvmpath: The path of the JVM passed to :py:func:`.init_jvm`. | |||
:param max_heap_size: The path of the JVM passed to :py:func:`.init_jvm`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops, seems like a ctrl+c/v error :)
(Same goes to the two files below)
konlpy/jvm.py
Outdated
"""Initializes the Java virtual machine (JVM). | ||
|
||
:param jvmpath: The path of the JVM. If left empty, inferred by :py:func:`jpype.getDefaultJVMPath`. | ||
:param max_heap_size: Maximum memory usage limitation (Megabyte). Default is 1024 (1Gb). If you set this value too small, you may got out of memory. We recommend that you set it 1024 ~ 2048 or more at least. However, if this value is too large, you may see inefficient memory usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is 1024 (1Gb)
-> Default is 1024 (1GB)
Gb
is normally the symbol for Gigabits.
LGTM! Let's ship this in 0.5.1. |
jvm 구동 시 최대 메모리 사용량 제약을 각 tagger 의 argument 로 넣어뒀습니다.