public class NormalizationH1 extends Normalization
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
.
Normalization.NoNormalization
Constructor and Description |
---|
NormalizationH1()
Calls
NormalizationH1(1) |
NormalizationH1(float c)
Creates NormalizationH1 with the supplied parameter
c . |
Modifier and Type | Method and Description |
---|---|
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.
|
explain
public NormalizationH1(float c)
c
.c
- hyper-parameter that controls the term frequency
normalization with respect to the document length.public NormalizationH1()
NormalizationH1(1)
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.NormalizationH1(float)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.