Datasets:
language:
- sv
license: cc-by-nc-4.0
task_categories:
- text-generation
- question-answering
- summarization
pretty_name: Swedish Court Decisions
tags:
- legal
- swedish
- court-decisions
- llm-training
- legal-nlp
- nordic
- precedent
configs:
- config_name: pretrain
data_files:
- split: train
path: pretrain/train/*.parquet
- split: validation
path: pretrain/validation/*.parquet
- split: test
path: pretrain/test/*.parquet
- config_name: instruct
data_files:
- split: train
path: instruct/train/*.parquet
- split: validation
path: instruct/validation/*.parquet
- split: test
path: instruct/test/*.parquet
- config_name: structured
data_files:
- split: train
path: structured/train/*.parquet
- split: validation
path: structured/validation/*.parquet
- split: test
path: structured/test/*.parquet
Swedish Court Decisions — Svenska Domstolsavgöranden
55,096 court decisions spanning 45 years of Swedish case law, purpose-built for LLM training.
The most comprehensive open dataset of Swedish appellate court decisions available for AI development. Sourced directly from the official Swedish Courts case law database via their public REST API and preprocessed into three ready-to-use training configurations.
Why This Dataset
- Scale and depth: 55,096 decisions covering 1981 to present — the full sweep of modern Swedish jurisprudence
- Precedent-aware: Every record is flagged with
ar_vagledande(is_precedent), enabling targeted training on landmark rulings that shape Swedish law - Tri-modal design: Three subsets serve distinct training objectives — raw pretraining, instruction tuning, and structured information extraction
- Production-ready: Cleaned full text, consistent schemas, train/validation/test splits in Parquet format
- Open provenance: CC0 source data from Domstolsverket (Swedish Courts Administration), published on dataportal.se
Courts Covered
Decisions from all major Swedish appellate courts:
| Court | Swedish name | Abbreviation |
|---|---|---|
| Supreme Court | Högsta domstolen | HD |
| Supreme Administrative Court | Högsta förvaltningsdomstolen | HFD |
| Courts of Appeal | Hovrätterna (Svea, Göta, Övre Norrland, m.fl.) | — |
| Administrative Courts of Appeal | Kammarrätterna | — |
| Land and Environment Court of Appeal | Mark- och miljööverdomstolen | MÖD |
| Labour Court | Arbetsdomstolen | AD |
| Migration Court of Appeal | Migrationsöverdomstolen | — |
Dataset Configurations
pretrain — Continued Pre-training
Full-text decisions for domain-adaptive pretraining. Ideal for adapting a general Swedish or multilingual LLM to the legal domain.
| Column | Type | Description |
|---|---|---|
text |
string | Cleaned full text of the decision |
pub_id |
string | Unique publication ID |
domstol |
string | Court name |
datum |
string | Decision date (YYYY-MM-DD) |
typ |
string | Decision type (e.g. DOM_ELLER_BESLUT) |
ar_vagledande |
bool | True if the decision is a binding precedent |
malnummer |
string | Case number |
underratt_malnummer |
string | Lower court case number (enables cross-instance tracing) |
text_kalla |
string | Text source: "html" or "pdf" |
tecken |
int32 | Character count |
Tip: Filter on
ar_vagledande == Trueto extract the subset of landmark, precedent-setting rulings — essential for training models that reason about legal authority.
instruct — Instruction Tuning / SFT
Structured prompt–response pairs for supervised fine-tuning. Five legally meaningful task types, written in Swedish, cover the core competencies of a legal assistant.
| Column | Type | Description |
|---|---|---|
instruction |
string | Task description in Swedish |
input |
string | Decision text (truncated if necessary) |
output |
string | Expected response |
uppgift |
string | Task type (see below) |
Task types (uppgift):
| Value | Description |
|---|---|
sammanfattning |
Concise summary of the decision |
domslut |
The court's operative ruling — what was decided |
saken |
Subject matter — what the case concerns |
parter |
Parties — appellant and respondent |
skal |
Legal reasoning — the court's rationale |
This configuration is ready to drop into any SFT pipeline (e.g. TRL, LLaMA-Factory, Axolotl) with minimal preprocessing.
structured — Legal Information Extraction
Full text paired with JSON-structured section annotations, suitable for fine-tuning models on document parsing, section classification, and legal entity extraction.
| Column | Type | Description |
|---|---|---|
fulltext |
string | Cleaned full text |
sektioner_json |
string | JSON object with identified sections |
malnummer |
string | Extracted case number |
Sections in sektioner_json:
| Key | Description |
|---|---|
titel |
Document title |
avgörande_kort |
Short ruling summary |
överklagat_avgörande |
The decision being appealed |
klagande |
Appellant |
motpart |
Respondent |
saken |
Subject matter |
bakgrund |
Background / facts |
yrkanden |
Claims and prayers for relief |
skal |
Legal reasoning |
domslut |
Operative ruling |
skiljaktig |
Dissenting opinion (if any) |
Quick Start
from datasets import load_dataset
# Full-text pretraining corpus
ds = load_dataset("your-org/svenska-domstolsavgoranden", "pretrain")
# Precedent decisions only
precedents = ds["train"].filter(lambda x: x["ar_vagledande"])
# Instruction tuning
sft = load_dataset("your-org/svenska-domstolsavgoranden", "instruct")
# Structured extraction
structured = load_dataset("your-org/svenska-domstolsavgoranden", "structured")
Data Source & Coverage
| Property | Details |
|---|---|
| Source | Sveriges Domstolar — Sök rättspraxis |
| API | https://rattspraxis.etjanst.domstol.se/openapi/puh-openapi.yaml |
| Open data registry | dataportal.se |
| Source license | CC0 (Domstolsverket) |
| Dataset license | CC BY-NC 4.0 |
| Temporal coverage | Case law summaries from 1981 — present; full decisions from March 2025 |
| Language | Swedish (sv) |
| Total records | 55,096 |
Ethics & Privacy
- All decisions are public records published by Domstolsverket under CC0
- Personal data in published decisions is partially anonymized by the courts prior to publication
- This dataset is intended for research and model training purposes
- Users are responsible for ensuring GDPR compliance in downstream applications
- Not intended for re-identification of individuals
Citation
@dataset{swedish_court_decisions,
title = {Swedish Court Decisions — Svenska Domstolsavgöranden},
source = {domstol.se (Domstolsverket)},
url = {https://rattspraxis.etjanst.domstol.se},
license = {CC0},
records = {55096},
years = {1981--2025},
}
Legal Notice
This dataset contains court decisions published openly by Domstolsverket (Swedish Courts Administration) under CC0 license via their public REST API. Personal data has been anonymized by Domstolsverket prior to publication. Users are responsible for ensuring GDPR compliance in their own use cases. Not intended for re-identification of individuals.