sagorsarker commited on
Commit
d83ab1b
1 Parent(s): f17cb95

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +59 -0
README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: bn
3
+ tags:
4
+ - bengali-ner
5
+ - bengali
6
+ - bangla
7
+ - NER
8
+ license: MIT
9
+ datasets:
10
+ - wikiann
11
+ - xtreme
12
+
13
+ ---
14
+
15
+ # Multi-lingual BERT Bengali Name Entity Recognition
16
+ `mBERT-Bengali-NER` is a transformer-based Bengali NER model build with [bert-base-multilingual-uncased](https://huggingface.co/bert-base-multilingual-uncased) model and [Wikiann](https://huggingface.co/datasets/wikiann) Datasets.
17
+
18
+ ## How to Use
19
+
20
+ ```py
21
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
22
+ from transformers import pipeline
23
+
24
+ tokenizer = AutoTokenizer.from_pretrained("sagorsarker/mbert-bengali-ner")
25
+ model = AutoModelForTokenClassification.from_pretrained("sagorsarker/mbert-bengali-ner")
26
+
27
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
28
+ example = "আমি জাহিদ এবং আমি ঢাকায় বাস করি।"
29
+
30
+ ner_results = nlp(example)
31
+ print(ner_results)
32
+ ```
33
+
34
+ ## Label and ID Mapping
35
+
36
+ | Label ID | Label |
37
+ | -------- | ----- |
38
+ |0 | O |
39
+ | 1 | B-PER |
40
+ | 2 | I-PER |
41
+ | 3 | B-ORG|
42
+ | 4 | I-ORG |
43
+ | 5 | B-LOC |
44
+ | 6 | I-LOC |
45
+
46
+ ## Training Details
47
+ - mBERT-Bengali-NER trained with [Wikiann](https://huggingface.co/datasets/wikiann) datasets
48
+ - mBERT-Bengali-NER trained with [transformers-token-classification](https://colab.research.google.com/github/huggingface/notebooks/blob/master/examples/token_classification.ipynb) script
49
+ - mBERT-Bengali-NER total trained 5 epochs.
50
+ - Trained in Kaggle GPU
51
+
52
+ ## Evaluation Results
53
+ |Model | F1 | Precision | Recall | Accuracy | Loss |
54
+ | ---- | --- | --------- | ----- | -------- | --- |
55
+ |Bangla-BERT-NER | 0.97105 | 0.96769| 0.97443 | 0.97682 | 0.12511 |
56
+
57
+
58
+
59
+