Downloads · 30 days
99
0% of all-time downloads
MediaCatch/mmBERT-base-scandi-ner-gold
mmBERT-base-scandi-ner-gold is a token classification model from MediaCatch. Use it when you need labels on individual words, such as names. The card lists the license as mit.
A multilingual Named Entity Recognition model trained on multiple Scandi language datasets plus English and German. The model identifies Person (PER), Organization (ORG), and Location (LOC) entities.
Downloads · 30 days
99
0% of all-time downloads
All-time downloads
43.6K
Public
Parameters
308M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 97%
From the Hugging Face model README
A multilingual Named Entity Recognition model trained on multiple Scandi language datasets plus English and German. The model identifies Person (PER), Organization (ORG), and Location (LOC) entities.
This model is based on MediaCatch/mmBERT-base-scandi-ner and has been fine-tuned for token classification on a combined dataset of Scandi NER corpora. It supports:
The model achieves the following performance on the held-out test set:
| Metric | Score |
|---|---|
| F1 Score | 0.8330 |
| Precision | 0.8455 |
| Recall | 0.8208 |
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("your-username/nordic-ner-model")
model = AutoModelForTokenClassification.from_pretrained("your-username/nordic-ner-model")
# Create NER pipeline
ner_pipeline = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
# Example usage
text = "Barack Obama besökte Stockholm och träffade Stefan Löfven."
entities = ner_pipeline(text)
for entity in entities:
print(f"{entity['word']} -> {entity['entity_group']} ({entity['score']:.3f})")
The model predicts the following entity types using BIO tagging:
PER (Person): Names of people ORG (Organization): Companies, institutions, organizations LOC (Location): Geographic locations, places
The model was trained on a combination of the following datasets:
Total examples: 187,994 Average sequence length: 13.8 tokens Languages: en, no, sv, da, unknown Label distribution:
Base model: MediaCatch/mmBERT-base-scandi-ner Training epochs: 30 Batch size: 16 Learning rate: 2e-05 Warmup steps: 5000 Weight decay: 0.01
Mixed precision: False Gradient accumulation: 1 Early stopping: Enabled with patience=3
text = "Olof Palme var Sveriges statsminister."
entities = ner_pipeline(text)
# Output: [{'entity_group': 'PER', 'word': 'Olof Palme', 'start': 0, 'end': 10, 'score': 0.999}]
texts = [
"Microsoft fue fundada por Bill Gates.",
"Angela Merkel var förbundskansler i Tyskland.",
"Universitetet i Oslo ligger i Norge."
]
for text in texts:
entities = ner_pipeline(text)
print(f"Text: {text}")
for entity in entities:
print(f" {entity['word']} -> {entity['entity_group']}")
Domain: Primarily trained on news and Wikipedia text; performance may vary on other domains Subword handling: The model uses subword tokenization; ensure proper aggregation Language mixing: While multilingual, performance is best when languages don't mix within sentences Entity coverage: Limited to PER, ORG, LOC; doesn't detect MISC, DATE, or other entity types