Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- sw
|
4 |
+
license: apache-2.0
|
5 |
+
datasets:
|
6 |
+
- wikiann
|
7 |
+
pipeline_tag: token-classification
|
8 |
+
examples: null
|
9 |
+
widget:
|
10 |
+
- text: Uhuru Kenyatta ni rais wa Kenya.
|
11 |
+
example_title: Sentence_1
|
12 |
+
- text: Tumefanya mabadiliko muhimu za sera zetu za faragha na vidakuzi
|
13 |
+
example_title: Sentence_2
|
14 |
+
metrics:
|
15 |
+
- accuracy
|
16 |
+
- f1
|
17 |
+
- precision
|
18 |
+
- recall
|
19 |
+
library_name: transformers
|
20 |
+
---
|
21 |
+
|
22 |
+
|
23 |
+
## Intended uses & limitations
|
24 |
+
|
25 |
+
#### How to use
|
26 |
+
|
27 |
+
You can use this model with Transformers *pipeline* for NER.
|
28 |
+
|
29 |
+
```python
|
30 |
+
from transformers import pipeline
|
31 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
32 |
+
|
33 |
+
tokenizer = AutoTokenizer.from_pretrained("eolang/Swahili-NER-BertBase-Cased")
|
34 |
+
model = AutoModelForTokenClassification.from_pretrained("eolang/Swahili-NER-BertBase-Cased")
|
35 |
+
|
36 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
37 |
+
example = "Kwa nini Kenya inageukia mazao ya GMO kukabiliana na ukame"
|
38 |
+
|
39 |
+
ner_results = nlp(example)
|
40 |
+
print(ner_results)
|
41 |
+
```
|
42 |
+
|
43 |
+
## Training data
|
44 |
+
|
45 |
+
This model was fine-tuned on the Swahili Version of the WikiAnn dataset for cross-lingual name tagging and linking based on Wikipedia articles in 295 languages
|
46 |
+
|
47 |
+
|
48 |
+
## Training procedure
|
49 |
+
|
50 |
+
This model was trained on a single NVIDIA A 5000 GPU with recommended hyperparameters from the [original BERT paper](https://arxiv.org/pdf/1810.04805) which trained & evaluated the model on CoNLL-2003 NER task.
|