@@ -136,19 +136,21 @@ def __init__(self, start_server=True,
136
136
stderr = sys .stderr ,
137
137
memory = "4G" ,
138
138
be_quiet = True ,
139
+ max_char_length = 100000
139
140
):
140
141
141
142
if start_server :
142
143
host , port = urlparse (endpoint ).netloc .split (":" )
143
144
assert host == "localhost" , "If starting a server, endpoint must be localhost"
144
145
145
146
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 (
147
148
corenlp_home = os .getenv ("CORENLP_HOME" ),
148
149
port = port ,
149
150
memory = memory ,
150
151
timeout = timeout ,
151
- threads = threads )
152
+ threads = threads ,
153
+ max_char_length = max_char_length )
152
154
stop_cmd = None
153
155
else :
154
156
start_cmd = stop_cmd = None
0 commit comments