File size: 1,888 Bytes
5db0da0 ef92739 5db0da0 43bede8 5db0da0 43bede8 ef92739 5db0da0 43bede8 5db0da0 43bede8 5db0da0 43bede8 5db0da0 ef92739 5db0da0 ef92739 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | ---
language: en
pipeline_tag: token-classification
library_name: spacy
---
# NER Model: fuzzyethic/NER-ONETONOTE5
This is a Named Entity Recognition (NER) model, trained using spaCy.
## Model Details
* **Language:** English (`en`)
* **Pipeline:** `ner`
* **spaCy Version:** >=3.8.7,<3.9.0
## Training
* **Dataset:** This model was trained on the `ontonotes-5` dataset.
* **Evaluation:** The model achieved an accuracy of **81%** on the evaluation set.
## How to Use
First, install the required libraries:
```bash
pip install spacy huggingface_hub
```
Then, you can use this script to automatically download and load the model:
```python
import spacy
from huggingface_hub import snapshot_download
import os
model_name = "fuzzyethic/NER-ONETONOTE5"
try:
nlp = spacy.load(model_name)
except OSError:
print(f"Downloading model {model_name} from Hugging Face Hub...")
model_path = snapshot_download(repo_id=model_name)
nlp = spacy.load(model_path)
text = "Apple Company is looking at buying U.K. startup for $1 billion"
doc = nlp(text)
print("Entities found:")
for ent in doc.ents:
print(f"- {ent.text} ({ent.label_})")
```
OUTPUT
```python
Downloading model fuzzyethic/NER-ONETONOTE5 from Hugging Face Hub...
Entities found:
- Apple (B-ORG)
- Company (I-ORG)
- U.K. (B-GPE)
- $ (B-MONEY)
- 1 (I-MONEY)
- billion (I-MONEY)
```
## Labels
The model predicts the following entities:
```python
labels = [
"B-CARDINAL", "B-DATE", "B-EVENT", "B-FAC", "B-GPE", "B-LANGUAGE", "B-LAW",
"B-LOC", "B-MONEY", "B-NORP", "B-ORDINAL", "B-ORG", "B-PERCENT", "B-PERSON",
"B-PRODUCT", "B-QUANTITY", "B-TIME", "B-WORK_OF_ART", "I-CARDINAL", "I-DATE",
"I-EVENT", "I-FAC", "I-GPE", "I-LANGUAGE", "I-LAW", "I-LOC", "I-MONEY", "I-NORP",
"I-ORDINAL", "I-ORG", "I-PERCENT", "I-PERSON", "I-PRODUCT", "I-QUANTITY",
"I-TIME", "I-WORK_OF_ART"
]
```
|