|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.matching.tsms.TermInFieldModifier
public class TermInFieldModifier
Resets the scores of documents according to whether a term appears in a given set of fields. This class implements the TermScoreModifier interface.
Constructor Summary | |
---|---|
TermInFieldModifier(java.lang.String field)
Constructs an instance of a TermInFieldModifier given a field that the corresponding query term should appear in. |
|
TermInFieldModifier(java.lang.String field,
boolean req)
Constructs an instance of a TermInFieldModifier given a field that the corresponding query term should appear in. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Return a clone of this object (deep copy). |
java.lang.String |
getName()
Returns the name of the modifier. |
int |
modifyScores(double[] scores,
int[][] pointers)
Resets the scores of documents for a particular term, based on the fields a term appears in documents. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.gla.terrier.matching.tsms.TermScoreModifier |
---|
hashCode |
Constructor Detail |
---|
public TermInFieldModifier(java.lang.String field)
field
- String a fieldpublic TermInFieldModifier(java.lang.String field, boolean req)
field
- String a fieldreq
- boolean the requirement for this field. If req is
true, then the term is required to appear in the field
(this is the default behaviour), otherwise the term
should not appear in the field.Method Detail |
---|
public int modifyScores(double[] scores, int[][] pointers)
modifyScores
in interface TermScoreModifier
scores
- double[] the scores of the documents.pointers
- int[][] the pointers read from the inverted file
for a particular query term.
public java.lang.String getName()
TermScoreModifier
getName
in interface TermScoreModifier
public java.lang.Object clone()
TermScoreModifier
clone
in interface TermScoreModifier
clone
in class java.lang.Object
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |