I'm trying to load the pronomial coreference module using ANNIE (in Java) but I'm having some issues with the following code:
FeatureMap params = Factory.newFeatureMap();
params.put("resolveIt", "true");
ProcessingResource coref = (ProcessingResource) Factory.createResource("gate.creole.coref.Coreferencer", params);
Collection<ProcessingResource> processingResources = new ArrayList<ProcessingResource>();
processingResources.add(coref);
pipelineController.setPRs(processingResources);
params.clear();
params.put("sourceUrl", url); # this is the url of a test document
params.put("collectRepositioningInfo", new Boolean(true));
Document doc = (Document) Factory.createResource("gate.corpora.DocumentImpl", params);
corpus.add(doc);
pipelineController.setCorpus(corpus);
pipelineController.execute();
After executing the pipelineController, I try to access the "MatchesAnnots" feature, or any other features, but I get an error saying Coref Warning: No annotations found for processing!. Can anyone point me in the direction of my error? Should I not be using pipelineController.setPRs()?