|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.search.similarities.Normalization
org.apache.lucene.search.similarities.NormalizationH2
public class NormalizationH2
Normalization model in which the term frequency is inversely related to the length.
While this model is parameterless in the
original article, the thesis
introduces the parameterized variant.
The default value for the c
parameter is 1
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.search.similarities.Normalization |
---|
Normalization.NoNormalization |
Constructor Summary | |
---|---|
NormalizationH2()
Calls NormalizationH2(1) |
|
NormalizationH2(float c)
Creates NormalizationH2 with the supplied parameter c . |
Method Summary | |
---|---|
float |
getC()
Returns the c parameter. |
float |
tfn(BasicStats stats,
float tf,
float len)
Returns the normalized term frequency. |
String |
toString()
Subclasses must override this method to return the code of the normalization formula. |
Methods inherited from class org.apache.lucene.search.similarities.Normalization |
---|
explain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NormalizationH2(float c)
c
.
c
- hyper-parameter that controls the term frequency
normalization with respect to the document length.public NormalizationH2()
NormalizationH2(1)
Method Detail |
---|
public final float tfn(BasicStats stats, float tf, float len)
Normalization
tfn
in class Normalization
len
- the field length.public String toString()
Normalization
toString
in class Normalization
public float getC()
c
parameter.
NormalizationH2(float)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |