This is just a little extension of lda
Reference : https://pypi.python.org/pypi/lda
I create some function for better use , including :
- saveMm -> save matrix of word occurence . Input : ([[0,1,....]...],filename)
- loadMm -> load matrix of word occurence . Input : (filename) , Output: numpy.array([[0,1,...]...])
- saveDict -> save dictionary of word . Input : (['banana','word'....],filename)
- loadDict -> load dictionary of word . Input : (filename) , Output(['banana','word'....])
- saveModel -> save LDA model . Input : (model, filename)
- loadModel -> load LDA model . Input : (filename) , Output(model)
- showTopic -> show topics that trained by lda . Input : (model , dictionary , num=8)
--
I think there would be better way to extend lda module , but I'm not good at this . If you have better way , just clone and modify it , thanks!