ClavinLocationResolver@Deprecated public class LuceneLocationResolver extends Object implements LocationResolver
LocationExtractor and resolves them into the appropriate
geographic entities (as intended by the document's author based on
context) by finding the best match in a gazetteer.| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
logger
Deprecated.
|
| Constructor and Description |
|---|
LuceneLocationResolver(File indexDir,
int maxHitDepth,
int maxContextWindow)
Deprecated.
2.0.0 Use
ClavinLocationResolver |
@Deprecated public LuceneLocationResolver(File indexDir, int maxHitDepth, int maxContextWindow) throws IOException, org.apache.lucene.queryparser.classic.ParseException
ClavinLocationResolverLuceneLocationResolver by loading a pre-built Lucene
index from disk and setting configuration parameters for
resolving location names to GeoName objects.indexDir - Lucene index directory to be loadedmaxHitDepth - number of candidate matches to considermaxContextWindow - how much context to consider when resolvingIOExceptionorg.apache.lucene.queryparser.classic.ParseException@Deprecated public List<ResolvedLocation> resolveLocations(List<LocationOccurrence> locations, boolean fuzzy) throws IOException, org.apache.lucene.queryparser.classic.ParseException
ClavinLocationResolver.resolveLocations(java.util.List, boolean) or
ClavinLocationResolver.resolveLocations(java.util.List, int, int, boolean)ResolvedLocations containing GeoName objects.
Calls Gazetteer.getClosestLocations(com.bericotech.clavin.gazetteer.query.GazetteerQuery) on
each location name to find all possible matches, then uses
heuristics to select the best match for each by calling
ClavinLocationResolver.pickBestCandidates(java.util.List<java.util.List<com.bericotech.clavin.resolver.ResolvedLocation>>).resolveLocations in interface LocationResolverlocations - list of location names to be resolvedfuzzy - switch for turning on/off fuzzy matchingResolvedLocation objectsorg.apache.lucene.queryparser.classic.ParseExceptionIOExceptionCopyright © 2012–2014 Berico Technologies. All rights reserved.