brendano / stanford_corenlp_pywrapper

151 stars 59 forks source link

"no roots in graph" runtimeexception #15

Closed brendano closed 9 years ago

brendano commented 9 years ago

I sometimes get this error from corenlp version 3.5.1, which of course crashes the socket server.

java.lang.RuntimeException: No roots in graph:
dep                 reln                gov                 
---                 ----                ---                 

Find where this graph was created and make sure you're adding roots.
    at edu.stanford.nlp.semgraph.SemanticGraph.getFirstRoot(SemanticGraph.java:773)
    at corenlp.Parse.jsonFriendlyDeps(Parse.java:181)
    at corenlp.Parse.addDepsCC(Parse.java:165)
    at corenlp.Parse.processTextDocument(Parse.java:275)
    at corenlp.PipeCommandRunner.runCommand(PipeCommandRunner.java:128)
    at corenlp.PipeCommandRunner.socketServerLoop(PipeCommandRunner.java:172)
    at corenlp.PipeCommandRunner.main(PipeCommandRunner.java:96)
brendano commented 9 years ago

workaround was checkedin