I'm getting an UnsupportedOperationException from the Pronominal Coreferencer.
The pipeline I'm using is:
1) Document Reset PR
2) ANNIE English Tokeniser
3) ANNIE Sentence Splitter
4) ANNIE POS Tagger
5) ANNIE Gazetteer
6) ANNIE OrthoMatcher
7) ANNIE VP Chunker
8) ANNIE Nominal Coreferencer
9) ANNIE Pronominal Coreferencer
When I run it I get this exception:
java.lang.UnsupportedOperationException
at gate.annotation.ImmutableAnnotationSetImpl.clear(ImmutableAnnotationSetImpl.java:69)
at gate.creole.coref.PronominalCoref.preprocess(PronominalCoref.java:673)
at gate.creole.coref.PronominalCoref.execute(PronominalCoref.java:203)
at gate.creole.coref.Coreferencer.execute(Coreferencer.java:107)
at gate.creole.SerialController.runComponent(SerialController.java:177)
at gate.creole.SerialController.execute(SerialController.java:136)
at gate.creole.SerialAnalyserController.execute(SerialAnalyserController.java:67)
at gate.gui.SerialControllerEditor$RunAction$1.run(SerialControllerEditor.java:1230)
at java.lang.Thread.run(Thread.java:595)
I noticed that the get() methods in AnnotationSetImpl.java have recently been updated to return ImmutableAnnotationSets (rev: 7788), which is probably why this hasn't turned up before.
I've included a possible fix.
Diff aganist gate.creole.coref
Logged In: YES
user_id=1157323
Originator: NO
You're exactly right - this bug must have been in there for years but it has only just come to light with the change to immutable annotation sets. The correct fix is to change anywhere where the code adds or removes annotations from a subset it obtained by a get() call to add/remove them from the underlying document annotation set directly instead. I'll make the necessary changes.
Logged In: YES
user_id=1157323
Originator: NO
This should now be fixed as of rev 7868. The process of fixing this turned up one or two other subtle bugs along the way, which I have also fixed.