class FacebookClassifier: def __init__(self): self.facebook_search = FacebookSearch() def classify(self, term): cnt = self.facebook_search.search_Facebook(term) matches = dict() for i in range(len(categories)): matches[categories[i]] = cnt[i] return ClassificationResult(term, matches) def shutdown(self): self.facebook_search.shutdown()
def __init__(self): self.facebook_search = FacebookSearch()