Model Card for XLM-R Arabic NER

This model is a fine-tuned version of xlm-roberta-base for Named Entity Recognition (NER) in Arabic. It is trained to identify three types of entities: Persons (PER), Organizations (ORG), and Locations (LOC).

🏆 Key Performance Results

The model was rigorously evaluated on the stratified test set (4,000 examples) of the Arabic PAN-X dataset. It achieved highly competitive results:

  • Token-level Accuracy: 96.24%
  • Entity-level F1-Score: 91.76%

Detailed Classification Report (Entity-Level)

Entity Type Precision Recall F1-Score Support
LOC (Location) 0.92 0.93 0.92 1,564
ORG (Organization) 0.90 0.89 0.89 1,438
PER (Person) 0.93 0.94 0.93 1,541
Overall 0.92 0.92 0.92 4,543

Model Details

Model Description

This model performs token classification to extract named entities from Arabic text. It is built on top of the cross-lingual XLM-RoBERTa base model and was fine-tuned on the Arabic subset of the PAN-X (WikiANN) dataset from the XTREME benchmark.

  • Developed by: Omar Maqousi
  • Model type: Token Classification (Transformer Encoder)
  • Language(s) (NLP): Arabic (ar)
  • License: MIT (inherited from base model / datasets where applicable)
  • Finetuned from model: xlm-roberta-base

Model Sources

Uses

Direct Use

The model can be used directly for extracting entities from modern standard Arabic text. It identifies:

  • PER: Person names
  • ORG: Organizations, companies, institutions
  • LOC: Locations, cities, countries, geographical features

Out-of-Scope Use

The model may not perform well on:

  • Heavy colloquial Arabic (Dialects) or Arabizi (Arabic chat alphabet).
  • Entity types outside of PER, ORG, and LOC (e.g., Dates, Medical terms).

Bias, Risks, and Limitations

Since the model is trained on Wikipedia data (WikiANN), it may inherit biases present in Wikipedia articles. It might perform better on entities related to journalism, history, and geography than on casual social media text.

Recommendations

Users should evaluate the model on their specific domain data before deploying it in production, especially for sensitive applications like legal or medical text processing.

How to Get Started with the Model

Use the code below to get started with the model using the pipeline API:

from transformers import pipeline

# Load the model and tokenizer
ner_pipeline = pipeline("ner", model="OmarMaqousi/ner-arabic-model", aggregation_strategy="simple")

text = "التقى محمد بمدير شركة جوجل في مدينة عمان."
entities = ner_pipeline(text)

print(entities)
Downloads last month
51
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

Model tree for OmarMaqousi/ner-arabic-model

Finetuned
(4098)
this model

Dataset used to train OmarMaqousi/ner-arabic-model