added topmod. function to use with topicmodels package (instead of lda package)