Pull requests

#3 Merged
Machielo Machielo
torotoki torotoki

Added server recovery

  1. Machielo avatarMachielo

Also exposes raw_parse in the jsonrpc interface.

When imported as a module it will raise exceptions normally, but it will still respawn corenlp so it can be used continuously.

Comments (6)

  1. Hiroyoshi Komatsu repo owner

    This is good idea, but there is some issues... StanfordCoreNLP.raw_parse is also used as python package. If it called as python package and an error occurated, it is expected to raise a exception. Perhaps it will exposes only the parse function in the jsonrpc interface, and some people who want to use the code as python package will use the raw_parse function as well. So would you write handling error to the parse function?

  2. Machielo author


    Yeah I found that issue too, since if VERBOSE is False we don't wait for the timeouts. The problem is that the timeouts depends on which models we are loading. I "fixed" it by removing the timeout of 3 in corenlp.py line 365 so now it should load even if VERBOSE is False (although we don't know if it fails to load, this is not an ideal solution but works for now).

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.