def PrintNonScoredStats():
    if (args.verbose < 1):
        return
    if (num_lines == 0):
        print('modify_ctm_edits.py: processed no input.', file=sys.stderr)
    num_lines_modified = sum(ref_change_stats.values())
    num_incorrect_lines = (num_lines - num_correct_lines)
    percent_lines_incorrect = ('%.2f' % ((num_incorrect_lines * 100.0) / num_lines))
    percent_modified = ('%.2f' % ((num_lines_modified * 100.0) / num_lines))
    if (num_incorrect_lines > 0):
        percent_of_incorrect_modified = ('%.2f' % ((num_lines_modified * 100.0) / num_incorrect_lines))
    else:
        percent_of_incorrect_modified = float('nan')
    print('modify_ctm_edits.py: processed {0} lines of ctm ({1}% of which incorrect), of which {2} were changed fixing the reference for non-scored words ({3}% of lines, or {4}% of incorrect lines)'.format(num_lines, percent_lines_incorrect, num_lines_modified, percent_modified, percent_of_incorrect_modified), file=sys.stderr)
    keys = sorted(ref_change_stats.keys(), reverse=True, key=(lambda x: ref_change_stats[x]))
    num_keys_to_print = (40 if (args.verbose >= 2) else 10)
    print(((('modify_ctm_edits.py: most common edits (as percentages of all such edits) are:\n' + '\n'.join([('%s [%.2f%%]' % (k, ((ref_change_stats[k] * 100.0) / num_lines_modified))) for k in keys[0:num_keys_to_print]])) + '\n...') if (num_keys_to_print < len(keys)) else ''), file=sys.stderr)
def PrintNonScoredStats():
    if (args.verbose < 1):
        return
    if (num_lines == 0):
        print('modify_ctm_edits.py: processed no input.', file=sys.stderr)
    num_lines_modified = sum(ref_change_stats.values())
    num_incorrect_lines = (num_lines - num_correct_lines)
    percent_lines_incorrect = ('%.2f' % ((num_incorrect_lines * 100.0) / num_lines))
    percent_modified = ('%.2f' % ((num_lines_modified * 100.0) / num_lines))
    if (num_incorrect_lines > 0):
        percent_of_incorrect_modified = ('%.2f' % ((num_lines_modified * 100.0) / num_incorrect_lines))
    else:
        percent_of_incorrect_modified = float('nan')
    print('modify_ctm_edits.py: processed {0} lines of ctm ({1}% of which incorrect), of which {2} were changed fixing the reference for non-scored words ({3}% of lines, or {4}% of incorrect lines)'.format(num_lines, percent_lines_incorrect, num_lines_modified, percent_modified, percent_of_incorrect_modified), file=sys.stderr)
    keys = sorted(ref_change_stats.keys(), reverse=True, key=(lambda x: ref_change_stats[x]))
    num_keys_to_print = (40 if (args.verbose >= 2) else 10)
    print(((('modify_ctm_edits.py: most common edits (as percentages of all such edits) are:\n' + '\n'.join([('%s [%.2f%%]' % (k, ((ref_change_stats[k] * 100.0) / num_lines_modified))) for k in keys[0:num_keys_to_print]])) + '\n...') if (num_keys_to_print < len(keys)) else ), file=sys.stderr)