as_fasttext | R Documentation |
Fasttext prepends a label or different labels to text using a special string (__label__). This function takes a character vector of text and prepends the labels alongside the special string.
as_fasttext(x, y, label = "__label__")
x |
a character vector |
y |
a character vector of labels or a list of labels. |
label |
the string to use to prepend to the label. Defaults to __label__ |
a character vector of text where x
and y
are combined
as_fasttext(x = c("just a bit of txt", "example2", "more txt please", "more"), y = c("pos", "neg", "neg", NA)) as_fasttext(x = c("just a bit of txt", "example2", "more txt please", "more"), y = list(c("ok", "pos"), c("neg", "topic2"), "", NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.