本文介绍了门SUMMA配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Java中的GATE SUMMA.我正在尝试运行本教程中包含的文件.我分别下载了ANNIE和SUMMA插件.我不明白的是这部分在配置中.

I am trying to use the GATE SUMMA from the java. I am trying to run the files included in the tutorial. I have downloaded both ANNIE and SUMMA plugins seperately. What I dont understand is this part in the configuration.

 Gate.init();
            // you have to register the plugins from GATE you want to use
             Gate.getCreoleRegister().addDirectory(new URL("file:///"+anniePluginDir));
            // you have to register the SUMMA plugin to have access to its resources
            Gate.getCreoleRegister().addDirectory(new URL("file:///"+summaPluginDir));
            // now create your controller

这是什么意思you have to register the plugins from GATE you want to use甚至提供了插件路径的抛出和错误

What does this mean you have to register the plugins from GATE you want to useEven providing an plugin path throws and error

The method addDirectory(URL) is undefined for the type CreoleRegister

我看到Creole是GATE框架下的一种配置管理.我需要为此创建一个xml文件吗?

I see that Creole is a type of configuration management under GATE framework. Do I need to have an xml file created for that?

完整的类文件显示在要点()

The full class file is as shown on the Gist ()

推荐答案

是,

Gate.getCreoleRegister().addDirectory(URL)

注册一个GATE插件目录,该目录必须包含creole.xml文件.

Registers a GATE plugin directory, which has to contain the creole.xml file.

ANNIE插件目录是常见GATE安装的一部分(请参见$GATE_HOME\plugins\ANNIE目录).

ANNIE plugin directory is a part of common GATE installation (see $GATE_HOME\plugins\ANNIE dir).

我不知道SUMMA,但是我想它在某处也有这样的目录...

I don't know about SUMMA, but I guess it also have such a directory somewhere...

但是

表示您的代码是为其他版本的GATE创建的.显然,您当前的GATE版本没有addDirectory(URL)方法.我认为它被取代了当前GATE(版本8.x系列)中的CreoleRegister.registerDirectories(URL)方法.

means that your code was created for a different version of GATE. Apparently, your current version of GATE doesn't have the addDirectory(URL) method. I think it was replaced byCreoleRegister.registerDirectories(URL) method in the current GATE (ver. 8.x series).

这篇关于门SUMMA配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-08 07:44