Package org.terrier.matching
Class MatchingQueryTerms.QueryTermProperties
- java.lang.Object
-
- org.terrier.matching.MatchingQueryTerms.QueryTermProperties
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
- Enclosing class:
- MatchingQueryTerms
public static class MatchingQueryTerms.QueryTermProperties extends java.lang.Object implements java.io.Serializable, java.lang.CloneableThe weight and the modifiers associated with a query term.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.BooleanrequiredEntryStatisticsstatsInfo about the query term.java.util.Set<java.lang.String>tagsjava.util.List<WeightingModel>termModelsThe term score modifiers associated with a particular query term.doubleweightThe weight of a query term.
-
Constructor Summary
Constructors Constructor Description QueryTermProperties(int _index)QueryTermProperties(int _index, double w)A constructor for setting the weight of a term.QueryTermProperties(int _index, double w, WeightingModel model)A constructor for setting the weight and a term score modifier for a term.QueryTermProperties(int _index, double w, WeightingModel model, EntryStatistics _stats)A constructor for setting a weight, a term score modifier and the term code for a query term.QueryTermProperties(int _index, double w, EntryStatistics _stats)A constructor for setting the weight of a term and its term code.QueryTermProperties(int _index, WeightingModel model)A constructor for setting a term score modifier for a term.QueryTermProperties(int _index, WeightingModel model, EntryStatistics _stats)A constructor for setting a term score modifier for a term and its term code.QueryTermProperties(int _index, EntryStatistics _stats)An constructor for setting the term code of a query term.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MatchingQueryTerms.QueryTermPropertiesclone()booleanequals(java.lang.Object _o)java.lang.BooleangetRequired()java.util.Set<java.lang.String>getTags()doublegetWeight()inthashCode()voidsetRequired(boolean b)voidsetTag(java.lang.String tag)voidsetWeight(double weight)java.lang.StringtoString()
-
-
-
Field Detail
-
required
public java.lang.Boolean required
-
weight
public double weight
The weight of a query term. This is usually how many times the term occurred in the query, but sometime may be altered if a weight has been specified on the query term: eg QueryExpansion will do this, as will manually specifying a weight on the unparsed query (example term1 term2^3).
-
stats
public EntryStatistics stats
Info about the query term.
-
termModels
public java.util.List<WeightingModel> termModels
The term score modifiers associated with a particular query term.
-
tags
public java.util.Set<java.lang.String> tags
-
-
Constructor Detail
-
QueryTermProperties
public QueryTermProperties(int _index)
-
QueryTermProperties
public QueryTermProperties(int _index, EntryStatistics _stats)An constructor for setting the term code of a query term.- Parameters:
_stats- the statistics of the query term
-
QueryTermProperties
public QueryTermProperties(int _index, double w)A constructor for setting the weight of a term.- Parameters:
w- double the weight of a query term.
-
QueryTermProperties
public QueryTermProperties(int _index, WeightingModel model)A constructor for setting a term score modifier for a term.- Parameters:
model- WeightingModel modifier associated with a query term.
-
QueryTermProperties
public QueryTermProperties(int _index, double w, WeightingModel model)A constructor for setting the weight and a term score modifier for a term.- Parameters:
w- double the weight of a query term.model- WeightingModel modifier associated with a query term.
-
QueryTermProperties
public QueryTermProperties(int _index, double w, EntryStatistics _stats)A constructor for setting the weight of a term and its term code.- Parameters:
w- double the weight of a query term._stats- statistics of the query term
-
QueryTermProperties
public QueryTermProperties(int _index, WeightingModel model, EntryStatistics _stats)A constructor for setting a term score modifier for a term and its term code.- Parameters:
model- WeightingModel modifier associated with a query term._stats- statistics of the query term
-
QueryTermProperties
public QueryTermProperties(int _index, double w, WeightingModel model, EntryStatistics _stats)A constructor for setting a weight, a term score modifier and the term code for a query term.- Parameters:
w- double the weight of a query term.model- WeightingModel modifier associated with a query term._stats- statistics of the query term
-
-
Method Detail
-
getWeight
public double getWeight()
-
getTags
public java.util.Set<java.lang.String> getTags()
-
getRequired
public java.lang.Boolean getRequired()
-
setWeight
public void setWeight(double weight)
-
setTag
public void setTag(java.lang.String tag)
-
setRequired
public void setRequired(boolean b)
-
clone
public MatchingQueryTerms.QueryTermProperties clone()
- Overrides:
clonein classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object _o)
- Overrides:
equalsin classjava.lang.Object
-
-