def preprocessing(): # Get filenames for the thesaurus, the latin text, and greek text thesaurus_filename, Latin_filename, Greek_filename = xls.get_whole_text_comparison_Args() # Read the thesaurus CSV file into a dicitonary object for easy access transDict = ths.build_thesaurus(thesaurus_filename) # Read both the latin text and greek text into a dictionary for easy access Latin_word_num, Latin_search_dict, Latin_text = xls.build_search_dictionary(Latin_filename, "Latin", True) Greek_word_num, Greek_search_dict, Greek_text = xls.build_search_dictionary = (Greek_filename, "Greek", True) return Latin_word_num, Latin_search_dict, Latin_text, Greek_word_num, Greek_search_dict, Greek_text
def preprocessing(): latin_cltk_importer = CorpusImporter('latin') latin_cltk_importer.import_corpus('latin_models_cltk') greek_cltk_importer = CorpusImporter('greek') greek_cltk_importer.import_corpus('greek_models_cltk') # Get filenames for the thesaurus, the latin text, and greek text thesaurus_filename, Greek_filename = xls.get_search_by_phrase_Args() # Read the thesaurus CSV file into a dicitonary object for easy access transDict = ths.build_thesaurus(thesaurus_filename) # Read greek text into a dictionary for easy access Greek_word_num, Greek_search_dict, Greek_text = xls.build_search_dictionary(Greek_filename, "Greek", True) return transDict, Greek_word_num, Greek_search_dict, Greek_text
def process_thesaurus(self, filename): self.thesaurus_ready = False self.transDict = ths.build_thesaurus(filename) self.thesaurus_ready = True