"View requires a FeatureNode" exception in certain circumstances

Bug #499365 reported by Jim White
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RelEx
Fix Released
High
linas

Bug Description

I'm using GATE and if I use this command line:
     <arg line="-n 4 -g --g-post -l -t -f -s"/>
     <arg value="Mr. Peter Haliday, the district police commander for the area surrounding the Whitehead Detention Centre, Hong Kongs largest camp for boat people, said the victims were attacked in their sleep by 10 men."/>

I get this failure:

     [java] java.lang.RuntimeException: View requires a FeatureNode
     [java] at relex.feature.LinkableView.throwIfNoFN(LinkableView.java:100)
     [java] at relex.feature.LinkableView.getEndChar(LinkableView.java:396)
     [java] at relex.entity.EntityTagger.tagParse(EntityTagger.java:99)
     [java] at relex.MyRelationExtractor.processSentence(MyRelationExtractor.java:252)
     [java] at relex.MyRelationExtractor.main(MyRelationExtractor.java:617)

That is occurring on the "10" at index 198, which ANNIE is tagging as a DATE.

But that isn't the real cause of the exception, because a shorter sentence or only asking for a single parse does not fail (although the "10" is still being tagged as a DATE, which looks like a bug too to me but with ANNIE I guess).

So changing "-n 4" to "-n 1" lets it pass.

The real problem may be the preceding entity ("Whitehead Detention Center"), because this also works (albeit still tagging "10" as a DATE):

       <arg line="-n 4 -g --g-post -l -t -f -s"/>
       <arg value="Mr. Peter Haliday, the district police commander for the surrounding area, said the victims were attacked in their sleep by 10 men."/>

No fix from me at this point. I can proceed for a while with "-n 1".

Revision history for this message
Jim White (james-paul-white) wrote :

Ahh, no. Setting "-n 1" doesn't prevent the failure (just makes it harder to see in the output).

But it does have something to do with "Whitehead Detention Centre". These fail:

"The Whitehead Detention Centre was established in 1973."
"The Whitehead Detention Center was established in 1973."
"The Whitehead Detention Center, established in 1973, is headed by director Samuel Warehouse."
"The Whitehead Detention Center, is headed by director Samuel Warehouse."
"The Whitehead Detention Center is headed by director Samuel Warehouse."

These are OK:

"The Detention Center was established in 1973."
"The Whitehead Center is headed by director Samuel Warehouse."
"The Whitehead Center was established in 1973."

So it seems to have something to do with three word entities.

Revision history for this message
Jim White (james-paul-white) wrote :

A few more data points before I delve back into the code:

OK:

"The Circus Circus Center is located north of Central Park."
"The Rockefeller Central Park was established in 1973."
"The Rockefeller Center was established in 1973."
"The Whitehouse Automobile Center is 100 years old."
"The Whitehouse Automobile Center is a big place."
"The Whitehead Detention Centre is 100 years old."
"The Whitehead Detention Centre is 10 years old."
"The Whitehead Detention Centre is staffed by 10 people."

FAIL:

"The Circus Circus Center was established in 1973."
"The Whitehouse Automobile Center was established in 1973."
"The Whitehouse Automobile Center is located in Missoula, MO."
"The Whitehead Detention Centre is staffed by 10 men."

Revision history for this message
Jim White (james-paul-white) wrote :

Another patch in the dark. Don't have time to really grok the whole entity tagging code, so I don't know whether I've found a simple oversight or if this behavior indicates a more serious problem. Anyhow here's what I'm using to carry on parsing...

Revision history for this message
linas (linasvepstas) wrote :

Simple oversight. The entity-detector code was recently refactored (to introduce the post-parse entity tagging), and was not tested. I almost never use entity tagging for the stuff that I do, and relex doesn't have a unit-test infrastructure to avoid these kinds of bugs.

Thanks for the patch, that was the correct patch to apply.

I've applied it and pushed the code tot trunk.

Changed in relex:
status: New → Fix Committed
importance: Undecided → Medium
importance: Medium → High
assignee: nobody → linas (linasvepstas)
linas (linasvepstas)
Changed in relex:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.