A python package to run contextualized topic modeling. CTMs combine contextualized embeddings (e.g., BERT) with topic models to get coherent topics. Published at EACL and ACL 2021.
Add a new parameter alias type2score which can be used to set the score dictionary for both corpora at the same time in a WeightedAvgShift. Specifying a single dictionary using only type2score_1 is already possible, but a parameter type2score would be more natural. Just have to check if type2score is None, and if not, set type2score_1 as type2score. Existing code should then handle
This is a designed package for replicating the estimates and findings in the article of Factionalism and the Red Guards under Mao's China: Ideal Point Estimation Using Text Data.
From using xpdf, rvest, and quanteda on United Nations Digital Library search results to applying dictionaries to speeches in United Nations meeting records
A small showcase for topic modeling with the tmtoolkit Python package. I use a corpus of articles from the German online news website Spiegel Online (SPON) to create a topic model for before and during the COVID-19 pandemic.
Add a new parameter alias
type2scorewhich can be used to set the score dictionary for both corpora at the same time in aWeightedAvgShift. Specifying a single dictionary using onlytype2score_1is already possible, but a parametertype2scorewould be more natural. Just have to check iftype2scoreisNone, and if not, settype2score_1astype2score. Existing code should then handle