--- 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: 38478841 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**.