kbenoit / wordshoal

quanteda implementation of the Lauderdale and Herzog (2016) "Wordshoal" model
13 stars 2 forks source link

Make textmodel fully compatible with quanteda, subset the dataset, add more tests #10

Closed amatsuo closed 6 years ago

amatsuo commented 6 years ago

This PR includes a few things:

  1. The package is more compatible with quanteda 1.0. summary() and print() uses the quanteda internal functions (copied textmodel-methods.R from quanteda) and works roughly the same way as quanteda. Also the output object class is now textmodel_wordshoal (remove _fitted) following the current quanteda convention.
  2. I subset the irish data. The new data only contains 10 debates. The model runs fine with the model.
  3. Add more tests with print/summary methods.
kbenoit commented 6 years ago

Thanks, this looks really good. I updated it a bit to add a package documentation object, but mainly to simply import all quanteda functions, after changing the code in quanteda (v1.0.2) to export the textmodel methods. This is better than copying the code and risking two different sets of general textmodel functions, if we change them in quanteda.