Open SPVillacorta opened 1 year ago
I'm having same issue
Sorry for the late reply! @SPVillacorta did you solve the problem? If not, could you share a snippet of the dataset you are loading?
@nvenkat94 could you expand on your problem?
ok the "train.conll" looks like the following:
matching O i.e. O presumably O from O Mamba O These O since O prospectivity I-PROCESS fibrous O base O ore O the O 20 O based O Andy O simply O martite B-MINERAL Bungaroo B-PLACE The O on O between O 250 O the O The O the O below O are O virtually O oxides O skin O Gole O to O all O published O southern O deposits B-ORE_DEPOSIT sorted O
Thanks for your valuable response @alanakbik My issue has been fixed. Earlier my data has "O" before "I-", after revised input data issue has been fixed. @SPVillacorta Input Data has issue with "I-" tag. If there is "I-", Their previous tag should be "B-".
Tag Details: B-: Beginning I- : Intermediate O-: outside
your data should be in following format
`matching O
i.e. O
presumably O
from O
Mamba O
These O
since O
prospectivity B-PROCESS
fibrous O
base O
ore O
the O
20 O
based O
Andy O
simply O
martite B-MINERAL
Bungaroo B-PLACE
`
Thanks for sharing the info! Yes, in IOB2 the first tag should be a B-. @SPVillacorta does this fix your issue?
I just ran into this issue attempting to load training data like so, based on an example I found elsewhere:
from flair.data import Corpus
from flair.datasets import ColumnCorpus
import torch
columns = {0: 'text', 1: 'ner'}
tag_type = 'ner'
corpus = ColumnCorpus('/content/drive/MyDrive/training_data/flair/', columns)
tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type)
print(tag_dictionary)
and then noticed the deprecation message about make_tag_dictionary
being replaced with make_label_dictionary
and so switched to:
tag_dictionary = corpus.make_label_dictionary(label_type=tag_type)
...at which point the data loaded successfully.
The behavior around the deprecated loader and message make it seem as if it still works, especially if you don't check the tag dictionary itself, but it does not appear to do so. Just commenting to flag and in case anyone else comes across this issue, looking to resolve.
Question
Hi Flair Community, I'm attempting to train a NER model using Flair but my BIO-formatted labels are not recognised. I've converted my CSV annotations to CoNLL format and checked for correct loading and this is the code I tried to use:
When executing, the F-score, precision, and recall are all zero. Any ideas on what could be going wrong?