object-builders | R Documentation |
Functions to build or re-build core objects, or to upgrade earlier versions of these objects to the current format.
build_dfm(
x,
features,
docvars = data.frame(),
meta = list(),
class = NULL,
...
)
rebuild_dfm(x, attrs)
upgrade_dfm(x)
build_tokens(
x,
types,
padding = TRUE,
docvars = data.frame(),
meta = list(),
class = NULL,
...
)
rebuild_tokens(x, attrs)
upgrade_tokens(x)
build_corpus(x, docvars = data.frame(), meta = list(), class = NULL, ...)
rebuild_corpus(x, attrs)
upgrade_corpus(x)
build_dictionary2(x, meta = list(), class = "dictionary2", ...)
rebuild_dictionary2(x, attrs)
upgrade_dictionary2(x)
build_fcm(
x,
features1,
features2 = features1,
meta = list(),
class = "fcm",
...
)
rebuild_fcm(x, attrs)
upgrade_fcm(x)
x |
an input corpus, tokens, dfm, fcm or dictionary object. |
features |
character for feature of resulting |
docvars |
data.frame for document level variables created by
|
meta |
list for meta fields |
class |
class labels to be attached to the object. |
... |
values saved in the object meta fields. They overwrite values
passed via |
attrs |
a list of attributes to be reassigned |
types |
character for types of resulting the |
padding |
logical indicating if the |
features1 |
character for row feature of resulting |
features2 |
character for column feature of resulting |
quanteda:::build_tokens(
list(c(1, 2, 3), c(4, 5, 6)),
docvars = quanteda:::make_docvars(n = 2L),
types = c("a", "b", "c", "d", "e", "f"),
padding = FALSE
)
quanteda:::build_corpus(
c("a b c", "d e f"),
docvars = quanteda:::make_docvars(n = 2L),
unit = "sentence"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.