# get_tf

From text2vec v0.4.0
by Dmitriy Selivanov

##### 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

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

### Community examples

Looks like there are no examples yet.