if I try to execude your code (e.g. with the data from Laptop Review) I get the following error:
span_dict[(span[0], span[1])] = span[2]
IndexError: string index out of range
# get true labels
lbs = span_to_label(span_list_to_dict(data['label']), sent_tks)
lbs_list.append(lbs)
# get lf annotations (weak labels) in one-hot format tensor
w_lbs = [span_to_label(span_list_to_dict(data['weak_labels'][lf_idx]), sent_tks) for lf_idx in lf_rec_ids]
It tries to parses spans here, but in fact, there are no spans, but single labels.
Maybe I am also mistaken - could you elaborate on this and provide some help?