Exemple #1
0
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)
Exemple #2
0
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)))
Exemple #3
0
 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)
Exemple #4
0
def show_dict_ids(debug):
    print("current entries in dictionary:")
    utilities = util.Util(debug, None)
    utilities.show_dict_entries_by_id()
Exemple #5
0
def show_word_entries(dict, debug):
    print((dict + " entries in dictionary:"))
    print()
    utilities = util.Util(debug, None)
    utilities.show_dict_entry(dict)
Exemple #6
0
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()