texts_to_matrix: Convert a list of texts to a matrix.

View source: R/preprocessing.R

texts_to_matrixR Documentation

Convert a list of texts to a matrix.

Description

Convert a list of texts to a matrix.

Usage

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

Other text tokenization: fit_text_tokenizer(), save_text_tokenizer(), sequences_to_matrix(), text_tokenizer(), texts_to_sequences(), texts_to_sequences_generator()


keras documentation built on May 29, 2024, 3:20 a.m.