flair icon indicating copy to clipboard operation
flair copied to clipboard

How to Rename Labels in a Flair Dataset?[Question]:

Open DonaldFeuz opened this issue 1 year ago • 1 comments

Question

Hello,

I want to fine-tune HunFlair-Gene on the JNLPBA dataset, but I am getting mostly null scores during training.

I believe this is because the dataset does not contain gene mentions but rather mentions of proteins and other labels. I tested my code on a dataset that contains only gene labels (BC2GM) and obtained good results.

To solve my problem, I tried loading the JNLPBA dataset from flair.datasets using:

from flair.datasets import JNLPBA

Load the JNLPBA dataset

jnlpba_dataset = JNLPBA()

Then, I attempted to rename the protein labels to "Gene" and remove the other labels, but it appears that Flair does not provide the ability to rename labels in a dataset.

How can I work with JNLPBA to compare my scores with those of HunFlair?

DonaldFeuz avatar Jun 17 '24 11:06 DonaldFeuz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 04:04 stale[bot]