Create distributed representation of documents as weighted word vectors.
as.textmodel_doc2vec(x, model, normalize = FALSE, group_data = FALSE, ...)a quanteda::tokens or quanteda::dfm object.
a textmodel_wordvector object.
if TRUE, normalized word vectors before creating document vectors.
if TRUE, apply dfm_group(x) before creating document vectors.
additional arguments passed to quanteda::object2id.
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.