def displayTopics(self): """ function to display the current topics list in the combo box. """ self.topicList = classifier.listTopics() self.topicList.remove(classifier.getTopic("General")) topicTitles = [topic.title for topic in self.topicList] self.ui.topicListCombo.clear() self.ui.topicListCombo.addItems(topicTitles)
def reCalculateAllScores(self): """ Function to get all the Unread Articles and calculate their scores under all the topics. """ #get all the topics print "reCalculating All Scores" topicsList = classifier.listTopics() for topic in topicsList: self.reCalculateScores(topic)
def setNewItemScores(self): """ Function to get the New Articles and calculate their scores under all the topics """ #get all the topics topicsList = classifier.listTopics() for topic in topicsList: pri = prioritizer.Prioritizer(topic) scoreItemsList = pri.listScoreItems() scoreItemList = [scoreItem for scoreItem in scoreItemsList if scoreItem.item.age is 0] pri.setScores(scoreItemList) print "calculated New article scores for %s" % topic.title
def displayTopics(self): self.topicList = classifier.listTopics() self.topicList.remove(classifier.getTopic("General")) topicTitles = [topic.title for topic in self.topicList] self.ui.topicList.clear() self.ui.topicList.addItems(topicTitles)
def displayTopics(self): self.topicList = classifier.listTopics() topicTitles = [topic.title for topic in self.topicList] self.ui.comboTopic.clear() self.ui.comboTopic.addItems(topicTitles)