Somali NER Model
This repository contains a Named Entity Recognition (NER) model fine-tuned using Hugging Face's transformers library. The model is trained to detect named entities in Somali text such as people, locations, organizations, and more.
π¦ Model Details
- Task: Named Entity Recognition (NER)
- Language: Somali
- Checkpoint:
./ner_model/checkpoint-1302
π§ How to Use
1. Install Dependencies
Make sure you have the required packages installed:
pip install transformers
from transformers import AutoTokenizer, AutoModelForTokenClassification
from transformers import TokenClassificationPipeline
# Load model and tokenizer from Hugging Face Hub
model = AutoModelForTokenClassification.from_pretrained("abdoltd/Ner_model")
tokenizer = AutoTokenizer.from_pretrained("abdoltd/Ner_model")
# Create pipeline manually
ner_pipeline = TokenClassificationPipeline(model=model, tokenizer=tokenizer, aggregation_strategy="simple")
# Somali text input
text = "Kylian MbappΓ© oo fariin hambalyo ah u diray kooxdiisii hore ee PSG."
# Run prediction
outputs = ner_pipeline(text)
# Display results
for entity in outputs:
print(f"{entity['word']} -> {entity['entity_group']} (score: {entity['score']:.2f})")
- Downloads last month
- 19
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support