*
* @throws Exception
*/
private static void geoparseUppercaseArticle() throws Exception {
// Instantiate a CLAVIN GeoParser using the StanfordExtractor with "caseless" models
GeoParser parser = GeoParserFactory.getDefault("./IndexDirectory", new StanfordExtractor("english.all.3class.caseless.distsim.crf.ser.gz", "english.all.3class.caseless.distsim.prop"), 1, 1, false);
// Unstructured uppercase text file about Somalia to be geoparsed
File inputFile = new File("src/test/resources/sample-docs/Somalia-doc-uppercase.txt");
// Grab the contents of the text file as a String
String inputString = TextUtils.fileToString(inputFile);
// Parse location names in the text into geographic entities
List<ResolvedLocation> resolvedLocations = parser.parse(inputString);
// Display the ResolvedLocations found for the location names
for (ResolvedLocation resolvedLocation : resolvedLocations)
System.out.println(resolvedLocation);
}