Views
No views yet
Precision: 0.65Recall: 0.73F1: 0.691from transformers import pipeline
2checkpoint = "rasyosef/bert-medium-amharic-finetuned-ner"
3token_classifier = pipeline("token-classification", model=checkpoint, aggregation_strategy="simple")
4token_classifier("አትሌት ኃይሌ ገ/ሥላሴ ኒውዮርክ ውስጥ በሚደረገው የተባበሩት መንግሥታት ድርጅት ልዩ የሰላም ስብሰባ ላይ እንዲገኝ ተጋበዘ።")1[{'entity_group': 'TTL',
2 'score': 0.9841112,
3 'word': 'አትሌት',
4 'start': 0,
5 'end': 4},
6 {'entity_group': 'PER',
7 'score': 0.99379075,
8 'word': 'ኃይሌ ገ / ሥላሴ',
9 'start': 5,
10 'end': 14},
11 {'entity_group': 'LOC',
12 'score': 0.8818362,
13 'word': 'ኒውዮርክ',
14 'start': 15,
15 'end': 20},
16 {'entity_group': 'ORG',
17 'score': 0.99056435,
18 'word': 'የተባበሩት መንግሥታት ድርጅት',
19 'start': 32,
20 'end': 50}]