10000 jsonrpc · junaraki/stanford-corenlp-python@a1a2412 · GitHub
[go: up one dir, main page]

Skip to content

Commit a1a2412

Browse files
committed
jsonrpc
1 parent f3e1212 commit a1a2412

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ tar xvfz WNprolog-3.0.tar.gz
8282

8383
## Questions
8484

85-
If you think there may be a problem with this wrapper, first ensure you can run the Java program:
85+
**Stanford CoreNLP tools require a large amount of free memory**. Java 5+ uses about 50% more RAM on 64-bit machines than 32-bit machines. 32-bit machine users can lower the memory requirements by changing `-Xmx3g` to `-Xmx2g` or even less.
86+
If pexpect timesout while loading models, check to make sure you have enough memory and can run the server alone without your kernel killing the java process:
8687

8788
java -cp stanford-corenlp-2010-11-12.jar:stanford-corenlp-models-2010-11-06.jar:xom-1.2.6.jar:xom.jar:jgraph.jar:jgrapht.jar -Xmx3g edu.stanford.nlp.pipeline.StanfordCoreNLP -props default.properties
8889

89-
Then, send me (Dustin Smith) a message on GitHub or through email (contact information is available [on my webpage](http://web.media.mit.edu/~dustin).
90+
You can reach me, Dustin Smith, by sending a message on GitHub or through email (contact information is available [on my webpage](http://web.media.mit.edu/~dustin).
9091

9192
# TODO
9293

jsonrpc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,6 @@ def loads_request( self, string ):
384384
if not isinstance(data["params"], (list, tuple)):
385385
raise RPCInvalidRPC("""Invalid Request, "params" must be an array.""")
386386
if len(data) != 3: raise RPCInvalidRPC("""Invalid Request, additional fields found.""")
387-
388387
# notification / request
389388
if data["id"] is None:
390389
return data["method"], data["params"] #notification
@@ -901,7 +900,6 @@ def __req( self, methodname, args=None, kwargs=None, id=0 ):
901900
req_str = self.__data_serializer.dumps_request( methodname, args, id )
902901
else:
903902
req_str = self.__data_serializer.dumps_request( methodname, kwargs, id )
904-
905903
try:
906904
resp_str = self.__transport.sendrecv( req_str )
907905
except Exception,err:

0 commit comments

Comments
 (0)
0