Closed rbart closed 11 years ago
This is a frame deserialization issue from the ClearNlp representation. Thanks for the example, I've needed to dig into this. I made a change in nlptools to improve the error message at least. I was using val Array(foo, bar) = something.split
. When it fails, the error is quite uninformative.
My guess is that there is a relation type that clear sometimes gives that's malformed or undocumented.
Not too big of a deal, since it only happened on 12 sentences out of 44367 in the test I ran.
There is also a very similar "requirement failed" exception error, example sentence:
I live (near Fort Gordon) healthy is far from how I would describe them, in other words some of them should consider laying off on the donuts but then again so should I :p lol
Here's the top of the stack trace, the rest is the same, I think
java.lang.IllegalArgumentException: requirement failed
at scala.Predef$.require(Predef.scala:221)
at edu.knowitall.tool.srl.Relation.<init>(Frame.scala:28)
at edu.knowitall.tool.srl.Relation$.fromString(Frame.scala:35)
Thanks for those numbers--they are helpful.
The requirement one I'm guessing is ClearNlp giving me something very weird. Here's line 28:
require(!(name matches """.*[:\[\]].*"""))
I'll improve the error message now (should always do this first time around ;-P)
On Wed, Jun 26, 2013 at 3:25 PM, Rob notifications@github.com wrote:
Not too big of a deal, since it only happened on 12 sentences out of 44367 in the test I ran.
There is also a very similar "requirement failed" exception error, example sentence:
I live (near Fort Gordon) healthy is far from how I would describe them, in other words some of them should consider laying off on the donuts but then again so should I :p lol
Here's the top of the stack trace, the rest is the same, I think java.lang.IllegalArgumentException: requirement failed at scala.Predef$.require(Predef.scala:221) at edu.knowitall.tool.srl.Relation.(Frame.scala:28) at edu.knowitall.tool.srl.Relation$.fromString(Frame.scala:35)
— Reply to this email directly or view it on GitHubhttps://github.com/knowitall/srlie/issues/3#issuecomment-20084701 .
Split issue into two: https://github.com/knowitall/srlie/issues/4
I think that saying.28
is being interpreted as a relation because it has the same format as an SRL relation.
Wikipedia is saying.28 au for Cc (the planet is question), several different online Kepler's 3rd calculators are giving me different numbers as well.
scala.MatchError: Could not create relation with node saying.28_VBN_2 from string: saying.0.01 (of class java.lang.String) at edu.knowitall.tool.srl.Relation$.fromString(Frame.scala:36) at edu.knowitall.tool.srl.ClearSrl$$anonfun$5$$anonfun$apply$4.apply(ClearSrl.scala:68) at edu.knowitall.tool.srl.ClearSrl$$anonfun$5$$anonfun$apply$4.apply(ClearSrl.scala:68) at scala.Option.map(Option.scala:145) at edu.knowitall.tool.srl.ClearSrl$$anonfun$5.apply(ClearSrl.scala:68) at edu.knowitall.tool.srl.ClearSrl$$anonfun$5.apply(ClearSrl.scala:66) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:251) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:251) at scala.collection.AbstractTraversable.flatMap(Traversable.scala:105) at edu.knowitall.tool.srl.ClearSrl.apply(ClearSrl.scala:66) at edu.knowitall.srlie.SrlExtractor.apply(SrlExtractor.scala:22) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9$$anonfun$apply$1$$anonfun$apply$mcV$sp$1.apply(SrlExtractor.scala:134) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9$$anonfun$apply$1$$anonfun$apply$mcV$sp$1.apply(SrlExtractor.scala:131) at scala.collection.Iterator$class.foreach(Iterator.scala:727) at scala.collection.AbstractIterator.foreach(Iterator.scala:1157) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9$$anonfun$apply$1.apply$mcV$sp(SrlExtractor.scala:131) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9$$anonfun$apply$1.apply(SrlExtractor.scala:131) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9$$anonfun$apply$1.apply(SrlExtractor.scala:131) at edu.knowitall.common.Timing$.time(Timing.scala:50) at edu.knowitall.common.Timing$.timeThen(Timing.scala:72) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9.apply(SrlExtractor.scala:188) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1$$anonfun$apply$9.apply(SrlExtractor.scala:129) at edu.knowitall.common.Resource$.using(Resource.scala:14) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1.apply(SrlExtractor.scala:129) at edu.knowitall.srlie.SrlExtractor$$anonfun$run$1.apply(SrlExtractor.scala:128) at edu.knowitall.common.Resource$.using(Resource.scala:14) at edu.knowitall.srlie.SrlExtractor$.run(SrlExtractor.scala:128) at edu.knowitall.srlie.SrlExtractor$delayedInit$body.apply(SrlExtractor.scala:111) at scala.Function0$class.apply$mcV$sp(Function0.scala:40) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App$$anonfun$main$1.apply(App.scala:71) at scala.App$$anonfun$main$1.apply(App.scala:71) at scala.collection.immutable.List.foreach(List.scala:318) at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:32) at scala.App$class.main(App.scala:71) at edu.knowitall.srlie.SrlExtractor$.main(SrlExtractor.scala:35) at edu.knowitall.srlie.SrlExtractor.main(SrlExtractor.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sbt.Run.invokeMain(Run.scala:68) at sbt.Run.run0(Run.scala:61) at sbt.Run.execute$1(Run.scala:50) at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:54) at sbt.TrapExit$.executeMain$1(TrapExit.scala:33) at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
Can be reproduced in nlpweb - example sentence:
Stack trace: