gpt4 book ai didi

java - 门总和配置

转载 作者:行者123 更新时间:2023-11-30 02:39:07 25 4
gpt4 key购买 nike

我正在尝试使用 java.lang 中的 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

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

完整的类文件如Gist所示()

最佳答案

Do I need to have an xml file created for that?

是的,

Gate.getCreoleRegister().addDirectory(URL)

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

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

我不知道 SUMMA,但我猜它在某个地方也有这样的目录......

<小时/>

但是

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

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

关于java - 门总和配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42293091/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com