weightSMART(m, spec = "nnn", control = list())
TermDocumentMatrix
in term frequency format.WeightingFunction
with the
additional attributes Name
and Acronym
. The first letter of spec
specifies a weighting schema for term
frequencies of m
:
m
is assumed to be in this
standard term frequency format already.
The second letter of spec
specifies a weighting schema of
document frequencies for m
:
The third letter of spec
specifies a schema for normalization
of m
:
slope
and pivot
must be set
via named tags in the control
list.
alpha
in the control
list.
The final result is defined by multiplication of the chosen term frequency component with the chosen document frequency component with the chosen normalization component.
data("crude")
TermDocumentMatrix(crude,
control = list(removePunctuation = TRUE,
stopwords = TRUE,
weighting = function(x)
weightSMART(x, spec = "ntc")))
Run the code above in your browser using DataLab