public class SimpleStaticScoreModifier extends Object implements DocumentScoreModifier
Properties:
Modifier and Type | Field and Description |
---|---|
protected org.apache.log4j.Logger |
logger |
protected int |
modifiedLength
The number of top-ranked documents for which the scores will be modified.
|
protected double[] |
staticScores
The array that contains the statically computed scores.
|
protected double |
w
weight for this feature
|
Constructor and Description |
---|
SimpleStaticScoreModifier()
Constructs an instance of SimpleStaticScoreModifier.
|
Modifier and Type | Method and Description |
---|---|
protected static double[] |
castToDoubleArr(float[] f) |
protected static double[] |
castToDoubleArr(short[] f) |
Object |
clone()
Creates the close of this object
|
String |
getName()
Returns the name of the document score modifier.
|
void |
init(Index index)
init
|
protected void |
initialise_parameters() |
protected void |
loadDocno2score_seq(Index index) |
protected void |
loadDocno2score(Index index) |
protected void |
loadOOS() |
protected void |
loadScorefile(Index index) |
protected static void |
makeAverage1(double[] ar) |
protected static void |
makeMaxMin(double[] staticScores2) |
boolean |
modifyScores(Index index,
MatchingQueryTerms queryTerms,
ResultSet set)
Modifies the scores of the documents for a given
query.
|
protected static void |
negate(double[] staticScores2) |
protected void |
normalise(double[] scores) |
protected static void |
printStats(double[] ar) |
protected org.apache.log4j.Logger logger
protected int modifiedLength
protected double w
protected double[] staticScores
public SimpleStaticScoreModifier()
protected static void makeAverage1(double[] ar)
public void init(Index index)
index
- protected void normalise(double[] scores)
protected void loadScorefile(Index index)
protected void loadOOS()
protected static void makeMaxMin(double[] staticScores2)
protected void loadDocno2score_seq(Index index)
protected void loadDocno2score(Index index)
protected static void negate(double[] staticScores2)
protected static void printStats(double[] ar)
protected static double[] castToDoubleArr(float[] f)
protected static double[] castToDoubleArr(short[] f)
protected void initialise_parameters()
public boolean modifyScores(Index index, MatchingQueryTerms queryTerms, ResultSet set)
modifyScores
in interface DocumentScoreModifier
index
- Index the data structures used for retrieval.queryTerms
- TermTreeNodes[] the query termsset
- ResultSet the current set of results.public String getName()
getName
in interface DocumentScoreModifier
public Object clone()
clone
in interface DocumentScoreModifier
clone
in class Object
Terrier 4.0. Copyright © 2004-2014 University of Glasgow