GATE SUMMA configuration

牧云@^-^@ 提交于 2019-12-13 17:23:59

问题


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

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

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

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


回答1:


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

Yes,

Gate.getCreoleRegister().addDirectory(URL)

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

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

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


But

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

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 by CreoleRegister.registerDirectories(URL) method in the current GATE (ver. 8.x series).




回答2:


Adding to what @dedek said. The actual code is

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


来源:https://stackoverflow.com/questions/42293091/gate-summa-configuration

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!