Weight a term-document matrix by term frequency - inverse document frequency.
weightTfIdf(m, normalize = TRUE)
A TermDocumentMatrix
in term frequency format.
A Boolean value indicating whether the term frequencies should be normalized.
The weighted matrix.
Formally this function is of class WeightingFunction
with the
additional attributes name
and acronym
.
Term frequency
Inverse document frequency for a term
Term frequency - inverse document frequency is now defined as
Gerard Salton and Christopher Buckley (1988). Term-weighting approaches in automatic text retrieval. Information Processing and Management, 24/5, 513--523.