Class CoordinateAssociationRule
java.lang.Object
org.opensextant.extractors.geo.rules.GeocodeRule
org.opensextant.extractors.geo.rules.CoordinateAssociationRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final intThreshold for geohash prefix similaritystatic final intDefault threshold distance between a coordinate and a candidate locationstatic final intstatic final Stringstatic final intFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCoordinate(org.opensextant.data.Geocoding geo) voidaddCoordinates(List<org.opensextant.extraction.TextMatch> found) voidevaluate(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.booleanOverride if rule instance has another view of relevance, e.g.voidreset()no-op, unless overriden.voidsetCoordinates(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:GeocodeRuleno-op, unless overriden.- Overrides:
resetin classGeocodeRule
-
isRelevant
public boolean isRelevant()Description copied from class:GeocodeRuleOverride if rule instance has another view of relevance, e.g. coordinate rule: no coords found, so rule.isRelevant() is FALSE.- Overrides:
isRelevantin 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:
evaluatein classGeocodeRule- Parameters:
name- matched name in textgeo- gazetteer entry or location
-