import wikipage import random ### an abstract class that all scorers must subclass from. class scorer : def score(self, page) : raise NotImplementedError class randomScorer(scorer) : def score(self, page) : return random.random() ### you add KeywordScorer and TFIDFScorer