one_hot: One-hot encode a text into a list of word indexes

Description Usage Arguments Author(s) References See Also

View source: R/preprocessing.R

Description

One-hot encode a text into a list of word indexes

Usage

1
2
one_hot(text, n, filters = "!\"#$%&()*+,-./:;<=>?@[\\]^_`{|}~\t\n",
  lower = TRUE, split = " ")

Arguments

text

a string

n

integer. Size of vocabulary.

filters

vector (or concatenation) of characters to filter out, such as punctuation.

lower

boolean. Whether to set the text to lowercase.

split

string. Separator for word splitting.

Author(s)

Taylor B. Arnold, taylor.arnold@acm.org

References

Chollet, Francois. 2015. Keras: Deep Learning library for Theano and TensorFlow.

See Also

Other preprocessing: Tokenizer, expand_dims, img_to_array, load_img, pad_sequences, text_to_word_sequence


YTLogos/kerasR documentation built on May 19, 2019, 4:04 p.m.