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.Cloneable
The weight and the modifiers associated with a query term.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Boolean
required
EntryStatistics
stats
Info about the query term.java.util.Set<java.lang.String>
tags
java.util.List<WeightingModel>
termModels
The term score modifiers associated with a particular query term.double
weight
The 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.QueryTermProperties
clone()
boolean
equals(java.lang.Object _o)
java.lang.Boolean
getRequired()
java.util.Set<java.lang.String>
getTags()
double
getWeight()
int
hashCode()
void
setRequired(boolean b)
void
setTag(java.lang.String tag)
void
setWeight(double weight)
java.lang.String
toString()
-
-
-
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:
clone
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object _o)
- Overrides:
equals
in classjava.lang.Object
-
-