amanpatkar
commited on
update
Browse files
README.md
CHANGED
@@ -56,6 +56,24 @@ The distilbert-finetuned-ner model is designed for Named Entity Recognition (NER
|
|
56 |
|
57 |
## Intended Uses & Limitations
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
### Intended Uses
|
60 |
- Named Entity Recognition (NER): Extracting entities such as names, locations, organizations, and miscellaneous entities from text.
|
61 |
- Information Extraction: Automatically identifying and classifying key information in documents.
|
@@ -70,6 +88,17 @@ The distilbert-finetuned-ner model is designed for Named Entity Recognition (NER
|
|
70 |
## Training and evaluation data
|
71 |
|
72 |
The model is fine-tuned on the CoNLL-2003 dataset, a widely-used dataset for training and evaluating NER systems. The dataset includes four types of named entities: Persons (PER), Organizations (ORG), Locations (LOC), and Miscellaneous (MISC).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
## Training procedure
|
75 |
|
|
|
56 |
|
57 |
## Intended Uses & Limitations
|
58 |
|
59 |
+
#### How to use
|
60 |
+
|
61 |
+
You can use this model with Transformers *pipeline* for NER.
|
62 |
+
|
63 |
+
```python
|
64 |
+
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
65 |
+
from transformers import pipeline
|
66 |
+
|
67 |
+
tokenizer = AutoTokenizer.from_pretrained("amanpatkar/distilbert-finetuned-ner")
|
68 |
+
model = AutoModelForTokenClassification.from_pretrained("amanpatkar/distilbert-finetuned-ner")
|
69 |
+
|
70 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
71 |
+
example = "My name is Aman Patkar and I live in Gurugram, India."
|
72 |
+
|
73 |
+
ner_results = nlp(example)
|
74 |
+
print(ner_results)
|
75 |
+
```
|
76 |
+
|
77 |
### Intended Uses
|
78 |
- Named Entity Recognition (NER): Extracting entities such as names, locations, organizations, and miscellaneous entities from text.
|
79 |
- Information Extraction: Automatically identifying and classifying key information in documents.
|
|
|
88 |
## Training and evaluation data
|
89 |
|
90 |
The model is fine-tuned on the CoNLL-2003 dataset, a widely-used dataset for training and evaluating NER systems. The dataset includes four types of named entities: Persons (PER), Organizations (ORG), Locations (LOC), and Miscellaneous (MISC).
|
91 |
+
Abbreviation|Description
|
92 |
+
-|-
|
93 |
+
O|Outside of a named entity
|
94 |
+
B-MISC |Beginning of a miscellaneous entity right after another miscellaneous entity
|
95 |
+
I-MISC | Miscellaneous entity
|
96 |
+
B-PER |Beginning of a person’s name right after another person’s name
|
97 |
+
I-PER |Person’s name
|
98 |
+
B-ORG |Beginning of an organization right after another organization
|
99 |
+
I-ORG |organization
|
100 |
+
B-LOC |Beginning of a location right after another location
|
101 |
+
I-LOC |Location
|
102 |
|
103 |
## Training procedure
|
104 |
|