示例#1
0
文件: run.py 项目: madlib/testsuite
def dict_by_dict(r, dict, table):
    total_words = []
    for key, value in dict.iteritems():
        total_words += utility.get_file_words(value.split('\n'))
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, table + '.dict')
    return dict
示例#2
0
文件: run.py 项目: Liuzeng/testsuite
def dict_by_dict(r, dict, table):
    total_words = []
    for key, value in dict.iteritems():
        total_words += utility.get_file_words(value.split('\n'))
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, table + '.dict')
    return dict
示例#3
0
文件: run.py 项目: madlib/testsuite
def dict_by_file(r, table, parse_method=None):
    file_path_list, file_name_list = utility.get_file_list(r)
    total_words = []
    for file_path in file_path_list:
        if file_path.startswith('all'):
            total_words += open(file_path, 'r').readlines()
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, r.split('/')[-1] + '.dict')
    return dict
示例#4
0
文件: run.py 项目: madlib/testsuite
def dict_by_text(r, table, parse_method=None):
    file_path_list, file_name_list = utility.get_file_list(r)
    total_words = []
    for file_path in file_path_list:
        lines = parse_method(file_path)
        total_words += utility.get_file_words(lines)
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, table + '.dict')
    return dict
示例#5
0
文件: run.py 项目: Liuzeng/testsuite
def dict_by_file(r, table, parse_method = None):
    file_path_list, file_name_list = utility.get_file_list(r)
    total_words = []
    for file_path in file_path_list:
        if file_path.startswith('all'):
            total_words += open(file_path, 'r').readlines()
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, r.split('/')[-1] + '.dict')
    return dict
示例#6
0
文件: run.py 项目: Liuzeng/testsuite
def dict_by_text(r, table, parse_method = None):
    file_path_list, file_name_list = utility.get_file_list(r)
    total_words = []
    for file_path in file_path_list:
        lines = parse_method(file_path)
        total_words += utility.get_file_words(lines)
    dict = utility.unique(total_words)
    utility.write_dict_file(dict, table + '.dict')
    return dict