|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.Similarity
org.eml.sir.retr.AdjustableSimilarity
Adjustable scoring implementation.
Field Summary | |
static char |
IDF_F
Constant for idf factor of AdjustableSimilarity. |
static char |
IDF_P
Constant for idf factor of AdjustableSimilarity. |
static char |
TF_1
Constant for tf factor of AdjustableSimilarity. |
static char |
TF_FREQ
Constant for tf factor of AdjustableSimilarity. |
static char |
TF_SQRT
Constant for tf factor of AdjustableSimilarity. |
Constructor Summary | |
AdjustableSimilarity()
|
|
AdjustableSimilarity(char tfAlg,
char idfAlg)
Create a new AdjustableSimilarity instance. |
Method Summary | |
float |
coord(int overlap,
int maxOverlap)
Implemented as overlap / maxOverlap . |
char |
getIdfAlg()
Return the idf algorithm (factor) of this AdjustableSimilarity. |
char |
getTfAlg()
Return the tf algorithm (factor) of this AdjustableSimilarity. |
float |
idf(int docFreq,
int numDocs)
Depends on the idf algorithm (factor) setting. |
float |
lengthNorm(java.lang.String fieldName,
int numTerms)
Implemented as 1/sqrt(numTerms) . |
float |
queryNorm(float sumOfSquaredWeights)
Implemented as 1/sqrt(sumOfSquaredWeights) . |
void |
setIdfAlg(char idfAlg)
Set the idf algorithm (factor) of this AdjustableSimilarity. |
void |
setTfAlg(char tfAlg)
Set the tf algorithm (factor) of this AdjustableSimilarity. |
float |
sloppyFreq(int distance)
Implemented as 1 / (distance + 1) . |
float |
tf(float freq)
Depends on the tf algorithm (factor) setting. |
Methods inherited from class org.apache.lucene.search.Similarity |
decodeNorm, encodeNorm, getDefault, idf, idf, setDefault, tf |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final char TF_1
public static final char TF_FREQ
public static final char TF_SQRT
public static final char IDF_F
public static final char IDF_P
Constructor Detail |
public AdjustableSimilarity()
public AdjustableSimilarity(char tfAlg, char idfAlg)
Method Detail |
public char getIdfAlg()
public void setIdfAlg(char idfAlg)
public char getTfAlg()
public void setTfAlg(char tfAlg)
public float lengthNorm(java.lang.String fieldName, int numTerms)
1/sqrt(numTerms)
.
public float queryNorm(float sumOfSquaredWeights)
1/sqrt(sumOfSquaredWeights)
.
public float tf(float freq)
public float sloppyFreq(int distance)
1 / (distance + 1)
.
public float idf(int docFreq, int numDocs)
public float coord(int overlap, int maxOverlap)
overlap / maxOverlap
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |