def get_num_infos()

in utils/compute_score.py [0:0]


def get_num_infos(target_str, target_char=None):
    '''统计target_char在target_str里面出现的个数'''
    if target_char is None:
        target_char = ['、', ':', ';', ',', '\n']
    num_infos = []
    for sep in target_char:
        num = target_str.count(sep)
        if num > 0:
            num_info = {'sep': sep, 'num': num}
            num_infos.append(num_info)
    num_infos = sorted(num_infos, key=lambda x: x['num'])
    return num_infos