Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

one_hot

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


Description

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

Usage

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

See Also


kerasR

R Interface to the Keras Deep Learning Library

v0.6.1
LGPL-2
Authors
Taylor Arnold [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.