Closed
Description
CoreNLP version 4.5.0 using pos lemma depparse
. I run the pipeline within Spark (Scala). I lazy initialise the CoreNLP pipeline and I broadcast the pipeline to each executor using lazy instantiation wrapped in a case object. Also I force not to split the text fragment as it is intended to be a sentence already. The objective here is to do dependency analysis on the sentence and run some semgraph
rules against it. We got a case where it throws an exception like this
Caused by: edu.stanford.nlp.semgraph.UnknownVertexException: Operation attempted on unknown vertex happens/VBZ'''' in graph -> observed/VBD (root)
-> 24/CD (nsubj)
-> response/NN (nmod:in)
-> In/IN (case)
-> CoV/NNP (nmod:to)
-> to/IN (case)
-> SARS/NNP (compound)
-> ‐/SYM (dep)
-> ‐/SYM (dep)
-> peptides/NNS (dep)
-> 2/CD (nummod)
-> ,/, (punct)
-> we/PRP (nsubj)
-> unexpectedly/RB (advmod)
-> associated/VBN (ccomp)
-> that/IN (mark)
-> sirolimus/NN (nsubj:pass)
-> was/VBD (aux:pass)
-> significantly/RB (advmod)
-> release/NN (obl:with)
-> with/IN (case)
-> a/DT (det)
-> proinflammatory/JJ (amod)
-> cytokine/NN (compound)
-> levels/NNS (nmod:including)
-> including/VBG (case)
-> higher/JJR (amod)
-> α/NN (nmod:of)
-> of/IN (case)
-> TNF/NN (compound)
-> ‐/SYM (dep)
-> IL/NN (conj:and)
-> and/CC (cc)
-> IL/NN (nmod:of)
-> 1β/NN (nmod)
-> ‐/SYM (dep)
-> ./. (punct)
at edu.stanford.nlp.semgraph.SemanticGraph.parentPairs(SemanticGraph.java:730)
at edu.stanford.nlp.semgraph.semgrex.GraphRelation$DEPENDENT$1.advance(GraphRelation.java:325)
at edu.stanford.nlp.semgraph.semgrex.GraphRelation$SearchNodeIterator.initialize(GraphRelation.java:1103)
at edu.stanford.nlp.semgraph.semgrex.GraphRelation$SearchNodeIterator.<init>(GraphRelation.java:1084)
at edu.stanford.nlp.semgraph.semgrex.GraphRelation$DEPENDENT$1.<init>(GraphRelation.java:310)
at edu.stanford.nlp.semgraph.semgrex.GraphRelation$DEPENDENT.searchNodeIterator(GraphRelation.java:310)
at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.resetChildIter(NodePattern.java:339)
at edu.stanford.nlp.semgraph.semgrex.SemgrexMatcher.resetChildIter(SemgrexMatcher.java:80)
at edu.stanford.nlp.semgraph.semgrex.CoordinationPattern$CoordinationMatcher.resetChildIter(CoordinationPattern.java:168)
at edu.stanford.nlp.semgraph.semgrex.CoordinationPattern$CoordinationMatcher.resetChildIter(CoordinationPattern.java:168)
at edu.stanford.nlp.semgraph.semgrex.CoordinationPattern$CoordinationMatcher.resetChildIter(CoordinationPattern.java:168)
at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.resetChild(NodePattern.java:363)
at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.goToNextNodeMatch(NodePattern.java:457)
at edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher.matches(NodePattern.java:574)
at edu.stanford.nlp.semgraph.semgrex.SemgrexMatcher.find(SemgrexMatcher.java:193)
at az.bikg.nlp.etl.common.nlp.Pattern.go$3(Pattern.scala:200)
at az.bikg.nlp.etl.common.nlp.Pattern.$anonfun$findCauseEffectMatches$6(Pattern.scala:268)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:293)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:293)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:290)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
at az.bikg.nlp.etl.common.nlp.Pattern.findCauseEffectMatches(Pattern.scala:266)
at az.bikg.nlp.etl.steps.ERs$.findRelations(ERs.scala:107)
at az.bikg.nlp.etl.steps.ERs$.findRelationsSpark(ERs.scala:229)
at az.bikg.nlp.etl.steps.ERs$.$anonfun$extractERs$1(ERs.scala:242)
... 28 more
Am I doing anything wrong because of this exception? It didn't happen with version 4.4.0
.
Metadata
Metadata
Assignees
Labels
No labels