Davlan commited on
Commit
5894aff
1 Parent(s): 19e15ac

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Hugging Face's logo
2
+ ---
3
+ language:
4
+ - amh
5
+ - hau
6
+ - ibo
7
+ - kin
8
+ - lug
9
+ - luo
10
+ - pcm
11
+ - swa
12
+ - wol
13
+ - yor
14
+ - multilingual
15
+
16
+
17
+ datasets:
18
+ - masakhaner
19
+ ---
20
+ # xlm-roberta-base-masakhaner
21
+ ## Model description
22
+ **xlm-roberta-base-masakhaner** is the first **Named Entity Recognition** model for 10 African languages (Amharic, Hausa, Igbo, Kinyarwanda, Luganda, Nigerian Pidgin, Swahili, Wolof, and Yorùbá) based on a fine-tuned XLM-RoBERTa large model. It achieves the **state-of-the-art performance** for the NER task. It has been trained to recognize four types of entities: dates & times (DATE), location (LOC), organizations (ORG), and person (PER).
23
+ Specifically, this model is a *xlm-roberta-large* model that was fine-tuned on an aggregation of African language datasets obtained from Masakhane [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) dataset.
24
+ ## Intended uses & limitations
25
+ #### How to use
26
+ You can use this model with Transformers *pipeline* for NER.
27
+ ```python
28
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
29
+ from transformers import pipeline
30
+ tokenizer = AutoTokenizer.from_pretrained("Davlan/xlm-roberta-base-masakhaner")
31
+ model = AutoModelForTokenClassification.from_pretrained("Davlan/xlm-roberta-base-masakhaner")
32
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
33
+ example = "Emir of Kano turban Zhang wey don spend 18 years for Nigeria"
34
+ ner_results = nlp(example)
35
+ print(ner_results)
36
+ ```
37
+ #### Limitations and bias
38
+ 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.
39
+ ## Training data
40
+ 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
41
+
42
+ 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:
43
+ Abbreviation|Description
44
+ -|-
45
+ O|Outside of a named entity
46
+ B-DATE |Beginning of a DATE entity right after another DATE entity
47
+ I-DATE |DATE entity
48
+ B-PER |Beginning of a person’s name right after another person’s name
49
+ I-PER |Person’s name
50
+ B-ORG |Beginning of an organisation right after another organisation
51
+ I-ORG |Organisation
52
+ B-LOC |Beginning of a location right after another location
53
+ I-LOC |Location
54
+ ## Training procedure
55
+ 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.
56
+
57
+
58
+ ### BibTeX entry and citation info
59
+ ```
60
+ @article{adelani21tacl,
61
+ title = {Masakha{NER}: Named Entity Recognition for African Languages},
62
+ author = {David Ifeoluwa Adelani and Jade Abbott and Graham Neubig and Daniel D'souza and Julia Kreutzer and Constantine Lignos and Chester Palen-Michel and Happy Buzaaba and Shruti Rijhwani and Sebastian Ruder and Stephen Mayhew and Israel Abebe Azime and Shamsuddeen Muhammad and Chris Chinenye Emezue and Joyce Nakatumba-Nabende and Perez Ogayo and Anuoluwapo Aremu and Catherine Gitau and Derguene Mbaye and Jesujoba Alabi and Seid Muhie Yimam and Tajuddeen Gwadabe and Ignatius Ezeani and Rubungo Andre Niyongabo and Jonathan Mukiibi and Verrah Otiende and Iroro Orife and Davis David and Samba Ngom and Tosin Adewumi and Paul Rayson and Mofetoluwa Adeyemi and Gerald Muriuki and Emmanuel Anebi and Chiamaka Chukwuneke and Nkiruka Odu and Eric Peter Wairagala and Samuel Oyerinde and Clemencia Siro and Tobius Saul Bateesa and Temilola Oloyede and Yvonne Wambui and Victor Akinode and Deborah Nabagereka and Maurice Katusiime and Ayodele Awokoya and Mouhamadane MBOUP and Dibora Gebreyohannes and Henok Tilaye and Kelechi Nwaike and Degaga Wolde and Abdoulaye Faye and Blessing Sibanda and Orevaoghene Ahia and Bonaventure F. P. Dossou and Kelechi Ogueji and Thierno Ibrahima DIOP and Abdoulaye Diallo and Adewale Akinfaderin and Tendai Marengereke and Salomey Osei},
63
+ journal = {Transactions of the Association for Computational Linguistics (TACL)},
64
+ month = {},
65
+ url = {https://arxiv.org/abs/2103.11811},
66
+ year = {2021}
67
+ }
68
+ ```
69
+
70
+