arnolfokam commited on
Commit
c6fc830
1 Parent(s): 3142a1b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -1
README.md CHANGED
@@ -13,4 +13,61 @@ license: apache-2.0
13
  widget:
14
  - text: "Mixed Martial Arts joinbodi, Ultimate Fighting Championship, UFC don decide say dem go enta back di octagon on Saturday, 9 May, for Jacksonville, Florida."
15
  ---
16
- Model description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  widget:
14
  - text: "Mixed Martial Arts joinbodi, Ultimate Fighting Championship, UFC don decide say dem go enta back di octagon on Saturday, 9 May, for Jacksonville, Florida."
15
  ---
16
+
17
+ # Model description
18
+ **mbert-base-uncased-ner-pcm** is a model based on the fine-tuned Multilingual BERT base uncased model, previously fine-tuned for Named Entity Recognition using 10 high-resourced languages. It has been trained to recognize four types of entities:
19
+ - dates & time (DATE)
20
+ - Location (LOC)
21
+ - Organizations (ORG)
22
+ - Person (PER)
23
+
24
+ # Intended Use
25
+ - Intended to be used for research purposes concerning Named Entity Recognition for African Languages.
26
+ - Not intended for practical purposes.
27
+
28
+ # Training Data
29
+ This model was fine-tuned on the Nigerian Pidgin corpus **(pcm)** of the [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) dataset. However, we thresholded the number of entity groups per sentence in this dataset to 10 entity groups.
30
+
31
+ # Training procedure
32
+ This model was trained on a single NVIDIA P5000 from [Paperspace](https://www.paperspace.com)
33
+ #### Hyperparameters
34
+ - **Learning Rate:** 5e-5
35
+ - **Batch Size:** 32
36
+ - **Maximum Sequence Length:** 164
37
+ - **Epochs:** 30
38
+
39
+ # Evaluation Data
40
+ We evaluated this model on the test split of the Swahili corpus **(pcm)** present in the [MasakhaNER](https://github.com/masakhane-io/masakhane-ner) with no thresholding.
41
+
42
+ # Metrics
43
+ - Precision
44
+ - Recall
45
+ - F1-score
46
+
47
+ # Limitations
48
+ - The size of the pre-trained language model prevents its usage in anything other than research.
49
+ - Lack of analysis concerning the bias and fairness in these models may make them dangerous if deployed into production system.
50
+ - The train data is a less populated version of the original dataset in terms of entity groups per sentence. Therefore, this can negatively impact the performance.
51
+
52
+ # Caveats and Recommendations
53
+ - The topics in the dataset corpus are centered around **News**. Future training could be done with a more diverse corpus.
54
+
55
+ # Results
56
+ Model Name| Precision | Recall | F1-score
57
+ -|-|-|-
58
+ **mbert-base-uncased-ner-pcm**| 90.38 | 82.44 | 86.23
59
+
60
+ # Usage
61
+ ```python
62
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
63
+ from transformers import pipeline
64
+
65
+ tokenizer = AutoTokenizer.from_pretrained("arnolfokam/mbert-base-uncased-ner-pcm")
66
+ model = AutoModelForTokenClassification.from_pretrained("mbert-base-uncased-ner-pcm")
67
+
68
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
69
+ example = "Mixed Martial Arts joinbodi, Ultimate Fighting Championship, UFC don decide say dem go enta back di octagon on Saturday, 9 May, for Jacksonville, Florida."
70
+
71
+ ner_results = nlp(example)
72
+ print(ner_results)
73
+ ```