topics.per.document: Get the topics per document

Description Usage Arguments Value

Description

Return a data frame containing article ids and topic occurence per document. Topic occurence can either be based on the posterior distrition (default) or based on wordassignments (as.wordassignments = T).

Usage

1
topics.per.document(m, as.wordassignments = F)

Arguments

m

A LDA model from the topicmodels package

as.wordassignments

If True, return the topic occurence per document as the number of words assigned to the topic (instead of the posterior distribution)

Value

A data frame with rows corresponding to the terms in dtm and the statistics in the columns


kasperwelbers/corpus-tools documentation built on May 20, 2019, 7:37 a.m.