I have developed an application using Gate
Developer, which apply paum algorithm and display the results in a new annotation set called "output" having an annotation called "comment".
Then, I imported this application on Gate Embedded. However, the "output" annotation set generated with Gate Embedded doesn't have any annotation!
EDIT
This is how I proceeded:
ArrayList<Tweet> listTweets = ...
ArrayList<Document> listDocument = new ArrayList<Document>();
//initialize Gate library
Gate.setGateHome(new File("E_Reputation/"));
Gate.setPluginsHome(new File("E_Reputation/plugins/"));
Gate.setUserConfigFile(new File("config/user-gate.xml"));
Gate.setSiteConfigFile(new File("config/site-gate.xml"));
Gate.init();
//load Gate application
CorpusController applicationGate = (CorpusController) PersistenceManager.loadObjectFromFile(new File("E_Reputation/application.xgapp"));
corpus = Factory.newCorpus("Tweets");corpus = Factory.newCorpus("Tweets");
//populate the corpus
for(i=0;i<listTweets.size();i++) {
//Document doc = Factory.newDocument(listTweets.get(i).getText());
FeatureMap params = Factory.newFeatureMap();
params.put(Document.DOCUMENT_STRING_CONTENT_PARAMETER_NAME,listTweets.get(i).getText());
Document doc = (Document) Factory.createResource("gate.corpora.DocumentImpl", params);
Long start=gate.Utils.start(doc);
Long end = gate.Utils.end(doc);
doc.getAnnotations("Key").add(start, end, " ", Factory.newFeatureMap());
listDocument.add(doc);
corpus.add(listDocument.get(i));
}
//execute Gate application
applicationGate.setCorpus(corpus);
applicationGate.execute();
I then tried to check if the "output" annotation set contains something:
for(Document document:listDocument) {
Set<String> allAnnSet = document.getAnnotationSetNames();
System.out.println(allAnnSet.contains("output")); // return true
AnnotationSet annSet = document.getAnnotations("output");
List<Annotation> listAnn = annSet.inDocumentOrder();
System.out.println(annSet.size()); // return 0
System.out.println(listAnn.size()); // return 0
}
The corpus is the same as the one I used in Gate Developer. In Gate developer, I had "output" annotation set with features but not in Gate Embedded. I want to understand why this is happening.
EDIT
Below is a screenshot of what I get in Gate Developer.
After applying the PR, an annotation set called "output" having an annotation called "comment" is created.
But in Gate Embedded, I don't have this "comment" annotation.
Thank you in advance,