Create distributed representation of documents as weighted word vectors.
Arguments
- x
a quanteda::tokens or quanteda::dfm object.
- model
a textmodel_wordvector object.
- normalize
if
TRUE, normalized word vectors before creating document vectors.- group_data
if
TRUE, applydfm_group(x)before creating document vectors.- ...
additional arguments passed to quanteda::object2id.
Value
Returns a textmodel_docvector 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.- normalize
if the document vectors are normalized.
- call
the command used to execute the function.
- version
the version of the wordvector package.