Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add weak span based f1 metric #32

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Bhuvanesh-Verma
Copy link
Collaborator

@Bhuvanesh-Verma Bhuvanesh-Verma commented Sep 19, 2022

This PR adds SpanBasedF1WeakMeasure metric. The SpanBasedF1WeakMeasure implements span-based precision, recall and F1 measure for different tagging (encoding) schemes. A span can either have exact match (strict) or it can be partially overlapped (weak) with predicted span. This metric allows both strict and weak version with the help of a boolean parameter weak. The concept of weak and strict span overlap is described in Lauscher et al. (2018).

This metric can handle multiple encoding schemes (available here) using a parameter called label_encoding. Finally, this metric can retrieve not only the F1 measure but precision and recall as well. Using a parameter called return_metric, we can specify if we want the metric for each tag or averaged over all tags.

@Bhuvanesh-Verma Bhuvanesh-Verma changed the title [WIP] add weak span based f1 metric add weak span based f1 metric Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant