Convert a list of texts to a matrix.

Convert a list of texts to a matrix.

texts_to_matrix(tokenizer, texts, mode = c("binary", "count", "tfidf",
  "freq"))

Arguments

tokenizer

Tokenizer

texts

Vector/list of texts (strings).

mode

one of "binary", "count", "tfidf", "freq".

Value

A matrix

See also