Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 47e1f12

Browse files
Merge pull request #25 from mgrenander/master
Added maximum character length functionality
2 parents 626009d + 687f259 commit 47e1f12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎corenlp/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,21 @@ def __init__(self, start_server=True,
136136
stderr=sys.stderr,
137137
memory="4G",
138138
be_quiet=True,
139+
max_char_length=100000
139140
):
140141

141142
if start_server:
142143
host, port = urlparse(endpoint).netloc.split(":")
143144
assert host == "localhost", "If starting a server, endpoint must be localhost"
144145

145146
assert os.getenv("CORENLP_HOME") is not None, "Please define $CORENLP_HOME where your CoreNLP Java checkout is"
146-
start_cmd = "java -Xmx{memory} -cp '{corenlp_home}/*' edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port {port} -timeout {timeout} -threads {threads}".format(
147+
start_cmd = "java -Xmx{memory} -cp '{corenlp_home}/*' edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port {port} -timeout {timeout} -threads {threads} -maxCharLength {max_char_length}".format(
147148
corenlp_home=os.getenv("CORENLP_HOME"),
148149
port=port,
149150
memory=memory,
150151
timeout=timeout,
151-
threads=threads)
152+
threads=threads,
153+
max_char_length=max_char_length)
152154
stop_cmd = None
153155
else:
154156
start_cmd = stop_cmd = None

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /