in geoentitylinker-addon/src/main/java/opennlp/addons/geoentitylinker/AdminBoundaryContextGenerator.java [90:107]
public AdminBoundaryContextGenerator(EntityLinkerProperties properties) throws IOException {
this.properties = properties;
if (countrydata == null) {
String path = this.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");
}
}
}