get_tf

0th

Percentile

Term-frequency scaling matrix

This function creates a term-frequency (TF) scaling matrix from a document-term matrix.

Usage
get_tf(dtm, norm = c("l1", "l2"))
Arguments
dtm

a document-term matrix of class dgCMatrix or dgTMatrix.

norm

character the method used to normalize term vectors. "l1" by default, i.e., scale by the number of words in the document.

Value

ddiMatrix TF scaling diagonal sparse matrix.

See Also

get_idf, get_dtm, create_dtm

Aliases
  • get_tf
Documentation reproduced from package text2vec, version 0.4.0, License: GPL (>= 2) | file LICENSE

Community examples

Looks like there are no examples yet.