Esempio n. 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)
Esempio n. 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
Esempio n. 3
0
 def posAnalysis(self, twits):
     topicModelObj = topicModel.topicModel(twits)
     topicModelObj.tryPos()
Esempio n. 4
0
 def posAnalysis(self, twits):
     topicModelObj = topicModel.topicModel(twits)
     topicModelObj.tryPos()