def delete_word(dict, debug): if dict != "*": print(("deleting " + dict + " from dictionary")) else: print("deleting all enttries from dictionary") utilities = util.Util(debug, None) utilities.delete_from_dict(dict)
def show_dict_analysis(debug): print("dictionary analysis:") utilities = util.Util(debug, None) analysis = utilities.compile_analysis(utilities.get_dict()) for _id in analysis: print(_id) for k, v in analysis[_id].items(): print((' ' + str(k) + ' ' + str(v)))
def setUpClass(cls): cfg = sopare.config.Config() cls.cfg = cfg cls.util = util.Util( True, cfg.getfloatoption('characteristic', 'PEAK_FACTOR')) cls.analyze = analyze.Analyze(cfg) # FIXME: fix path generation and add stateless loader cls.test_dict = cls.util.get_dict('test/files/test_dict.json') cls.dict_analysis = cls.analyze.prepare_test_analysis(cls.test_dict)
def show_dict_ids(debug): print("current entries in dictionary:") utilities = util.Util(debug, None) utilities.show_dict_entries_by_id()
def show_word_entries(dict, debug): print((dict + " entries in dictionary:")) print() utilities = util.Util(debug, None) utilities.show_dict_entry(dict)
def recreate_dict(debug, cfg): print("recreating dictionary from raw input files...") utilities = util.Util(debug, cfg.getfloatoption('characteristic', 'PEAK_FACTOR')) utilities.recreate_dict_from_raw_files()