问题
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.
来源:https://stackoverflow.com/questions/43334623/are-there-any-r-packages-or-published-code-on-topic-models-that-account-for-time