public class NormalizationH2 extends Normalization
While this model is parameterless in the
original article, the thesis
introduces the parameterized variant.
The default value for the c
parameter is 1
.
Normalization.NoNormalization
Constructor and Description |
---|
NormalizationH2()
Calls
NormalizationH2(1) |
NormalizationH2(float c)
Creates NormalizationH2 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 NormalizationH2(float c)
c
.c
- hyper-parameter that controls the term frequency
normalization with respect to the document length.public NormalizationH2()
NormalizationH2(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.NormalizationH2(float)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.