为 STM 的每个主题绘制超过 3 个单词?

Plot more than 3 words per topic for STM?

是否可以使用 STM 包为每个主题绘制 3 个以上的单词?

topic.count <- 10
model.stm <- stm(stm_1$documents, stm_1$vocab, K = topic.count, data = stm_1$meta, 
init.type = "Spectral") 

使用“plot, type = “summary”,我在情节中每个主题得到 3 个词

plot(model.stm, type = "summary", text.cex = 1)

使用“labelTopics”,我在“最高概率”下得到每个主题 7 个单词的列表

labelTopics(model.stm)

有没有办法绘制 4 或 5 个单词,而不是像下面的代码那样使用默认的 3 个单词?

plot(model.stm, type = "summary", text.cex = 1)

是 - 通过设置 n。示例:

library("stm")
## stm v1.3.6 successfully loaded. See ?stm for help. 
##  Papers, resources, and other materials at structuraltopicmodel.com

plot(gadarianFit, type = "summary", text.cex = 0.9, n = 5)