dair-iitd / OpenIE-standalone

Other
565 stars 73 forks source link

Error on Sentence #26

Closed Zoher15 closed 4 years ago

Zoher15 commented 5 years ago

The below sentence throws an error:

Home Depot founder and CEO Bernie Marcus has endorsed Donald Trump for president.

What is wrong with it?

bhadramani commented 5 years ago

You may post error description.

chao276951044 commented 5 years ago

the error description as follow: Exception in thread "main" java.lang.NullPointerException at edu.iitd.cse.open_nre.onre.domain.OnrePatternNode.(OnrePatternNode.java:47) at edu.iitd.cse.open_nre.onre.helper.OnreHelper_graph.convertGraph2PatternTree_helper(OnreHelper_graph.java:98) at edu.iitd.cse.open_nre.onre.helper.OnreHelper_graph.convertGraph2PatternTree(OnreHelper_graph.java:51) at edu.iitd.cse.open_nre.onre.helper.MayIHelpYou.runMe(MayIHelpYou.java:32) at edu.knowitall.openie.OpenIE$$anonfun$extract$1.apply(OpenIE.scala:176) at edu.knowitall.openie.OpenIE$$anonfun$extract$1.apply(OpenIE.scala:166) 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 edu.knowitall.openie.OpenIE.extract(OpenIE.scala:166) at edu.knowitall.openie.OpenIE.extract(OpenIE.scala:61) at runner.RunMe.main(RunMe.java:35)

How to solve it?

lewismc commented 4 years ago

Using master branch I cannot replicate this behaviour

curl -X POST http://localhost:8000/getExtraction -d 'Home Depot founder and CEO Bernie Marcus has endorsed Donald Trump for president.'

Response...

[]

It does not throw NPE... this can be closed off.

vaibhavad commented 4 years ago

The issue was originating from incorrect parsing. This has been fixed in the latest release.