#include <SimpleKLRetMethod.hpp>
Inheritance diagram for SimpleKLQueryModel:

Public Methods | |
| SimpleKLQueryModel (TextQuery &qry,Index &dbIndex) | |
| construct a query model based on query text. | |
| SimpleKLQueryModel (Index &dbIndex) | |
| construct an empty query model. | |
| virtual | ~SimpleKLQueryModel () |
| virtual void | interpolateWith (UnigramLM &qModel,double origModCoeff,int howManyWord,double prSumThresh=1,double prThresh=0) |
| interpolate the model with any (truncated) unigram LM, default parameter to control the truncation is the number of words. More... | |
| virtual double | scoreConstant () |
| Any query-specific constant term in the scoring formula. | |
| virtual void | load (istream &is) |
| load a query model/rep from input stream is. | |
| virtual void | save (ostream &os) |
| save a query model/rep to output stream os. | |
|
|
construct a query model based on query text.
|
|
|
construct an empty query model.
|
|
|
|
|
|
interpolate the model with any (truncated) unigram LM, default parameter to control the truncation is the number of words.
The interpolated model is defined as The "new truncated model" gives a positive probability to all words that "survive" in the truncating process, but gives a zero probability to all others. So, the sum of all word probabilities according to the truncated model does not have to sum to 1. The assumption is that if a word has an extrememly small probability, adding it to the query model will not affect scoring that much.
The truncation procedure is as follows: First, we sort the probabilities in |
|
|
load a query model/rep from input stream is.
|
|
|
save a query model/rep to output stream os.
|
|
|
Any query-specific constant term in the scoring formula.
Reimplemented from ArrayQueryRep. |
1.2.4 written by Dimitri van Heesch,
© 1997-2000