in geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/AdminBoundaryContextGenerator.java [88:106]
public AdminBoundaryContextGenerator(EntityLinkerProperties properties) throws IOException {
if (countrydata == null) {
String path = properties.getProperty("opennlp.geoentitylinker.countrycontext.filepath", "");
if (path == null || path.trim().isEmpty()) {
throw new IOException("missing country context data configuration. " +
"Property opennlp.geoentitylinker.countrycontext.filepath " +
"must have a valid path value in entitylinker properties file");
}
File countryContextFile = new File(path);
if (countryContextFile == null || !countryContextFile.exists()) {
throw new IOException("missing country context file");
}
//countrydata = getCountryContextFromFile(countryContextFile);
getContextFromFile(countryContextFile);
if (adminBoundaryData.isEmpty()) {
throw new IOException("missing country context data");
}
}
}