Create distributed representation of documents as weighted word vectors.
as.textmodel_doc2vec(
x,
model,
normalize = FALSE,
weights = 1,
pattern = NULL,
group_data = FALSE,
...
)Returns a textmodel_docvector object with the following elements:
a list of matrices for word and document vectors.
the size of the document vectors.
the concatenator in x.
document variables copied from x.
if the document vectors are normalized.
the command used to execute the function.
the version of the wordvector package.
a quanteda::tokens or quanteda::dfm object.
a textmodel_wordvector object.
if TRUE, normalized word vectors before creating document vectors.
weight the word vectors by user-provided values; either a single value or multiple values sorted in the same order as the word vectors.
quanteda::pattern to select words to apply weights.
if TRUE, apply dfm_group(x) before creating document vectors.
additional arguments passed to quanteda::object2id.