last_row.append(pairs[key]) grand_total += pairs[key] if not header_done: header.append(other) last_one = one # if pairs[key] > 0 and one != other: # pair_str = " {}:{}".format(key, pairs[key]) # output_str += pair_str print("{} Note total: {}".format(label, grand_total)) print("\n".join( [''.join(['{:>4}'.format(item) for item in row]) for row in rows])) print() d_corpus = DCorpus(paths=interp_paths) d_scores = d_corpus.d_score_list() editor = 2 for staff in ['upper', 'lower', 'both']: plural = '' if staff == 'both': plural = 's' score_index = 0 interpolation_pairs = {} interpolation2_pairs = {} annotation_pairs = {} for d_score in d_scores: d_score.assert_consistent_abcd(staff=staff) all_annot_ids = range(1, 14) alpha = d_score.nltk_alpha(ids=all_annot_ids, staff=staff) print("Annotate ALL ANNOTS {} staff{} Section {}.1 Alpha: {}".format( staff, plural, score_index + 1, alpha))
interp_agg_pair_counts = { 'full': { 'upper': {}, 'lower': {}, 'both': {} }, 'segregated': { 'upper': {}, 'lower': {}, } } annot_agg_pair_counts = copy.deepcopy(interp_agg_pair_counts) results = [] for da_score in da_corpus.d_score_list(): score_name = da_score.title() print("Title: {}, Total notes: {}".format(score_name, da_score.note_count())) for staff in ('upper', 'both', 'lower'): note_count = da_score.note_count(staff=staff) for ref_id in interpolated: one_id = interpolated[ref_id][ 0] # The zeroth annotator's interpolation of advice from ref_id. other_id = interpolated[ref_id][1] # one_annot = da_score.annotation_by_id(identifier=one_id) # other_annot = da_score.annotation_by_id(identifier=other_id) # ref_annot = da_score.annotation_by_id(identifier=ref_id) # print(ref_annot) # print(one_annot) # print(other_annot)