Class FeatureRule
java.lang.Object
org.opensextant.extractors.geo.rules.GeocodeRule
org.opensextant.extractors.geo.rules.FeatureRule
NOT USED MUCH. Feature
FeatureRule is a rule that makes use of feature distribution across the
gazetteer as well as known properties of specific feature types that make
them more or less likely to be the best location type for a particular mention.
This may or may not be tie breakers -- within a feature class for the same
name, this provides no tie breaker.
"Boston", OH (P/PPL) ~ "Boston", MA (P/PPL) -- feature stats are the same.
"Boston", ?? (T/ISL) ... is a different feature type and in this case is less
likely to be the best location.
Note -- other evidence and context has to overwhelm certain feature stats here.
TODO: this overtakes the "DefaultScore" component from "scoreFeature()"
- Author:
- ubaldino
-
Field Summary
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
evaluate
(PlaceCandidate name, org.opensextant.data.Place geo) Deprecated.Feature score is now provided as part of id_biasstatic FeatureClassMeta
lookupFeature
(org.opensextant.data.Place geo) Find feature metadata if we have it; At a minimumMethods inherited from class org.opensextant.extractors.geo.rules.GeocodeRule
evaluate, filterByNameOnly, filterOutByFrequency, internalPlaceID, isRelevant, isShort, logMsg, reset, sameBoundary, sameCountry, sameCountry, sameLexicalName, setBoundaryObserver, setCountryObserver, setDefaultMethod, setGeohash, setLocationObserver, setTextCase, textCase
-
Field Details
-
featWeights
-
FEAT_RULE
- See Also:
-
-
Constructor Details
-
FeatureRule
public FeatureRule()
-
-
Method Details
-
lookupFeature
Find feature metadata if we have it; At a minimum -
evaluate
Deprecated.Feature score is now provided as part of id_biasDescription copied from class:GeocodeRule
The one evaluation scheme that all rules must implement. Given a single text match and a location, consider if the geo is a good geocoding for the match.- Specified by:
evaluate
in classGeocodeRule
- Parameters:
name
- matched name in textgeo
- gazetteer entry or location
-