Davlan commited on
Commit
e6c16dc
1 Parent(s): 4472fb6

add afroxlmr-large-ner

Browse files
Files changed (1) hide show
  1. README.md +102 -0
README.md CHANGED
@@ -1,3 +1,105 @@
1
  ---
2
  license: afl-3.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: afl-3.0
3
  ---
4
+ language:
5
+ - am
6
+ - bm
7
+ - obj
8
+ - ee
9
+ - fon
10
+ - ha
11
+ - ig
12
+ - rw
13
+ - lg
14
+ - luo
15
+ - mos
16
+ - ny
17
+ - pcm
18
+ - sn
19
+ - sw
20
+ - tn
21
+ - tw
22
+ - wo
23
+ - xh
24
+ - yo
25
+ - zu
26
+ - multilingual
27
+
28
+
29
+ datasets:
30
+ - masakhaner2
31
+ ---
32
+ # masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0
33
+ ## Model description
34
+ **masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0** is a **Named Entity Recognition (NER) ** model for 21 African languages. Specifically, this model is a *Davlan/afro-xlmr-large* model that was fine-tuned on an aggregation of African language datasets obtained from two versions of MasakhaNER dataset i.e. [MasakhaNER 1.0](https://huggingface.co/datasets/masakhaner) and [MasakhaNER 2.0](https://huggingface.co/datasets/masakhane/masakhaner2). The languages covered are:
35
+
36
+ Amharic (Amharic)
37
+ Bambara (bam)
38
+ Ghomala (bbj)
39
+ Ewe (ewe)
40
+ Fon (fon)
41
+ Hausa (hau)
42
+ Igbo (ibo)
43
+ Kinyarwanda (kin)
44
+ Luganda (lug)
45
+ Dholuo (luo)
46
+ Mossi (mos)
47
+ Chichewa (nya)
48
+ Nigerian Pidgin
49
+ chShona (sna)
50
+ Kiswahili (swą)
51
+ Setswana (tsn)
52
+ Twi (twi)
53
+ Wolof (wol)
54
+ isiXhosa (xho)
55
+ Yorùbá (yor)
56
+ isiZulu (zul)
57
+
58
+ It has been trained to recognize four types of entities: dates & times (DATE), location (LOC), organization (ORG), and person (PER).
59
+
60
+ ## Intended uses & limitations
61
+ #### How to use
62
+ You can use this model with Transformers *pipeline* for NER.
63
+ ```python
64
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
65
+ from transformers import pipeline
66
+ tokenizer = AutoTokenizer.from_pretrained("masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0")
67
+ model = AutoModelForTokenClassification.from_pretrained("masakhane/afroxlmr-large-ner-masakhaner-1.0_2.0")
68
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
69
+ example = "Emir of Kano turban Zhang wey don spend 18 years for Nigeria"
70
+ ner_results = nlp(example)
71
+ print(ner_results)
72
+ ```
73
+ #### Limitations and bias
74
+ This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains.
75
+ ## Training data
76
+ This model was fine-tuned on 10 African NER datasets (Amharic, Hausa, Igbo, Kinyarwanda, Luganda, Nigerian Pidgin, Swahili, Wolof, and Yorùbá) Masakhane [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) dataset
77
+
78
+ The training dataset distinguishes between the beginning and continuation of an entity so that if there are back-to-back entities of the same type, the model can output where the second entity begins. As in the dataset, each token will be classified as one of the following classes:
79
+ Abbreviation|Description
80
+ -|-
81
+ O|Outside of a named entity
82
+ B-DATE |Beginning of a DATE entity right after another DATE entity
83
+ I-DATE |DATE entity
84
+ B-PER |Beginning of a person’s name right after another person’s name
85
+ I-PER |Person’s name
86
+ B-ORG |Beginning of an organisation right after another organisation
87
+ I-ORG |Organisation
88
+ B-LOC |Beginning of a location right after another location
89
+ I-LOC |Location
90
+ ## Training procedure
91
+ This model was trained on a single NVIDIA V100 GPU with recommended hyperparameters from the [original MasakhaNER paper](https://arxiv.org/abs/2103.11811) which trained & evaluated the model on MasakhaNER corpus.
92
+
93
+
94
+ ### BibTeX entry and citation info
95
+ ```
96
+ @article{Adelani2022MasakhaNER2A,
97
+ title={MasakhaNER 2.0: Africa-centric Transfer Learning for Named Entity Recognition},
98
+ author={David Ifeoluwa Adelani and Graham Neubig and Sebastian Ruder and Shruti Rijhwani and Michael Beukman and Chester Palen-Michel and Constantine Lignos and Jesujoba Oluwadara Alabi and Shamsuddeen Hassan Muhammad and Peter Nabende and Cheikh M. Bamba Dione and Andiswa Bukula and Rooweither Mabuya and Bonaventure F. P. Dossou and Blessing K. Sibanda and Happy Buzaaba and Jonathan Mukiibi and Godson Kalipe and Derguene Mbaye and Amelia Taylor and Fatoumata Kabore and Chris C. Emezue and Anuoluwapo Aremu and Perez Ogayo and Catherine W. Gitau and Edwin Munkoh-Buabeng and Victoire Memdjokam Koagne and Allahsera Auguste Tapo and Tebogo Macucwa and Vukosi Marivate and Elvis Mboning and Tajuddeen R. Gwadabe and Tosin P. Adewumi and Orevaoghene Ahia and Joyce Nakatumba-Nabende and Neo L. Mokono and Ignatius M Ezeani and Chiamaka Ijeoma Chukwuneke and Mofetoluwa Adeyemi and Gilles Hacheme and Idris Abdulmumin and Odunayo Ogundepo and Oreen Yousuf and Tatiana Moteu Ngoli and Dietrich Klakow},
99
+ journal={ArXiv},
100
+ year={2022},
101
+ volume={abs/2210.12391}
102
+ }
103
+ ```
104
+
105
+