I'm constructing an application in Google App Engine (using Eclipse) that uses WEKA [1] in one of its parts. This app needs to load ARFF bases, but that's allright. The directory in which these bases are is in project's root directory. Following lines are responsible for loading bases:
1. DataSource source;
2. source = new DataSource("bases/iris.arff");
3. Instances trainInstances = source.getDataSet();
4. trainInstances.setClassIndex(trainInstances.numAttributes() - 1);
Above lines are part of the code that is called in a servlet responsible for execution of the application. Servlet runs ok, but 'source' variable doesn't get to read arff file and, so, i get the following exception at line 3:
"java.io.IOException: No source has been specified at weka.core.converters.ArffLoader.getDataSet(ArffLoader.java:1003)"
According to [2],
It is possible to read from a file which is uploaded as part of your application provided that it is in the following locations: war/WEB-INF // in a location matching the pattern in appengine-web.xml (which by default includes everything)
I've followed this two points, but with no sucess. To the second one, my configuration was the following:
<resource-files>
<include path="/bases/**.arff" />
</resource-files>
Given this long history, I ask to you: Is there anyway to put "bases" directory in some place, or configuring something on GAE xml files, or on Eclipse, that make possible ARFF bases be loaded?
References
[1] www.cs.waikato.ac.nz/ml/weka/
[2] https://developers.google.com/appengine/kb/java#readfile