Class CoordinateAssociationRule
java.lang.Object
org.opensextant.extractors.geo.rules.GeocodeRule
org.opensextant.extractors.geo.rules.CoordinateAssociationRule
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final int
Threshold for geohash prefix similaritystatic final int
Default threshold distance between a coordinate and a candidate locationstatic final int
static final String
static final int
Fields inherited from class org.opensextant.extractors.geo.rules.GeocodeRule
AVG_WORD_LEN, boundaryObserver, coordObserver, countryObserver, defaultMethod, LEX1, LEX2, locationOnly, log, LOWERCASE, NAME, textCase, UPPERCASE, weight
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCoordinate
(org.opensextant.data.Geocoding geo) void
addCoordinates
(List<org.opensextant.extraction.TextMatch> found) void
evaluate
(PlaceCandidate name, org.opensextant.data.Place geo) If a particular geo is close to a candidate name/location, then add to the candidate's score for that location.boolean
Override if rule instance has another view of relevance, e.g.void
reset()
no-op, unless overriden.void
setCoordinates
(List<org.opensextant.data.Geocoding> geos) Methods inherited from class org.opensextant.extractors.geo.rules.GeocodeRule
evaluate, filterByNameOnly, filterOutByFrequency, internalPlaceID, isShort, logMsg, sameBoundary, sameCountry, sameCountry, sameLexicalName, setBoundaryObserver, setCountryObserver, setDefaultMethod, setGeohash, setLocationObserver, setTextCase, textCase
-
Field Details
-
DEFAULT_THRESHOLD_METERS
public static final int DEFAULT_THRESHOLD_METERSDefault threshold distance between a coordinate and a candidate location- See Also:
-
DEFAULT_THRESHOLD_DIGITS
public static final int DEFAULT_THRESHOLD_DIGITSThreshold for geohash prefix similarity- See Also:
-
GEOHASH
public static final int GEOHASH- See Also:
-
HAVERSINE
public static final int HAVERSINE- See Also:
-
COORD_PROXIMITY_RULE
- See Also:
-
GEOHASH_CONTAINS_RULE
- See Also:
-
-
Constructor Details
-
CoordinateAssociationRule
public CoordinateAssociationRule() -
CoordinateAssociationRule
public CoordinateAssociationRule(int distScheme)
-
-
Method Details
-
setCoordinates
-
addCoordinate
public void addCoordinate(org.opensextant.data.Geocoding geo) -
addCoordinates
-
reset
public void reset()Description copied from class:GeocodeRule
no-op, unless overriden.- Overrides:
reset
in classGeocodeRule
-
isRelevant
public boolean isRelevant()Description copied from class:GeocodeRule
Override if rule instance has another view of relevance, e.g. coordinate rule: no coords found, so rule.isRelevant() is FALSE.- Overrides:
isRelevant
in classGeocodeRule
- Returns:
-
evaluate
If a particular geo is close to a candidate name/location, then add to the candidate's score for that location.- Specified by:
evaluate
in classGeocodeRule
- Parameters:
name
- matched name in textgeo
- gazetteer entry or location
-