public abstract class ScoringFunction extends Object
Constructor and Description |
---|
ScoringFunction() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Node domNode)
Configures this scoring function.
|
static ScoringFunction |
create(String functionType,
Node functionNode)
Creates a scoring function.
|
GlobalEvidence |
getGlobalEvidence()
Returns the global evidence associated with this scoring function.
|
GlobalTermEvidence |
getGlobalTermEvidence()
Returns the global term evidence associated with this scoring function.
|
float |
getMaxScore()
Returns the maximum possible score.
|
float |
getMinScore()
Returns the minimum possible score.
|
abstract float |
getScore(int tf,
int docLen)
Computes score.
|
void |
initialize(GlobalTermEvidence termEvidence,
GlobalEvidence globalEvidence)
Initializes this scoring function with global evidence.
|
public void configure(Node domNode)
domNode
- DOM node containing configuration datapublic static ScoringFunction create(String functionType, Node functionNode) throws ConfigurationException
ConfigurationException
public GlobalEvidence getGlobalEvidence()
public GlobalTermEvidence getGlobalTermEvidence()
public float getMaxScore()
public float getMinScore()
public abstract float getScore(int tf, int docLen)
public void initialize(GlobalTermEvidence termEvidence, GlobalEvidence globalEvidence)
termEvidence
- term evidenceglobalEvidence
- global evidence