Skip to content

Commit

Permalink
Update char_frequency_check.py
Browse files Browse the repository at this point in the history
format error,dict should be transform to list
  • Loading branch information
light201212 authored Sep 20, 2019
1 parent 6b15d6a commit 21dec91
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/char_frequency_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def process_dir(label_dir, log=False):

for p in label_paths:
name = p.split('/')[-1].split('.')[0]
chars_count_list, total_chars_count = analyze_labels(p)
chars_count_dict, total_chars_count = analyze_labels(p)
chars_count_list = list(sorted(chars_count_dict.items(), key=lambda x: x[1], reverse=True))
print_info(chars_count_list, total_chars_count, name)

y = list(map(lambda x: x[1], chars_count_list))
Expand Down

0 comments on commit 21dec91

Please sign in to comment.