Create a doc2vec model as weighted word vectors.
Arguments
- x
a quanteda::tokens or quanteda::dfm object.
- model
a textmodel_wordvector object.
- compound
if
TRUE, compound multi-word expressions inxbased onmodelinternally. Only applies whenxis a quanteda::tokens object.- group_data
if
TRUE, applydfm_group(x)before creating document vectors.- ...
additional arguments passed to the underlying function.
Value
Returns a textmodel_doc2vec object with the following elements:
- values
a list of matrices for word and document vectors.
- dim
the size of the document vectors.
- concatenator
the concatenator in
x.- docvars
document variables copied from
x.- call
the command used to execute the function.
- version
the version of the wordvector package.