@PublicationReference(author={"Erica Chisholm","Tamara G. Kolda"}, title="New Term Weighting Formulas for the Vector Space Method in Information Retrieval", type=TechnicalReport, url="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.40.3899", year=1999, notes="We use a slight modification of the formula for normalizing in this paper.") public class NormalizedLogLocalTermWeighter extends LogLocalTermWeighter
LogLocalWeighter
except that it normalizes by the average
frequency. It takes in a vector of term counts and for positive entries, it
makes the weight log(1 + count) / log(1 + average) where average is the
average count across the whole document. Counts of zero (or less) are
weighted as zero.vectorFactory
Constructor and Description |
---|
NormalizedLogLocalTermWeighter()
Creates a new
NormalizedLogLocalTermWeighter . |
NormalizedLogLocalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
Creates a new
NormalizedLogLocalTermWeighter |
Modifier and Type | Method and Description |
---|---|
Vector |
computeLocalWeights(Vector counts)
Computes the new local weights for a given document.
|
computeLocalWeights
getVectorFactory, setVectorFactory
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public NormalizedLogLocalTermWeighter()
NormalizedLogLocalTermWeighter
.public NormalizedLogLocalTermWeighter(VectorFactory<? extends Vector> vectorFactory)
NormalizedLogLocalTermWeighter
vectorFactory
- The vector factory to use.public Vector computeLocalWeights(Vector counts)
LocalTermWeighter
computeLocalWeights
in interface LocalTermWeighter
computeLocalWeights
in class LogLocalTermWeighter
counts
- The document to compute local weights for.