EvanD's picture
Update README.md
fd5fcb6
|
raw
history blame
903 Bytes
metadata
pipeline_tag: token-classification
tags:
  - named-entity-recognition
  - sequence-tagger-model
widget:
  - text: Мене звуть Амадей Вольфганг, я живу в Берліні
inference:
  parameters:
    aggregation_strategy: simple
    grouped_entities: true
language:
  - uk

xlm-roberta model trained on ukrainian ner dataset

from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import pipeline

tokenizer = AutoTokenizer.from_pretrained("EvanD/xlm-roberta-base-ukrainian-ner-ukrner")
ner_model = AutoModelForTokenClassification.from_pretrained("EvanD/xlm-roberta-base-ukrainian-ner-ukrner")

nlp = pipeline("ner", model=ner_model, tokenizer=tokenizer, aggregation_strategy="simple")
example = "Мене звуть Амадей Вольфганг, я живу в Берліні"

ner_results = nlp(example)
print(ner_results)