|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.querying.ExpansionTerms
public abstract class ExpansionTerms
Base class for weighting term occurrences in feedback documents.
Nested Class Summary | |
---|---|
static class |
ExpansionTerms.ExpansionTerm
This class implements a data structure for a term in the top-retrieved documents. |
Field Summary | |
---|---|
protected static java.util.Comparator<ExpansionTerms.ExpansionTerm> |
EXPANSIONTERM_DESC_SCORE_SORTER
|
protected static org.apache.log4j.Logger |
logger
|
protected QueryExpansionModel |
model
|
protected gnu.trove.TIntDoubleHashMap |
originalTermFreqs
The frequency of each query term in the original query. |
protected gnu.trove.TIntObjectHashMap<java.lang.String> |
originalTermids
The original query terms. |
Constructor Summary | |
---|---|
protected |
ExpansionTerms()
|
Method Summary | |
---|---|
abstract SingleTermQuery[] |
getExpandedTerms(int numberOfExpandedTerms)
Get the most informative terms for the expanded set. |
abstract int |
getNumberOfUniqueTerms()
Returns the number of terms being considered |
abstract void |
insertDocument(FeedbackDocument doc)
Add a single document to be considered for expanding the query |
void |
setModel(QueryExpansionModel m)
Set query expansion model |
void |
setOriginalQueryTerms(MatchingQueryTerms query)
Set the original query terms. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
protected static final java.util.Comparator<ExpansionTerms.ExpansionTerm> EXPANSIONTERM_DESC_SCORE_SORTER
protected gnu.trove.TIntObjectHashMap<java.lang.String> originalTermids
protected gnu.trove.TIntDoubleHashMap originalTermFreqs
protected QueryExpansionModel model
Constructor Detail |
---|
protected ExpansionTerms()
Method Detail |
---|
public void setOriginalQueryTerms(MatchingQueryTerms query)
query
- The original query.public abstract void insertDocument(FeedbackDocument doc) throws java.io.IOException
java.io.IOException
public abstract SingleTermQuery[] getExpandedTerms(int numberOfExpandedTerms)
numberOfExpandedTerms
- - number of terms to get.
public void setModel(QueryExpansionModel m)
m
- public abstract int getNumberOfUniqueTerms()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |