FirteX-高性能全文索引和检索平台API Documentation |
#include <DefaultSimilarity.h>
继承图,类firtex::search::CDefaultSimilarity

公有成员 | |
| 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) |
|
|
|
|
|
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
计算idf
|
|
|
|
|
|
|
|
|
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.
|
|
|
计算tf
|
http://www.firtex.org http://www.sourceforge.net/projects/firtex