@@ -0,0 +1,1092 @@
+from read_file import read_file%0Afrom preprocess_line import preprocess_line%0Afrom count_trigrams import count_trigrams%0Afrom estimate_probs import estimate_probs%0Afrom calc_perplexity import calc_perplexity%0A%0A%0Aclass Tester(object):%0A%0A    def __init__(self, training_data_file)%0A%0A        self.train_file_str = ''%0A        self.test_file_str = ''%0A%0A        self.train_pfs = ''%0A        self.test_pfs = ''%0A%0A        self.train_counts = %7B%7D%0A        self.test_counts = %7B%7D%0A%0A        self.train_probs = %7B%7D%0A%0A        self.test_perplex = None%0A%0A%0A    def build_model(self, training_data_file):%0A%0A        self.train_file_str = read_file(training_data_file)%0A%0A        self.train_pfs = preprocess_line(self.train_file_str)%0A%0A        self.train_counts = count_trigrams(self.train_pfs)%0A%0A        self.train_probs = estimate_probs(self.train_counts)%0A%0A%0A    def test(self, test_data_file):%0A%0A        self.test_file_str = read_file(test_data_file)%0A%0A        self.test_pfs = preprocess_line(self.test_file_str)%0A%0A        self.test_counts = count_trigrams(self.test_pfs)%0A%0A        self.test_perplex = calc_perplexity(self.test_counts)%0A

Work in progress Tester class.