FirteX-高性能全文索引和检索平台

API Documentation


首页 | 名字空间列表 | 类继承关系 | 组合类型列表 | $(BL\录(B | 文件列表 | 名字空间成员 | 组合类型成员 | 文件成员

firtex::search::CDefaultSimilarity类参考

#include <DefaultSimilarity.h>

继承图,类firtex::search::CDefaultSimilarity

firtex::search::CSimilarity 所有成员的列表。

公有成员

 CDefaultSimilarity (void)
virtual ~CDefaultSimilarity (void)
float tf (float freq)
float idf (freq_t docFreq, count_t numDocs)
float sloppyFreq (int distance)
float lengthNorm (count_t numTerms)
float queryNorm (float sumOfSquaredWeights)
float coord (int overlap, int maxOverlap)

构造及析构函数文档

firtex::search::CDefaultSimilarity::CDefaultSimilarity void   ) 
 

virtual firtex::search::CDefaultSimilarity::~CDefaultSimilarity void   )  [virtual]
 


成员函数文档

float firtex::search::CDefaultSimilarity::coord int  overlap,
int  maxOverlap
[virtual]
 

Computes a score factor based on the fraction of all query terms that a document contains. This value is multiplied into scores.

The presence of a large portion of the query terms indicates a better match with the query, so implementations of this method usually return larger values when the ratio between these parameters is large and smaller values when the ratio between them is small.

参数:
overlap the number of query terms matched in the document
maxOverlap the total number of terms in the query
返回:
a score factor based on term overlap with the query

实现了firtex::search::CSimilarity

float firtex::search::CDefaultSimilarity::idf freq_t  docFreq,
count_t  numDocs
[virtual]
 

计算idf

参数:
docFreq 文档频率
numDocs 文档总数
返回:
idf值

实现了firtex::search::CSimilarity

float firtex::search::CDefaultSimilarity::lengthNorm count_t  numTerms  )  [virtual]
 

实现了firtex::search::CSimilarity

float firtex::search::CDefaultSimilarity::queryNorm float  sumOfSquaredWeights  )  [virtual]
 

实现了firtex::search::CSimilarity

float firtex::search::CDefaultSimilarity::sloppyFreq int  distance  )  [virtual]
 

Computes the amount of a sloppy phrase match, based on an edit distance. This value is summed for each sloppy phrase match in a document to form the frequency that is passed to tf(float).

A phrase match with a small edit distance to a document passage more closely matches the document, so implementations of this method usually return larger values when the edit distance is small and smaller values when it is large.

参见:
CPhraseQuery::setSlop(int)
参数:
distance the edit distance of this sloppy phrase match
返回:
the frequency increment for this match

实现了firtex::search::CSimilarity

float firtex::search::CDefaultSimilarity::tf float  freq  )  [virtual]
 

计算tf

参数:
freq 词频
返回:
tf值

实现了firtex::search::CSimilarity


该类的文档由以下文件生成:

http://www.firtex.org http://www.sourceforge.net/projects/firtex