Beispiel #1
0
 def topicModelLSI(self,twits, keyword):
     '''
     irrespc of collection fetch the pratenId=1 tweets and merge them together with the curreent tweets from twitter AJX call
     then run topic modeling 
     '''
     topicModelObj = topicModel.topicModel(twits)
     dictionary = topicModelObj.createDictionary(keyword)
     corpus = []
     for vector in topicModelObj:
         corpus.append(vector)
     #print(corpus)
     return topicModelObj.createLSIModel(corpus,'',keyword)
Beispiel #2
0
 def topicModelLSI(self,twits, keyword):
     '''
     irrespc of collection fetch the pratenId=1 tweets and merge them together with the curreent tweets from twitter AJX call
     then run topic modeling 
     '''
     topicModelObj = topicModel.topicModel(twits)
     dictionary = topicModelObj.createDictionary(keyword)
     corpus = []
     for vector in topicModelObj:
         corpus.append(vector)
     if len(corpus):
         return topicModelObj.createLSIModel(corpus,'',keyword)
     else:
         return 0
Beispiel #3
0
 def posAnalysis(self, twits):
     topicModelObj = topicModel.topicModel(twits)
     topicModelObj.tryPos()
Beispiel #4
0
 def posAnalysis(self, twits):
     topicModelObj = topicModel.topicModel(twits)
     topicModelObj.tryPos()