Changing default values of ANNIE resources in GATE from Java code In GATE, default values for ANNIE are set during initialization, but sometimes based on requirements they have to be changed.
My Requirement : I want to extract English sentences without considering the &quot;nextline character&quot; but considering &quot;full stop&quot; which gives correct sentences. For that, I need to change the default value of transducerURL in SentenceSplitter in ANNIE.
This can be done in two ways:

Using ANNIE_with_defaults.gapp - changing initparams value in Sentencesplitter and accessing from java:
 Gate.setGateHome(new File(Configuration.GATE_HOME));                        
 Gate.init();
 // Load ANNIE with defaults from the plug-ins folder
 File pluginsHome = Gate.getPluginsHome();
 File anniePlugin = new File(pluginsHome, ANNIEConstants.PLUGIN_DIR);
 File annieGapp = new File(anniePlugin, ANNIEConstants.DEFAULT_FILE);
 annieController = (CorpusController) PersistenceManager.loadObjectFromFile(annieGapp);



I am not being able to find where to change its value in gapp file.

After initialising GATE, accessing ResourceData using CreoleRegister and changing the default value of parameter transducerURL as shown below:
 String resourceClassName = &quot;gate.creole.splitter.SentenceSplitter&quot;;
 ResourceData resData = Gate.getCreoleRegister().get(resourceClassName);
 //System.out.println(resData.getParameterList());
 ParameterList params = resData.getParameterList();
 List&lt;List&lt;Parameter&gt;&gt; param =  params.getInitimeParameters();
 System.out.println(param);
 //System.out.println(param.get(0));
 for(List&lt;Parameter&gt; plist : param)
 {
     for(Parameter pm : plist)
     {
         System.out.println(&quot;Name : &quot;+pm.getName()+&quot;, &quot;+pm.getDefaultValue());
     }
 }



But Parameter does not have setDefaultvalue method.
How can I fix this?
For any of these situations the best approach is to construct the application as you need it using GATE Developer, "save application state" to create your own custom gapp file, then pass your new gapp to the PersistenceManager instead of loading the standard ANNIE_with_defaults.