File size: 1,331 Bytes
607ad03 |
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 |
---
license: mit
language:
- bg
- en
- fr
- de
- ru
- es
- sw
- tr
- vi
base_model:
- rustemgareev/mdeberta-v3-base-lite
pipeline_tag: token-classification
tags:
- deberta
- deberta-v3
- mdeberta
- ner
---
# mdeberta-ontonotes5
This is a multilingual DeBERTa model fine-tuned for Named Entity Recognition (NER) task.
It is based on the [rustemgareev/mdeberta-v3-base-lite](https://huggingface.co/rustemgareev/mdeberta-v3-base-lite) model.
## Usage
```python
from transformers import pipeline
# Initialize the NER pipeline
ner_pipeline = pipeline(
"token-classification",
model="rustemgareev/mdeberta-ontonotes5",
aggregation_strategy="simple"
)
# Example text
text = "Apple Inc. is looking at buying a U.K. startup for $1 billion in London next week."
# Get predictions
entities = ner_pipeline(text)
# Print the results
for entity in entities:
print(f"Entity: {entity['word']}, Label: {entity['entity_group']}, Score: {entity['score']:.4f}")
# Expected output:
# Entity: Apple Inc., Label: ORGANIZATION, Score: 0.9975
# Entity: U.K., Label: GPE, Score: 0.9956
# Entity: $1 billion, Label: MONEY, Score: 0.9981
# Entity: London, Label: GPE, Score: 0.9981
# Entity: next week, Label: DATE, Score: 0.9940
```
## License
This model is distributed under the [MIT License](https://opensource.org/licenses/MIT). |