File size: 759 Bytes
63ae242 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Fine-tuning bert-base-multilingual-cased on Wikiann dataset for performing NER on Marathi language.
Label list: (0), B-PER (1), I-PER (2), B-ORG (3), I-ORG (4), B-LOC (5), I-LOC (6)
How to use the model:
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("lakshaywadhwa1993/ner_marathi_bert")
model = AutoModelForTokenClassification.from_pretrained("lakshaywadhwa1993/ner_marathi_bert")
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
example = ["राज्यसभा","निवडणुकांसाठी","मुंबईत","भाजपचे" ,"चिंचवडचे", "आमदार", "लक्ष्मण", "जगताप"]
results = nlp(example)
results |