I am trying to create an annotation type called 'CasualtiesRelationNary'. This is meant to capture relations of the form:
CARDINAL people-died-of DISEASE at-location LOC and-at-time (DATE|TIME)
I have defined an annotation by that name in my UIMA type descriptor file, which has the following attributes, all of which are Annotations
- location: Annotation that identifies the location of the deatns
- numDeaths: Annotation that provides the number of deaths
- time: Annotation that provides the time of the deaths
- disease: Annotation that provides the location where the deaths took place
I have written a pipeline that is able to tag sentences that define such relations. The pipeline is able to write the results to Brat files.
But when I try to read the Brat files, I get the following exception:
Type [ca.nrc.t2rels.freetext.annotations.CasualtiesRelationNary] has no feature called [value]
Attached is a Maven project that illustrates the problem. You will get the above exception if you run the 'ReadFileWithCasualtiesRelation' app, passing it the full path of the src/main/resources/testfiles/west-nile.txt file.
The file was produced by the casualties annotation pipeline.
Note that the app uses a class BratUtils. This is a help class I wrote to circumvent various brittleness problems with the BratReader and BratWriter classes. I think a lot of those solutions could be wrapped into BratReader and BratWriter, but that is a different conversation that I will start in a different post some time.