Gate Developer 和 Gate Embedded 在输出上的区别

Gate Developer and Gate Embedded difference in output

我使用 Gate Developer 开发了一个应用程序,它应用 paum 算法并在一个名为 "output" 的新注释集中显示结果,该注释集具有一个名为 "comment".[=14 的注释=]

然后,我在Gate Embedded 上导入了这个应用程序。 但是用Gate Embedded生成的"output"注解集没有任何注解!

编辑
我是这样处理的:

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();

然后我尝试检查 "output" 注释集是否包含某些内容:

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
}

语料库与我在Gate Developer中使用的相同。在 Gate developer 中,我有 "output" 注释集,但在 Gate Embedded 中没有。我想了解为什么会这样。

编辑
下面是我在 Gate Developer 中得到的截图。 应用 PR 后,创建了一个名为 "output" 的注释集,其中包含一个名为 "comment" 的注释。
但是在 Gate Embedded 中,我没有这个 "comment" 注释。

提前谢谢你,

在我看来你对注释 set 和注释 type - 注释 感到困惑sets 本身没有特征。如果您在 GATE Developer 注释集树中看到的是

那么你没有注释 set 称为 "output" 而是 type "output" 的注释在默认注释集中(没有名称)。要访问这些,您需要使用像

这样的代码
for(Document document:listDocument) {
    AnnotationSet annSet = document.getAnnotations().get("output");