|
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.utility.FieldScore
public class FieldScore
A class for modifying the retrieval scores of documents,
according to whether the query terms appear to any of the
fields, or tags specified by the property
FieldTags.process. These tags can be either HTML tags
or tags such as DOCHDR, from the documents.
If a query term appears in any of the specified tags, then the
document score can be altered according to the values specified in
the property field.modifiers. For example, if
FieldTags.process=TITLE,H1,B and
field.modifiers=0.10,0.00,0.00, then if a query term
appears in the title of a document, the document's score will be
increased by a factor of 0.10.
Field Summary | |
---|---|
static java.lang.String[] |
FIELD_NAMES
The names of the fields to be processed. |
static int |
FIELDS_COUNT
The total number of tags to check for. |
static boolean |
USE_FIELD_INFORMATION
Indicates whether field information is used. |
Constructor Summary | |
---|---|
FieldScore()
The default constructor of the class. |
Method Summary | |
---|---|
static double |
applyFieldScoreModifier(int fieldScore,
double score)
Computes the modified score for a document with a given fieldScore (a bitset where each bit represents a tag) and its original score. |
int |
getFieldScore()
Computes an field score associated with a page. |
static double[] |
getModifiers()
Returns the modifiers scores. |
static void |
init()
|
void |
insertField(java.lang.String tag)
Add a tag in the corresponding score set, unless the number of tags to process is zero. |
void |
insertFields(java.util.Set<java.lang.String> tags)
Adds tags in the corresponding score set, unless the number of tags to process is zero. |
void |
insertFields(java.lang.String[] tags)
Add tags in the corresponding score set, unless the number of tags to process is zero. |
static void |
updateModifiers(double[] modifiers)
Updates the values of the tag modifiers. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int FIELDS_COUNT
public static boolean USE_FIELD_INFORMATION
public static java.lang.String[] FIELD_NAMES
Constructor Detail |
---|
public FieldScore()
Method Detail |
---|
public static void init()
public int getFieldScore()
public void insertField(java.lang.String tag)
tag
- String the name of the tag to be added.public void insertFields(java.lang.String[] tags)
tags
- String[] the names of the tags to be added.public void insertFields(java.util.Set<java.lang.String> tags)
tags
- HashSet a hashset with the tags to add.public static double applyFieldScoreModifier(int fieldScore, double score)
fieldScore
- int the bitset where each bit represents
whether a specific tag exists.score
- the original score.
public static void updateModifiers(double[] modifiers)
modifiers
- double[] the new values of the modifiers.public static double[] getModifiers()
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |