首页 > 解决方案 > Java 库:Gate Creole ResourceInstantiationException

问题描述

我正在使用GATE库并收到错误消息

gate.creole.ResourceInstantiationException: Couldn't get resource data for com.jpetrak.gate.stringannotation.extendedgazetteer2.ExtendedGazetteer2.

You may need first to load the plugin that contains your resource.
For example, to create a gate.creole.tokeniser.DefaultTokeniser
you need first to load the ANNIE plugin.

Go to the menu File->Manage CREOLE plugins or use the method
Gate.getCreoleRegister().registerDirectories(pluginDirectoryURL).

我已初始化我的插件文件夹,并且还添加了以下行

Gate.getCreoleRegister().registerDirectories(new URL("file:///home/latest/plugins/ANNIE"));

并且文件夹 ANNIE 包含文件 cerole.xml

如这里所说

为什么我仍然收到错误?

谢谢

标签: javagatecreole

解决方案


You have to register any plugin you are using.

The class

com.jpetrak.gate.stringannotation.extendedgazetteer2.ExtendedGazetteer2

is a GATE processing resource from a very old version of gateplugin-stringannotation .

So except ANNIE, you have to register the directory of this plugin as well.


推荐阅读