Are there any R packages or published code on topi

2020-07-27 03:57发布

问题:

I am trying to perform topic modeling on a data set of political speeches that spans 2 centuries, and would ideally like to use a topic model that accounts for time, such as Topics over Time (McCallum and Wang 2006) or the Dynamic Topic model (Blei and Lafferty 2006).

However, given that I am not an experienced coder, the help of an R package or some sample code implementing either of these topic models would really help.

Does anyone know if such packages or published code exists for R?

I have searched extensively and have also considered the Structural Topics Model, but I am unsure if this would be the way to go.

Thank you very much in advance.

回答1:

It sounds like you need Structural Topic Models that can be easily implemented in R package stm. Here is an example of implementation of this framework on political data that take time information into account. More detailed knowledge on the package and the algorithm can be found in their vignette.