File size: 2,421 Bytes
e3fe905
 
506af3f
 
 
 
 
 
 
 
 
 
 
bd1e5e1
 
 
e3fe905
 
506af3f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2dc32f6
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
library_name: transformers
datasets:
- rasyosef/amharic-named-entity-recognition
language:
- am
metrics:
- precision
- recall
- f1
pipeline_tag: token-classification
widget:
- text: "አትሌት ኃይሌ ገ/ሥላሴ ኒውዮርክ ውስጥ በሚደረገው የተባበሩት መንግሥታት ድርጅት ልዩ የሰላም ስብሰባ ላይ እንዲገኝ ተጋበዘ።"
  example_title: "Example 1"
- text: "በአዲስ አበባ ዩኒቨርስቲ በሜካኒካል ምህንድስና ትምህርት ክፍል ውስጥ መምህርት የሆነችው እና ከቡድኑ ጋር ወደ ባህር ዳር የተጓዘችው ምህረት ከበደ ፤ተማሪዎቹ ፈጠራውን የሰሩት በአካባቢያቸው ከሚገኙ ቅሳቁሶች ሲሆን፤ መነሻቸውም በአካባቢያቸው የተመለከቱት ችግር መሆኑን ታስረዳለች።"
  example_title: "Example 2"
---

This is a fine-tuned version of the [bert-medium-amharic](https://huggingface.co/rasyosef/bert-medium-amharic) model on the [amharic-named-entity-recognition](https://huggingface.co/datasets/rasyosef/amharic-named-entity-recognition) dataset and is ready to use for **named entity recognition (NER)**.

It achieves the following results on the evaluation set:

- `Precision:` 0.65
- `Recall:` 0.73
- `F1:` 0.69

## How to use

You can use this model directly with a pipeline for token classification:

```python
from transformers import pipeline
checkpoint = "rasyosef/bert-medium-amharic-finetuned-ner"
token_classifier = pipeline("token-classification", model=checkpoint, aggregation_strategy="simple")
token_classifier("አትሌት ኃይሌ ገ/ሥላሴ ኒውዮርክ ውስጥ በሚደረገው የተባበሩት መንግሥታት ድርጅት ልዩ የሰላም ስብሰባ ላይ እንዲገኝ ተጋበዘ።")
```

Output:
```python
[{'entity_group': 'TTL',
  'score': 0.9841112,
  'word': 'አትሌት',
  'start': 0,
  'end': 4},
 {'entity_group': 'PER',
  'score': 0.99379075,
  'word': 'ኃይሌ ገ / ሥላሴ',
  'start': 5,
  'end': 14},
 {'entity_group': 'LOC',
  'score': 0.8818362,
  'word': 'ኒውዮርክ',
  'start': 15,
  'end': 20},
 {'entity_group': 'ORG',
  'score': 0.99056435,
  'word': 'የተባበሩት መንግሥታት ድርጅት',
  'start': 32,
  'end': 50}]
```

## Code

https://github.com/rasyosef/amharic-named-entity-recognition