Package org.opensextant.extractors.geo
Class ScoredPlace
java.lang.Object
org.opensextant.extractors.geo.ScoredPlace
- All Implemented Interfaces:
Comparable<ScoredPlace>
A class to hold a Place and a score together. Used by PlaceCandidate to rank
places.
- Author:
- dlutz, ubaldino
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
int
Ordering: higher score comes first in our sortable lists.org.opensextant.data.Place
getPlace()
double
getScore()
boolean
void
incrementScore
(double d) void
incrementScore
(double d, String rule) Increment the score for a given rule exactly once.void
setPlace
(org.opensextant.data.Place p) toString()
-
Constructor Details
-
ScoredPlace
public ScoredPlace() -
ScoredPlace
-
-
Method Details
-
getPlace
public org.opensextant.data.Place getPlace() -
setPlace
public void setPlace(org.opensextant.data.Place p) -
getScore
public double getScore() -
incrementScore
public void incrementScore(double d) -
incrementScore
Increment the score for a given rule exactly once. TODO: expand this to allow incremental scores for Document level vs. local span-level scoring of specific location candidates.- Parameters:
d
- scorerule
- rule name
-
hasRule
-
addRule
-
compareTo
Ordering: higher score comes first in our sortable lists. So A.score > B.score yields -1, so A is ordered first.- Specified by:
compareTo
in interfaceComparable<ScoredPlace>
-
toString
-