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
Safetensors
Model size
0.3B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support