Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inifinite recursion issue ... :( #1348

Open
alanlit opened this issue Mar 13, 2023 · 3 comments
Open

Inifinite recursion issue ... :( #1348

alanlit opened this issue Mar 13, 2023 · 3 comments

Comments

@alanlit
Copy link

alanlit commented Mar 13, 2023

Running 4.5.2 and the default English model 4.5.2. Every so often I get the following stack-blowing recursion:
at edu.stanford.nlp.parser.lexparser.TreeBinarizer.outsideBinarizeLocalTree(TreeBinarizer.java:479)
at edu.stanford.nlp.parser.lexparser.TreeBinarizer.outsideBinarizeLocalTree(TreeBinarizer.java:479)
at edu.stanford.nlp.parser.lexparser.TreeBinarizer.outsideBinarizeLocalTree(TreeBinarizer.java:479)
at edu.stanford.nlp.parser.lexparser.TreeBinarizer.outsideBinarizeLocalTree(TreeBinarizer.java:479)
at edu.stanford.nlp.parser.lexparser.TreeBinarizer.outsideBinarizeLocalTree(TreeBinarizer.java:479) ......

On either an NER pipe:
props.setProperty("annotators", "tokenize,ssplit,pos,lemma,ner")
props.setProperty("ner.statisticalOnly", "true")
props.setProperty("parse.model", "edu/stanford/nlp/models/srparser/englishSR.ser.gz")
Or a sentiment pipe:
props.setProperty("parse.model", "edu/stanford/nlp/models/srparser/englishSR.ser.gz")
props.setProperty("annotators", "tokenize,ssplit,pos,parse,sentiment")

Sorry I don't know which yet (or have a sample of the text that seems to trigger it .. working on it).

Using openjdk 17.0.2.

Any thoughts as to what might be going on ?

Tnx
Alan

@AngledLuffa
Copy link
Contributor

AngledLuffa commented Mar 14, 2023 via email

@alanlit
Copy link
Author

alanlit commented Mar 16, 2023

Quite understand - the problem is it can run for a day or so before blowing -- I'm still trying to isolate a test case, but in the meantime it decided to stack overflow via a different route. No idea if this gives you a clue or not:
ava.lang.StackOverflowError
at org.ejml.simple.AutomaticSimpleMatrixConvert.specify(AutomaticSimpleMatrixConvert.java:46)
at org.ejml.simple.SimpleBase.insertIntoThis(SimpleBase.java:960)
at edu.stanford.nlp.neural.NeuralUtils.concatenateWithBias(NeuralUtils.java:282)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:543)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:511)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
at edu.stanford.nlp.sentiment.SentimentCostAndGradient.forwardPropagateTree(SentimentCostAndGradient.java:512)
..... and so on .. :)
Tnx
Alan

@AngledLuffa
Copy link
Contributor

It certainly looks like an issue with a very deep parse tree, either because the parse was degenerate or because the text was very long and led to a huge parse tree. Are you giving it any text that is unrealistically long?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants