Method Tf
Tf(Int32)
Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the Idf(Int32, Int32) factor for each term in the query and these products are then summed to form the initial score for a document.
Terms and phrases repeated in a document indicate the topic of the
document, so implementations of this method usually return larger values
when freq
is large, and smaller values when freq
is small.
The default implementation calls Tf(Single).
Declaration
public virtual float Tf(int freq)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | freq | the frequency of a term within a document |
Returns
Type | Description |
---|---|
System.Single | a score factor based on a term's within-document frequency |
Tf(Single)
Computes a score factor based on a term or phrase's frequency in a document. This value is multiplied by the Idf(Int32, Int32) factor for each term in the query and these products are then summed to form the initial score for a document.
Terms and phrases repeated in a document indicate the topic of the
document, so implementations of this method usually return larger values
when freq
is large, and smaller values when freq
is small.
Declaration
public abstract float Tf(float freq)
Parameters
Type | Name | Description |
---|---|---|
System.Single | freq | the frequency of a term within a document |
Returns
Type | Description |
---|---|
System.Single | a score factor based on a term's within-document frequency |