Class CoordinateAssociationRule

java.lang.Object
org.opensextant.extractors.geo.rules.GeocodeRule
org.opensextant.extractors.geo.rules.CoordinateAssociationRule

public class CoordinateAssociationRule extends GeocodeRule
  • Field Details

    • DEFAULT_THRESHOLD_METERS

      public static final int DEFAULT_THRESHOLD_METERS
      Default threshold distance between a coordinate and a candidate location
      See Also:
    • DEFAULT_THRESHOLD_DIGITS

      public static final int DEFAULT_THRESHOLD_DIGITS
      Threshold 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

      public static final String COORD_PROXIMITY_RULE
      See Also:
    • GEOHASH_CONTAINS_RULE

      public static final String GEOHASH_CONTAINS_RULE
      See Also:
  • Constructor Details

    • CoordinateAssociationRule

      public CoordinateAssociationRule()
    • CoordinateAssociationRule

      public CoordinateAssociationRule(int distScheme)
  • Method Details

    • setCoordinates

      public void setCoordinates(List<org.opensextant.data.Geocoding> geos)
    • addCoordinate

      public void addCoordinate(org.opensextant.data.Geocoding geo)
    • addCoordinates

      public void addCoordinates(List<org.opensextant.extraction.TextMatch> found)
    • reset

      public void reset()
      Description copied from class: GeocodeRule
      no-op, unless overriden.
      Overrides:
      reset in class GeocodeRule
    • 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 class GeocodeRule
      Returns:
    • evaluate

      public 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.
      Specified by:
      evaluate in class GeocodeRule
      Parameters:
      name - matched name in text
      geo - gazetteer entry or location