public class FieldScore extends Object
Modifier and Type | Field and Description |
---|---|
static 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 and Description |
---|
FieldScore()
The default constructor of the class.
|
Modifier and Type | Method and Description |
---|---|
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()
Initialises the FieldTags tagset
|
void |
insertField(String tag)
Add a tag in the corresponding score set,
unless the number of tags to process is zero.
|
void |
insertFields(Set<String> tags)
Adds tags in the corresponding score set, unless
the number of tags to process is zero.
|
void |
insertFields(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.
|
public static int FIELDS_COUNT
public static boolean USE_FIELD_INFORMATION
public static String[] FIELD_NAMES
public static void init()
public int getFieldScore()
public void insertField(String tag)
tag
- String the name of the tag to be added.public void insertFields(String[] tags)
tags
- String[] the names of the tags to be added.public void insertFields(Set<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 4.0. Copyright © 2004-2014 University of Glasgow