|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terrier.matching.dsms.SimpleStaticScoreModifier
public class SimpleStaticScoreModifier
Provides a way to integrate a static (query independent) document (prior) feature into the document scores. The feature scores are loaded from a file. The filename is specified by the property ssa.input.file. It can take several forms, as specified by the property ssa.input.type:
Properties:
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
SimpleStaticScoreModifier()
Constructs an instance of SimpleStaticScoreModifier. |
|
| Method Summary | |
|---|---|
protected static double[] |
castToDoubleArr(float[] f)
|
protected static double[] |
castToDoubleArr(short[] f)
|
java.lang.Object |
clone()
Creates the close of this object |
java.lang.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)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.log4j.Logger logger
protected int modifiedLength
protected double w
protected double[] staticScores
| Constructor Detail |
|---|
public SimpleStaticScoreModifier()
| Method Detail |
|---|
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 DocumentScoreModifierindex - Index the data structures used for retrieval.queryTerms - TermTreeNodes[] the query termsset - ResultSet the current set of results.
public java.lang.String getName()
getName in interface DocumentScoreModifierpublic java.lang.Object clone()
clone in interface DocumentScoreModifierclone in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||