diff --git a/src/main/java/org/mediameter/cliff/ParseManager.java b/src/main/java/org/mediameter/cliff/ParseManager.java index d160735..8f25426 100644 --- a/src/main/java/org/mediameter/cliff/ParseManager.java +++ b/src/main/java/org/mediameter/cliff/ParseManager.java @@ -326,10 +326,11 @@ public static EntityParser getParserInstance() throws Exception{ boolean useFuzzyMatching = false; File gazetteerDir = new File(PATH_TO_GEONAMES_INDEX); - if( !(gazetteerDir.exists() && gazetteerDir.isDirectory() ) ){ + if( !gazetteerDir.exists() || !gazetteerDir.isDirectory() ){ logger.error("Missing gazetter! Download and build a CLAVIN IndexDirectory at "+PATH_TO_GEONAMES_INDEX); + } else { + logger.info("Loading CLAVIN Gazetteer from "+PATH_TO_GEONAMES_INDEX); } - logger.info("Loading CLAVIN Gazetteer from "+PATH_TO_GEONAMES_INDEX); Gazetteer gazetteer = new LuceneGazetteer(new File(PATH_TO_GEONAMES_INDEX)); resolver = new CliffLocationResolver(gazetteer);