NorskRegnesentral / skweak

skweak: A software toolkit for weak supervision applied to NLP tasks
MIT License
917 stars 71 forks source link

How to use prefix ner tags with skweak aggregation.HMM #86

Open javinator48 opened 5 months ago

javinator48 commented 5 months ago

Currently I am trying to apply aggregation.HMM on pretrained hugging face models on the wikineural dataset( https://huggingface.co/datasets/Babelscape/wikineural) and I have these tags ['O', 'B-PER', 'I-PER', 'B-ORG', 'I-ORG', 'B-LOC', 'I-LOC', 'B-MISC', 'I-MISC']. However I get an error RuntimeError: Initial labels should not have a prefix. How can I handle these type of tags? Screenshot from 2024-04-02 22-48-18

javinator48 commented 5 months ago

Here is the error message Screenshot from 2024-04-02 22-50-39