本文整理汇总了C++中Index::docLengthAvg方法的典型用法代码示例。如果您正苦于以下问题:C++ Index::docLengthAvg方法的具体用法?C++ Index::docLengthAvg怎么用?C++ Index::docLengthAvg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Index
的用法示例。
在下文中一共展示了Index::docLengthAvg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
lemur::retrieval::RetMethod::RetMethod(const Index &dbIndex,
const string &supportFileName,
ScoreAccumulator &accumulator) :
TextQueryRetMethod(dbIndex, accumulator), supportFile(supportFileName) {
//docParam.smthMethod = RetParameter::defaultSmoothMethod;
docParam.smthMethod = RetParameter::DIRICHLETPRIOR;
//docParam.smthMethod = RetParameter::ABSOLUTEDISCOUNT;
//docParam.smthMethod = RetParameter::JELINEKMERCER;
docParam.smthStrategy= RetParameter::defaultSmoothStrategy;
//docParam.ADDelta = RetParameter::defaultADDelta;
docParam.JMLambda = RetParameter::defaultJMLambda;
//docParam.JMLambda = 0.9;
docParam.DirPrior = dbIndex.docLengthAvg();//50;//RetParameter::defaultDirPrior;
qryParam.adjScoreMethod = RetParameter::NEGATIVEKLD;
//qryParam.adjScoreMethod = RetParameter::QUERYLIKELIHOOD;
//qryParam.fbMethod = RetParameter::defaultFBMethod;
//qryParam.fbMethod = RetParameter::DIVMIN;
qryParam.fbMethod = RetParameter::MIXTURE;
RM="MIX";// *** Query Likelihood adjusted score method *** //
//qryParam.fbCoeff = RetParameter::defaultFBCoeff;
qryParam.fbCoeff =0.5;
qryParam.fbPrTh = RetParameter::defaultFBPrTh;
qryParam.fbPrSumTh = RetParameter::defaultFBPrSumTh;
qryParam.fbTermCount = 5;//RetParameter::defaultFBTermCount;
qryParam.fbMixtureNoise = RetParameter::defaultFBMixNoise;
qryParam.emIterations = 50;//RetParameter::defaultEMIterations;
docProbMass = NULL;
uniqueTermCount = NULL;
mcNorm = NULL;
NegMu = ind.docLengthAvg();
collectLMCounter = new lemur::langmod::DocUnigramCounter(ind);
collectLM = new lemur::langmod::MLUnigramLM(*collectLMCounter, ind.termLexiconID());
delta = 0.007;
newNonRelRecieved = false;
newRelRecieved = false;
newNonRelRecievedCnt = 0,newRelRecievedCnt =0;
switch (RSMethodHM)
{
case 0://lm
// setThreshold(-4.3);
setThreshold(-6.3);
break;
case 1://negGen
{
if(negGenModeHM==0)//col//mu=2500
// setThreshold(2.1);
setThreshold(1.5);
else if(negGenModeHM == 1)
// setThreshold(2.4);
setThreshold(1.6);
break;
}
}
//prev_distQuery = new double[ind.termCountUnique()+1];
scFunc = new ScoreFunc();
scFunc->setScoreMethod(qryParam.adjScoreMethod);
}