示例#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)
    utilities.deletefromdict(dict)
示例#2
0
 def __init__(self, debug):
     print ('analyze test preparation...')
     self.util = util.util(debug)
     self.analyze = analyze.analyze(debug)
     self.test_dict = self.create_test_dict()
     self.dict_analysis = self.analyze.prepare_test_analysis(self.test_dict)
     self.test_analyze_get_match()
     print ('analyze tests run successful.')
示例#3
0
def show_dict_analysis(debug):
    print("dictionary analysis:")
    utilities = util.util(debug, None)
    analysis = utilities.compile_analysis(utilities.getDICT())
    for id in analysis:
        print(id)
        for k, v in analysis[id].iteritems():
            print(' ' + str(k) + ' ' + str(v))
示例#4
0
 def __init__(self, debug, cfg):
     print ('analyze test preparation...')
     self.cfg = cfg
     self.util = util.util(debug, cfg.getfloatoption('characteristic', 'PEAK_FACTOR'))
     self.analyze = analyze.analyze(cfg)
     self.test_dict = self.create_test_dict()
     self.dict_analysis = self.analyze.prepare_test_analysis(self.test_dict)
     self.test_analyze_get_match()
     print ('analyze tests run successful.')
 def __init__(self, debug, cfg):
     print ('filter test preparation...')
     self.util = util.util(debug, cfg.getfloatoption('characteristic', 'PEAK_FACTOR'))
     cfg.setoption('stream', 'CHUNKS', '10')
     self.filter = filter.filtering(cfg)
     self.CHUNKS = 10
     self.test_filter_n_shift()
     print ('filter tests run successful.')
     self.filter.stop()
示例#6
0
 def __init__(self, debug):
     print('filter test preparation...')
     self.util = util.util(debug)
     hatched = hatch.hatch()
     hatched.add("debug", debug)
     logger = log.log(debug, False)
     hatched.add("logger", logger)
     self.filter = filter.filtering(hatched)
     config.CHUNKS = 10
     self.test_filter_n_shift()
     print('filter tests run successful.')
     self.filter.stop()
示例#7
0
def unit_tests(debug):
    print("starting unit tests...")
    utilities = util.util(debug)
    tests.unit_tests(debug)
    print("done.")
示例#8
0
def show_dict_analysis(debug):
    print("dictionary analysis:")
    utilities = util.util(debug)
    print(utilities.compile_analysis(utilities.getDICT()))
示例#9
0
def show_dict_ids(debug):
    print("current entries in dictionary:")
    utilities = util.util(debug)
    utilities.showdictentriesbyid()
示例#10
0
def show_word_entries(dict, debug):
    print(dict + " entries in dictionary:")
    print
    utilities = util.util(debug)
    utilities.showdictentry(dict)
示例#11
0
def recreate_dict(debug):
    print("recreating dictionary from raw input files...")
    utilities = util.util(debug)
    utilities.recreate_dict_from_raw_files()
示例#12
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()