@@ -0,0 +1,904 @@
+__author__ = 's7a'%0A%0A%0A# The Kucera Francis class%0Aclass KuceraFrancis:%0A%0A    # Constructor for the Kucera Francis class%0A    def __init__(self, dict_file):%0A        dict = open(dict_file, 'r')%0A%0A        # Construct the Kucera Francis frequency dictionary%0A        self.kucera_francis_frequency = %7B%7D%0A%0A        for line in dict.readlines():%0A            cols = line.split(';')%0A            self.kucera_francis_frequency%5Bcols%5B0%5D%5D = int(cols%5B1%5D)%0A%0A    # Get the Kucera Francis frequency for a word%0A    def frequency(self, word):%0A        if word in self.kucera_francis_frequency:%0A            return self.kucera_francis_frequency%5Bword%5D%0A        else:%0A            return 0%0A%0A    # Get the word with maximum Kucera Francis frequency%0A    def maximum(self, words):%0A        result = ''%0A%0A        for word in words:%0A            if self.frequency(word) %3E self.frequency(result):%0A                result = word%0A%0A        return result

Add the Kucera Francis library