How are metrics calculated and how should the model be used?
#1
by Innovator2K - opened
There are metrics in the model card, but on which set are they calculated?
I want to find names in texts. I've tried the following:
from transformers import pipeline, AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("stepanom/XLMRoberta-base-amazon-massive-NER")
model = AutoModelForTokenClassification.from_pretrained("stepanom/XLMRoberta-base-amazon-massive-NER")
classifier = pipeline("ner", model=model, tokenizer=tokenizer)
print(classifier("Alya told Jasmine that Andrew could pay with cash."))
which prints
[{'entity': 'person', 'score': np.float32(0.9768265), 'index': 4, 'word': '▁Jasmin', 'start': 10, 'end': 16}, {'entity': 'person', 'score': np.float32(0.9794144), 'index': 5, 'word': 'e', 'start': 16, 'end': 17}]
Am I doing anything wrong?