gazStore = new GazStoreTrie3();
} else {
throw new GateRuntimeException("Invalid backend number: "+backendNr);
}
BufferedReader defReader =
new BomStrippingInputStreamReader((configFileURL).openStream(), encoding);
String line;
//logger.info("Loading data");
while (null != (line = defReader.readLine())) {
String[] fields = line.split(":");
if(fields.length == 0) {
System.err.println("Empty line in file "+configFileURL);
} else {
String listFileName = "";
String majorType = "";
String minorType = "";
String languages = "";
String annotationType = ANNIEConstants.LOOKUP_ANNOTATION_TYPE;
listFileName = fields[0];
if(fields.length > 1) {
majorType = fields[1];
}
if(fields.length > 2) {
minorType = fields[2];
}
if(fields.length > 3) {
languages = fields[3];
}
if(fields.length > 4) {
annotationType = fields[4];
}
if(fields.length > 5) {
defReader.close();
throw new GateRuntimeException("Line has more that 5 fields in def file "+configFileURL);
}
logger.debug("Reading from "+listFileName+", "+majorType+"/"+minorType+"/"+languages+"/"+annotationType);
//logger.info("DEBUG: loading data from "+listFileName);
loadListFile(listFileName,majorType,minorType,languages,annotationType);
}
} //while
defReader.close();
gazStore.compact();
logger.info("Gazetteer loaded from list files");
if(backendNr == 3 && useCache) {
gazStore.save(gazbinFile);