|
|||||||||
| 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.NormalizationH1
public class NormalizationH1
Normalization model that assumes a uniform distribution of the term frequency.
While this model is parameterless in the
original article,
information-based models (see IBSimilarity) introduced a
multiplying factor.
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 | |
|---|---|
NormalizationH1()
Calls NormalizationH1(1) |
|
NormalizationH1(float c)
Creates NormalizationH1 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 NormalizationH1(float c)
c.
c - hyper-parameter that controls the term frequency
normalization with respect to the document length.public NormalizationH1()
NormalizationH1(1)
| Method Detail |
|---|
public final float tfn(BasicStats stats,
float tf,
float len)
Normalization
tfn in class Normalizationlen - the field length.public String toString()
Normalization
toString in class Normalizationpublic float getC()
c parameter.
NormalizationH1(float)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||