Java 门总和配置

Java 门总和配置,java,plugins,gate,Java,Plugins,Gate,我正在尝试使用java中的GATE SUMMA。我正在尝试运行教程中包含的文件。我分别下载了ANNIE和SUMMA插件。我不明白的是配置中的这个部分 Gate.init(); // you have to register the plugins from GATE you want to use Gate.getCreoleRegister().addDirectory(new URL("file:///"+anniePluginDir));

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

 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
这意味着什么
您必须从GATE注册您想要使用的插件
即使提供插件路径也会引发错误

The method addDirectory(URL) is undefined for the type CreoleRegister
我看到克里奥尔是GATE框架下的一种配置管理。我需要为此创建一个xml文件吗

完整的类文件如()

我需要为此创建一个xml文件吗

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

ANNIE插件目录是common GATE安装的一部分(请参阅
$GATE\u HOME\plugins\ANNIE
dir)

我不知道SUMMA的情况,但我想它在某处也有这样一个目录


但是

类型CreoleRegister的方法addDirectory(URL)未定义

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

添加了@dededek所说的内容。实际代码是

 URL ANNIEcreoleURL = new URL("resources/plugins/ANNIE");
 Gate.getCreoleRegister().registerDirectories(ANNIEcreoleURL);

是的,您现在已经纠正了它的“我想它已经被当前GATE(8.x版系列)中的CreoleRegister.registerDirectories(URL)方法所取代”。
 URL ANNIEcreoleURL = new URL("resources/plugins/ANNIE");
 Gate.getCreoleRegister().registerDirectories(ANNIEcreoleURL);