Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metrics/functional/query_span_f1.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def extract_nested_spans(start_preds, end_preds, match_preds, start_label_mask,
match_label_mask = torch.triu(match_label_mask, 0) # start should be less or equal to end
match_preds = match_label_mask & match_preds
match_pos_pairs = np.transpose(np.nonzero(match_preds.numpy())).tolist()
return [(pos[0], pos[1], pseudo_tag) for pos in match_pos_pairs]
return [(pos[1], pos[2], pseudo_tag) for pos in match_pos_pairs]


def extract_flat_spans(start_pred, end_pred, match_pred, label_mask, pseudo_tag = "TAG"):
Expand Down