instance_vector | R Documentation |
Given a single MALLET Instance (not an InstanceList), this function retrieves
an R vector representation of the FeatureSequence
.
instance_vector(instance)
instance |
a reference to a single Instance |
A FeatureSequence
is a list of zero-based indices into the
vocabulary. For convenience, this function adds 1 so that the result can be
used to index directly into a vocabulary vector (e.g. from
trainer$getVocabulary()
or instances_vocabulary
). Note
that although MALLET's topic-modeling works on feature sequences
because it is designed to preserve the order of words in the documents it
models, if you have used pre-aggregated data from JSTOR the "sequences" will
be meaningless.
an integer vector, with one-based indices into the vocabulary
instances_vocabulary
, wordcounts_texts
,
instance_text
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.