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