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

公有成员 | |
| CSimilarity (void) | |
| virtual | ~CSimilarity (void) |
| virtual float | tf (int freq) |
| virtual float | tf (float freq)=0 |
| virtual float | idf (CTerm *term, CSearcher *searcher) |
| virtual float | idf (freq_t docFreq, count_t numDocs)=0 |
| virtual float | sloppyFreq (int distance)=0 |
| virtual float | lengthNorm (count_t numTerms)=0 |
| virtual float | queryNorm (float sumOfSquaredWeights)=0 |
| virtual float | coord (int overlap, int maxOverlap)=0 |
静态公有成员 | |
| CSimilarity * | getDefault () |
| void | setDefault (CSimilarity *pDefault) |
| float | decodeNorm (byte b) |
| byte | encodeNorm (float f) |
静态保护成员 | |
| void | initNormTable () |
静态保护属性 | |
| float | NORM_TABLE [256] |
| bool | m_bNormTableInited |
|
|
|
|
|
|
|
||||||||||||
|
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.
|
|
|
Decodes a normalization factor stored in an index. |
|
|
|
|
|
|
|
||||||||||||
|
计算idf
|
|
||||||||||||
|
计算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
|
|
|
计算tf
|
|
|
|
|
|
Cache of decoded bytes. |
http://www.firtex.org http://www.sourceforge.net/projects/firtex