Create Readme file
Browse files
README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
datasets:
|
| 3 |
+
- eriktks/conll2003
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
metrics:
|
| 7 |
+
- seqeval
|
| 8 |
+
base_model:
|
| 9 |
+
- google-bert/bert-base-uncased
|
| 10 |
+
pipeline_tag: text-classification
|
| 11 |
+
library_name: transformers
|
| 12 |
+
tags:
|
| 13 |
+
- ner
|
| 14 |
+
- named-entity-recognition
|
| 15 |
+
- token-classification
|
| 16 |
+
- fine-tuning
|
| 17 |
+
- nlp
|
| 18 |
+
- conll2003
|
| 19 |
+
- bert
|
| 20 |
+
---
|
| 21 |
+
# π§ BERT NER β Fine-tuned Named Entity Recognition Model
|
| 22 |
+
**Model:** `ELHACHYMI/bert-ner`
|
| 23 |
+
**Base model:** `bert-base-uncased`
|
| 24 |
+
**Task:** Token Classification β Named Entity Recognition (NER)
|
| 25 |
+
**Dataset:** CoNLL-2003 (English)
|
| 26 |
+
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
## π Model Overview
|
| 30 |
+
|
| 31 |
+
This model is a fine-tuned version of **BERT Base Uncased** on the **CoNLL-2003 Named Entity Recognition (NER)** dataset.
|
| 32 |
+
It predicts the following entity types:
|
| 33 |
+
|
| 34 |
+
- **PER** β Person
|
| 35 |
+
- **ORG** β Organization
|
| 36 |
+
- **LOC** β Location
|
| 37 |
+
- **MISC** β Miscellaneous
|
| 38 |
+
- **O** β Outside any entity
|
| 39 |
+
|
| 40 |
+
The model is suitable for **information extraction**, **document understanding**, **chatbot entity detection**, and **structured text processing**.
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## ποΈ Labels
|
| 45 |
+
|
| 46 |
+
The model uses the standard **IOB2** tagging scheme:
|
| 47 |
+
|
| 48 |
+
| ID | Label |
|
| 49 |
+
|----|--------|
|
| 50 |
+
| 0 | O |
|
| 51 |
+
| 1 | B-PER |
|
| 52 |
+
| 2 | I-PER |
|
| 53 |
+
| 3 | B-ORG |
|
| 54 |
+
| 4 | I-ORG |
|
| 55 |
+
| 5 | B-LOC |
|
| 56 |
+
| 6 | I-LOC |
|
| 57 |
+
| 7 | B-MISC |
|
| 58 |
+
| 8 | I-MISC |
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## π₯ How to Load the Model
|
| 63 |
+
|
| 64 |
+
### πΉ Using Hugging Face Pipeline
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
from transformers import pipeline
|
| 68 |
+
|
| 69 |
+
ner = pipeline("ner", model="ELHACHYMI/bert-ner", aggregation_strategy="simple")
|
| 70 |
+
|
| 71 |
+
text = "Bill Gates founded Microsoft in the United States."
|
| 72 |
+
print(ner(text))
|