File size: 4,585 Bytes
f89fb13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e2a8e4d
 
f89fb13
e2a8e4d
 
f89fb13
e2a8e4d
 
 
 
f89fb13
 
 
 
 
 
 
 
 
 
f2e13c5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
---
dataset_info:
  features:
  - name: id
    dtype: string
  - name: nb
    dtype: string
  - name: nn
    dtype: string
  - name: nb_license
    dtype: string
  - name: nn_license
    dtype: string
  - name: nb_creators
    list:
    - name: type
      dtype: string
    - name: name
      dtype: string
  - name: nn_creators
    list:
    - name: type
      dtype: string
    - name: name
      dtype: string
  splits:
  - name: train
    num_bytes: 92732804
    num_examples: 189652
  - name: validation
    num_bytes: 511425
    num_examples: 1026
  - name: test
    num_bytes: 557509
    num_examples: 1017
  download_size: 39895954
  dataset_size: 93801738
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
---

# NDLA Parallel Paragraphs

## Dataset Summary

This dataset is derived from articles provided through the [NDLA (Norwegian Digital Learning Arena)](https://ndla.no) API. It consists of aligned paragraph-level translations between Norwegian Bokmål and Norwegian Nynorsk. The data is sourced from educational articles designed for upper secondary education and has been collected via the official [NDLA Article API](https://api.ndla.no/article-api/v2/articles).

The dataset is intended for machine translation, language modeling, and linguistic research focused on the Norwegian language. Paragraphs have been aligned between Bokmål and Nynorsk versions of the same article. Basic filtering has been applied to remove malformed or empty entries. The dataset is formatted in JSON Lines (`.jsonl`) and is compatible with Hugging Face's `datasets` library.

---

## Dataset Structure

### Data Fields

Each entry in the dataset is a JSON object with the following fields:

- `id`: Unique identifier for the translation pair.
- `article_id`: ID of the NDLA article.
- `url`: URL to the article via the NDLA API.
- `section`: Section of the article (e.g., `article`, `intro`, or `meta`).
- `paragraph_index`: Index of the paragraph within the article.
- `nb`: Paragraph text in Norwegian Bokmål.
- `nn`: Corresponding translation in Norwegian Nynorsk.
- `nb_license`: License for the Bokmål paragraph.
- `nn_license`: License for the Nynorsk paragraph.
- `nb_creators`: Creator metadata for the Bokmål paragraph.
- `nn_creators`: Creator metadata for the Nynorsk paragraph.
- `article_paragraph_count`: Total number of paragraphs in the article.

---

### Data Splits

| Split       | Size     |
|-------------|----------|
| Train       | 206,000  |
| Validation  | 1,020    |
| Test        | 1,040    |

---

## Usage

You can load the dataset using the Hugging Face `datasets` library:

```python
from datasets import load_dataset

dataset = load_dataset("NbAiLab/ndla_parallel_paragraphs")

# Access the training split
train_data = dataset["train"]

# Example: print the first entry
print(train_data[0])
```

Example output:

```json
{
  "id": "nbnn_article_7_0",
  "article_id": 7,
  "url": "https://api.ndla.no/article-api/v2/articles/7",
  "section": "article",
  "paragraph_index": 0,
  "nb": "Kvantitativ er et adjektiv som er avledet av substantivet kvantitet...",
  "nn": "Kvantitativ er eit adjektiv som er avleidd av substantivet kvantitet...",
  "nb_license": "CC-BY-SA-4.0",
  "nn_license": "CC-BY-SA-4.0",
  "nb_creators": [{"type": "writer", "name": "Clemens Saers"}],
  "nn_creators": [{"type": "writer", "name": "Clemens Saers"}],
  "article_paragraph_count": 14
}
```

---

## Intended Use

This dataset is suitable for:

- Training and evaluating machine translation models between Norwegian Bokmål and Nynorsk.
- Linguistic and educational content analysis.
- Language modeling and other NLP tasks involving Norwegian.

---

## Limitations

- Paragraph alignment is based on structural position, not semantic matching — minor mismatches may occur.
- Dataset content is educational in nature and may not generalize to informal or non-academic language use.
- Some paragraphs may be skipped if empty or malformed in the source data.

---

## License

This dataset is distributed under the **Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)** license, as per the licensing terms of [NDLA.no](https://ndla.no).

---

## Acknowledgments

We extend our thanks to the [Norwegian Digital Learning Arena (NDLA)](https://ndla.no) for making the article content publicly available via their API.

This dataset has been curated and adapted for Hugging Face by **Andre Kåsen** and **Per Egil Kummervold**.