def train_from_human_classification(self, filename, language): 'Method for training current bayesian filter from external human classification file' filehandler = open(filename, 'rb') content = pickle.load(filehandler) for entry_id in content: e = Entry(entry_id, list(content[entry_id])[1], list(content[entry_id])[2]) if e.get_language() == language: self._add_to_human_classification(e, list(content[entry_id])[0]) self.human.store() self.word_dict.store()