instances_vocabulary: Retrieve the vocabulary from the instances

instances_vocabularyR Documentation

Retrieve the vocabulary from the instances

Description

Retrieves a list of feature types (the "vocabulary") from an InstanceList reference.

Usage

instances_vocabulary(instances, newlines_significant = FALSE)

Arguments

instances

reference to the InstanceList

newlines_significant

if vocabulary words include newlines, a slower method of extracting the vocabulary will be used (unusual for DfR)

Details

If you have the topic model trainer object, the vocabulary is retrievable more quickly with an RTopicModel method: trainer$getVocabulary(). But every InstanceList knows its vocabulary.

Value

character vector mapping one-based word indices to words as strings


agoldst/dfrtopics documentation built on July 15, 2022, 4:13 p.m.