GATE SUMMA configuration

2019-08-02 03:15发布

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

2条回答
虎瘦雄心在
2楼-- · 2019-08-02 03:53

Adding to what @dedek said. The actual code is

 URL ANNIEcreoleURL = new URL("resources/plugins/ANNIE");
 Gate.getCreoleRegister().registerDirectories(ANNIEcreoleURL);
查看更多
狗以群分
3楼-- · 2019-08-02 03:57

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

查看更多
登录 后发表回答