Datasets:
Tasks:
Text Generation
Formats:
parquet
Sub-tasks:
language-modeling
Languages:
Danish
Size:
1M - 10M
License:
Add domsdatabasen (#74)
Browse files- Adding domsdatabasen. (8870700b0ce341e40f07e77b05380a465db28dfa)
- Minor changes to make the tests pass, and adding proper logging mechanism. (6df6dde969c6de6fde8369c96c2702f2098176b1)
- Updating datasheet after removing exact duplicates. (02c4bb425478c6b3a421a5d30286ab0e4235a696)
- Merge branch 'main' into pr/74 (8398a3f927e7b09e4b3170cb77e90d5e95f6848e)
- Bump version and add changelog (b0dbe01600ca44c2c8e888e34be60980b9dc2a19)
- Fixing minor things based on review. (9c3619e853955c0aa991d8c5b1a1e17a7a80f493)
- CHANGELOG.md +6 -0
- README.md +49 -42
- data/domsdatabasen/create.py +344 -0
- data/domsdatabasen/descriptive_stats.json +6 -0
- data/domsdatabasen/domsdatabasen.md +121 -0
- data/domsdatabasen/domsdatabasen.parquet +3 -0
- data/domsdatabasen/images/dist_document_length.png +3 -0
- descriptive_stats.json +4 -4
- images/dist_document_length.png +2 -2
- images/domain_distribution.png +2 -2
- images/tokens_over_time.html +1 -1
- images/tokens_over_time.svg +1 -1
- pyproject.toml +1 -1
- test_results.log +10 -10
- uv.lock +0 -0
CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5 |
|
6 |
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
## [v1.2.4] - 2025-07-08
|
9 |
|
10 |
### Added
|
|
|
5 |
|
6 |
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
7 |
|
8 |
+
## [v1.2.5] - 2025-07-08
|
9 |
+
|
10 |
+
### Added
|
11 |
+
|
12 |
+
- Added the `domsdatabasen` dataset.
|
13 |
+
|
14 |
## [v1.2.4] - 2025-07-08
|
15 |
|
16 |
### Added
|
README.md
CHANGED
@@ -145,6 +145,10 @@ configs:
|
|
145 |
data_files:
|
146 |
- split: train
|
147 |
path: data/health_hovedstaden/*.parquet
|
|
|
|
|
|
|
|
|
148 |
annotations_creators:
|
149 |
- no-annotation
|
150 |
language_creators:
|
@@ -178,7 +182,7 @@ https://github.com/huggingface/datasets/blob/main/templates/README_guide.md
|
|
178 |
<!-- START README TABLE -->
|
179 |
| | |
|
180 |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
181 |
-
| **Version** | 1.2.
|
182 |
| **Language** | dan, dansk, Danish |
|
183 |
| **License** | Openly Licensed, See the respective dataset |
|
184 |
| **Models** | For model trained used this data see [danish-foundation-models](https://huggingface.co/danish-foundation-models) |
|
@@ -215,9 +219,9 @@ https://github.com/huggingface/datasets/blob/main/templates/README_guide.md
|
|
215 |
|
216 |
<!-- START-DESC-STATS -->
|
217 |
- **Language**: dan, dansk, Danish
|
218 |
-
- **Number of samples**:
|
219 |
-
- **Number of tokens (Llama 3)**: 4.
|
220 |
-
- **Average document length (characters)**:
|
221 |
<!-- END-DESC-STATS -->
|
222 |
|
223 |
|
@@ -319,44 +323,45 @@ This data generally contains no annotation besides the metadata attached to each
|
|
319 |
Below follows a brief overview of the sources in the corpus along with their individual license.
|
320 |
|
321 |
<!-- START-MAIN TABLE -->
|
322 |
-
| Source | Description | Domain | N. Tokens
|
323 |
-
|
324 |
-
| [cellar] | The official digital repository for European Union legal documents and open data | Legal | 1.15B
|
325 |
-
| [retsinformationdk] | [retsinformation.dk](https://www.retsinformation.dk) (legal-information.dk) the official legal information system of Denmark | Legal | 818.25M
|
326 |
-
| [ncc_books] | Danish books extracted from the [Norwegian Colossal Corpus](https://huggingface.co/datasets/NbAiLab/NCC) derived from OCR | Books | 531.97M
|
327 |
-
| [hest] | Samples from the Danish debate forum www.heste-nettet.dk | Social Media | 389.32M
|
328 |
-
| [ncc_parliament] | Collections from the Norwegian parliament in Danish. Extracted from the [Norwegian Colossal Corpus](https://huggingface.co/datasets/NbAiLab/NCC) derived from ocr | Other | 338.87M
|
329 |
-
| [opensubtitles] | Danish subsection of [OpenSubtitles](https://opus.nlpl.eu/OpenSubtitles/corpus/version/OpenSubtitles) | Conversation | 271.60M
|
330 |
-
| [ai-aktindsigt] | Multiple web scrapes from municipality websites collected as a part of the [AI-aktindsigt](https://ai-aktindsigt.dk) project | Web | 139.23M
|
331 |
-
| [miljoeportalen] | Data from [Danmarks Miljøportalen](https://www.miljoeportal.dk/om-danmarks-miljoeportal/) (Denmark's Environment Portal) | Web | 127.38M
|
332 |
-
| [skat] | Skat is the Danish tax authority. This dataset contains content from its website skat.dk | Legal | 122.11M
|
333 |
-
| [wiki] | The Danish subsection of [wikipedia](https://en.wikipedia.org/wiki/Main_Page) | Encyclopedic | 122.00M
|
334 |
-
| [ft] | Records from all meetings of The Danish parliament (Folketinget) in the parliament hall | Conversation | 114.09M
|
335 |
-
| [memo] | The MeMo corpus comprising almost all Danish novels from the period 1870-1899, known as the Modern Breakthrough | Books | 113.74M
|
336 |
-
| [ep] | The Danish subsection of [Europarl](https://aclanthology.org/2005.mtsummit-papers.11/) | Conversation | 100.84M
|
337 |
-
| [
|
338 |
-
| [
|
339 |
-
| [
|
340 |
-
| [
|
341 |
-
| [
|
342 |
-
| [
|
343 |
-
| [
|
344 |
-
| [
|
345 |
-
| [
|
346 |
-
| [
|
347 |
-
| [
|
348 |
-
| [
|
349 |
-
| [
|
350 |
-
| [
|
351 |
-
| [
|
352 |
-
| [
|
353 |
-
| [
|
354 |
-
| [
|
355 |
-
| [
|
356 |
-
| [
|
357 |
-
| [
|
358 |
-
| [
|
359 |
-
|
|
|
|
360 |
|
361 |
[ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
|
362 |
[cellar]: data/cellar/cellar.md
|
@@ -393,6 +398,7 @@ Below follows a brief overview of the sources in the corpus along with their ind
|
|
393 |
[relig]: data/relig/relig.md
|
394 |
[nota]: data/nota/nota.md
|
395 |
[health_hovedstaden]: data/health_hovedstaden/health_hovedstaden.md
|
|
|
396 |
|
397 |
|
398 |
[CC-0]: https://creativecommons.org/publicdomain/zero/1.0/legalcode.en
|
@@ -403,6 +409,7 @@ Below follows a brief overview of the sources in the corpus along with their ind
|
|
403 |
[Danish Copyright Law]: ./data/retsinformationdk/retsinformationdk.md#license-information
|
404 |
[DanNet 1.0]: ./data/dannet/dannet.md#license-information
|
405 |
[Gutenberg]: ./data/gutenberg/gutenberg.md#license-information
|
|
|
406 |
<!-- END-MAIN TABLE -->
|
407 |
|
408 |
|
|
|
145 |
data_files:
|
146 |
- split: train
|
147 |
path: data/health_hovedstaden/*.parquet
|
148 |
+
- config_name: domsdatabasen
|
149 |
+
data_files:
|
150 |
+
- split: train
|
151 |
+
path: data/domsdatabasen/*.parquet
|
152 |
annotations_creators:
|
153 |
- no-annotation
|
154 |
language_creators:
|
|
|
182 |
<!-- START README TABLE -->
|
183 |
| | |
|
184 |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
185 |
+
| **Version** | 1.2.5 ([Changelog](/CHANGELOG.md)) |
|
186 |
| **Language** | dan, dansk, Danish |
|
187 |
| **License** | Openly Licensed, See the respective dataset |
|
188 |
| **Models** | For model trained used this data see [danish-foundation-models](https://huggingface.co/danish-foundation-models) |
|
|
|
219 |
|
220 |
<!-- START-DESC-STATS -->
|
221 |
- **Language**: dan, dansk, Danish
|
222 |
+
- **Number of samples**: 960.36K
|
223 |
+
- **Number of tokens (Llama 3)**: 4.78B
|
224 |
+
- **Average document length (characters)**: 15301.72
|
225 |
<!-- END-DESC-STATS -->
|
226 |
|
227 |
|
|
|
323 |
Below follows a brief overview of the sources in the corpus along with their individual license.
|
324 |
|
325 |
<!-- START-MAIN TABLE -->
|
326 |
+
| Source | Description | Domain | N. Tokens | License |
|
327 |
+
|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------|:------------|:-----------------------|
|
328 |
+
| [cellar] | The official digital repository for European Union legal documents and open data | Legal | 1.15B | [CC-BY-SA 4.0] |
|
329 |
+
| [retsinformationdk] | [retsinformation.dk](https://www.retsinformation.dk) (legal-information.dk) the official legal information system of Denmark | Legal | 818.25M | [Danish Copyright Law] |
|
330 |
+
| [ncc_books] | Danish books extracted from the [Norwegian Colossal Corpus](https://huggingface.co/datasets/NbAiLab/NCC) derived from OCR | Books | 531.97M | [CC-0] |
|
331 |
+
| [hest] | Samples from the Danish debate forum www.heste-nettet.dk | Social Media | 389.32M | [CC-0] |
|
332 |
+
| [ncc_parliament] | Collections from the Norwegian parliament in Danish. Extracted from the [Norwegian Colossal Corpus](https://huggingface.co/datasets/NbAiLab/NCC) derived from ocr | Other | 338.87M | [NLOD 2.0] |
|
333 |
+
| [opensubtitles] | Danish subsection of [OpenSubtitles](https://opus.nlpl.eu/OpenSubtitles/corpus/version/OpenSubtitles) | Conversation | 271.60M | [CC-0] |
|
334 |
+
| [ai-aktindsigt] | Multiple web scrapes from municipality websites collected as a part of the [AI-aktindsigt](https://ai-aktindsigt.dk) project | Web | 139.23M | [Apache 2.0] |
|
335 |
+
| [miljoeportalen] | Data from [Danmarks Miljøportalen](https://www.miljoeportal.dk/om-danmarks-miljoeportal/) (Denmark's Environment Portal) | Web | 127.38M | [CC-0] |
|
336 |
+
| [skat] | Skat is the Danish tax authority. This dataset contains content from its website skat.dk | Legal | 122.11M | [CC-0] |
|
337 |
+
| [wiki] | The Danish subsection of [wikipedia](https://en.wikipedia.org/wiki/Main_Page) | Encyclopedic | 122.00M | [CC-0] |
|
338 |
+
| [ft] | Records from all meetings of The Danish parliament (Folketinget) in the parliament hall | Conversation | 114.09M | [CC-0] |
|
339 |
+
| [memo] | The MeMo corpus comprising almost all Danish novels from the period 1870-1899, known as the Modern Breakthrough | Books | 113.74M | [CC-BY-SA 4.0] |
|
340 |
+
| [ep] | The Danish subsection of [Europarl](https://aclanthology.org/2005.mtsummit-papers.11/) | Conversation | 100.84M | [CC-0] |
|
341 |
+
| [domsdatabasen] | [Domsdatabasen.dk](https://domsdatabasen.dk/) is a public database containing selected judgments from the Danish courts | Legal | 86.35M | [Danish Copyright Law] |
|
342 |
+
| [adl] | Danish literature from 1700-2023 from the [Archive for Danish Literature](https://tekster.kb.dk/text?editorial=no&f%5Bsubcollection_ssi%5D%5B%5D=adl&match=one&search_field=Alt) (ADL) | Books | 58.49M | [CC-0] |
|
343 |
+
| [retspraksis] | Case law or judical practice in Denmark derived from [Retspraksis](https://da.wikipedia.org/wiki/Retspraksis) | Legal | 56.26M | [CC-0] |
|
344 |
+
| [fm-udgivelser] | The official publication series of the Danish Ministry of Finance containing economic analyses, budget proposals, and fiscal policy documents | Legal | 50.34M | [CC-BY-SA 4.0] |
|
345 |
+
| [nordjyllandnews] | Articles from the Danish Newspaper [TV2 Nord](https://www.tv2nord.dk) | News | 37.90M | [CC-0] |
|
346 |
+
| [eur-lex-sum-da] | The Danish subsection of EUR-lex SUM consisting of EU legislation paired with professionally written summaries | Legal | 31.37M | [CC-BY-SA 4.0] |
|
347 |
+
| [ncc_maalfrid] | Danish content from Norwegian institutions websites | Web | 29.26M | [NLOD 2.0] |
|
348 |
+
| [health_hovedstaden] | Guidelines and informational documents for healthcare professionals from the Capital Region | Medical | 27.07M | [CC-0] |
|
349 |
+
| [tv2r] | Contemporary Danish newswire articles published between 2010 and 2019 | News | 21.67M | [CC-BY-SA 4.0] |
|
350 |
+
| [danske-taler] | Danish Speeches from [dansketaler.dk](https://www.dansketaler.dk) | Conversation | 8.72M | [CC-0] |
|
351 |
+
| [nota] | The text only part of the [Nota lyd- og tekstdata](https://sprogteknologi.dk/dataset/nota-lyd-og-tekstdata) dataset | Readaloud | 7.30M | [CC-0] |
|
352 |
+
| [gutenberg] | The Danish subsection from Project [Gutenberg](https://www.gutenberg.org) | Books | 6.76M | [Gutenberg] |
|
353 |
+
| [wikibooks] | The Danish Subsection of [Wikibooks](https://www.wikibooks.org) | Books | 6.24M | [CC-0] |
|
354 |
+
| [wikisource] | The Danish subsection of [Wikisource](https://en.wikisource.org/wiki/Main_Page) | Encyclopedic | 5.34M | [CC-0] |
|
355 |
+
| [jvj] | The works of the Danish author and poet, [Johannes V. Jensen](https://da.wikipedia.org/wiki/Johannes_V._Jensen) | Books | 3.55M | [CC-BY-SA 4.0] |
|
356 |
+
| [spont] | Conversational samples collected as a part of research projects at Aarhus University | Conversation | 1.56M | [CC-0] |
|
357 |
+
| [dannet] | [DanNet](https://cst.ku.dk/projekter/dannet) is a Danish WordNet | Other | 1.48M | [DanNet 1.0] |
|
358 |
+
| [relig] | Danish religious text from the 1700-2022 | Books | 1.24M | [CC-0] |
|
359 |
+
| [ncc_newspaper] | OCR'd Newspapers derived from [NCC](https://huggingface.co/datasets/NbAiLab/NCC) | News | 1.05M | [CC-0] |
|
360 |
+
| [botxt] | The Bornholmsk Ordbog Dictionary Project | Dialect | 847.97K | [CC-0] |
|
361 |
+
| [naat] | Danish speeches from 1930-2022 | Conversation | 286.68K | [CC-0] |
|
362 |
+
| [depbank] | The Danish subsection of the [Universal Dependencies Treebank](https://github.com/UniversalDependencies/UD_Danish-DDT) | Other | 185.45K | [CC-BY-SA 4.0] |
|
363 |
+
| [synne] | Dataset collected from [synnejysk forening's website](https://www.synnejysk.dk), covering the Danish dialect sønderjysk | Other | 52.02K | [CC-0] |
|
364 |
+
| **Total** | | | 4.78B | |
|
365 |
|
366 |
[ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
|
367 |
[cellar]: data/cellar/cellar.md
|
|
|
398 |
[relig]: data/relig/relig.md
|
399 |
[nota]: data/nota/nota.md
|
400 |
[health_hovedstaden]: data/health_hovedstaden/health_hovedstaden.md
|
401 |
+
[domsdatabasen]: data/domsdatabasen/domsdatabasen.md
|
402 |
|
403 |
|
404 |
[CC-0]: https://creativecommons.org/publicdomain/zero/1.0/legalcode.en
|
|
|
409 |
[Danish Copyright Law]: ./data/retsinformationdk/retsinformationdk.md#license-information
|
410 |
[DanNet 1.0]: ./data/dannet/dannet.md#license-information
|
411 |
[Gutenberg]: ./data/gutenberg/gutenberg.md#license-information
|
412 |
+
[Danish Copyright Law]: ./data/domsdatabasen/domsdatabasen.md#license-information
|
413 |
<!-- END-MAIN TABLE -->
|
414 |
|
415 |
|
data/domsdatabasen/create.py
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# /// script
|
2 |
+
# requires-python = ">=3.12"
|
3 |
+
# dependencies = [
|
4 |
+
# "datasets",
|
5 |
+
# "dynaword",
|
6 |
+
# "marker-pdf",
|
7 |
+
# "requests",
|
8 |
+
# "torch",
|
9 |
+
# ]
|
10 |
+
#
|
11 |
+
# [tool.uv.sources]
|
12 |
+
# dynaword = { git = "https://huggingface.co/datasets/danish-foundation-models/danish-dynaword" }
|
13 |
+
# ///
|
14 |
+
|
15 |
+
"""
|
16 |
+
Script for downloading and processing the Domsdatabasen.dk site.
|
17 |
+
|
18 |
+
Note: To run this script, you need to set `GIT_LFS_SKIP_SMUDGE=1` to be able to install dynaword:
|
19 |
+
|
20 |
+
```bash
|
21 |
+
GIT_LFS_SKIP_SMUDGE=1 uv run data/domsdatabasen/create.py
|
22 |
+
```
|
23 |
+
|
24 |
+
Note: This script is designed to be run using a GPU.
|
25 |
+
"""
|
26 |
+
|
27 |
+
import atexit
|
28 |
+
import logging
|
29 |
+
import os
|
30 |
+
import csv
|
31 |
+
import time
|
32 |
+
from typing import cast
|
33 |
+
|
34 |
+
import torch
|
35 |
+
|
36 |
+
import gc
|
37 |
+
import requests
|
38 |
+
import torch.multiprocessing as mp
|
39 |
+
from pathlib import Path
|
40 |
+
from datetime import date, datetime
|
41 |
+
|
42 |
+
from datasets import Dataset, concatenate_datasets
|
43 |
+
from marker.converters.pdf import PdfConverter
|
44 |
+
from marker.models import create_model_dict
|
45 |
+
from marker.output import text_from_rendered
|
46 |
+
|
47 |
+
from dynaword.process_dataset import (
|
48 |
+
add_token_count,
|
49 |
+
ensure_column_order,
|
50 |
+
remove_duplicate_text,
|
51 |
+
remove_empty_texts,
|
52 |
+
)
|
53 |
+
|
54 |
+
logger = logging.getLogger(__name__)
|
55 |
+
|
56 |
+
# ----------------- Config ------------------
|
57 |
+
|
58 |
+
PDF_DIR = Path(__file__).parent / "pdfs"
|
59 |
+
LOG_FILE = Path(__file__).parent / "progress_log.csv"
|
60 |
+
PARQUET_FILE = Path(__file__).parent / "domsdatabasen.parquet"
|
61 |
+
MAX_WORKERS = 10
|
62 |
+
RETRY_COUNT = 3
|
63 |
+
RETRY_DELAY = 2
|
64 |
+
|
65 |
+
# ----------------- Headers ------------------
|
66 |
+
|
67 |
+
HEADERS = {
|
68 |
+
"Accept": "application/json, text/plain, */*",
|
69 |
+
"Accept-Encoding": "gzip, deflate, br, zstd",
|
70 |
+
"Accept-Language": "en-GB,en-US;q=0.9,en;q=0.8",
|
71 |
+
"Connection": "keep-alive",
|
72 |
+
"Content-Type": "application/json",
|
73 |
+
}
|
74 |
+
|
75 |
+
|
76 |
+
def init_csv():
|
77 |
+
if not LOG_FILE.exists():
|
78 |
+
with open(LOG_FILE, "w", newline="", encoding="utf-8") as f:
|
79 |
+
writer = csv.DictWriter(
|
80 |
+
f,
|
81 |
+
fieldnames=["document_id", "pdf_downloaded", "text_extracted", "error"],
|
82 |
+
)
|
83 |
+
writer.writeheader()
|
84 |
+
|
85 |
+
|
86 |
+
def append_log(document_id: str, pdf: bool, text: bool, error: str = ""):
|
87 |
+
with open(LOG_FILE, "a", newline="", encoding="utf-8") as f:
|
88 |
+
writer = csv.DictWriter(
|
89 |
+
f, fieldnames=["document_id", "pdf_downloaded", "text_extracted", "error"]
|
90 |
+
)
|
91 |
+
writer.writerow(
|
92 |
+
{
|
93 |
+
"document_id": document_id,
|
94 |
+
"pdf_downloaded": int(pdf),
|
95 |
+
"text_extracted": int(text),
|
96 |
+
"error": error,
|
97 |
+
}
|
98 |
+
)
|
99 |
+
|
100 |
+
|
101 |
+
def load_existing_ids() -> set:
|
102 |
+
if not PARQUET_FILE.exists():
|
103 |
+
return set()
|
104 |
+
ds = Dataset.from_parquet(str(PARQUET_FILE))
|
105 |
+
ds = cast(Dataset, ds)
|
106 |
+
return set(ds["id"])
|
107 |
+
|
108 |
+
|
109 |
+
# ----------------- Retry Helpers ------------------
|
110 |
+
|
111 |
+
|
112 |
+
def retry(func, *args, retries=RETRY_COUNT, delay=RETRY_DELAY, **kwargs):
|
113 |
+
for attempt in range(retries):
|
114 |
+
try:
|
115 |
+
return func(*args, **kwargs)
|
116 |
+
except Exception as e:
|
117 |
+
logger.warning(f"⚠️ Retry {attempt+1}/{retries} failed: {e}")
|
118 |
+
time.sleep(delay)
|
119 |
+
raise RuntimeError(f"❌ All retries failed for {func.__name__}({args})")
|
120 |
+
|
121 |
+
|
122 |
+
# ----------------- PDF Download ------------------
|
123 |
+
|
124 |
+
|
125 |
+
def download_pdf(document: dict) -> Path | None:
|
126 |
+
document_id = document["id"]
|
127 |
+
out_path = PDF_DIR / f"document_{document_id}.pdf"
|
128 |
+
if out_path.exists():
|
129 |
+
logger.info(f"⏭️ Skipped PDF (exists): {document_id}")
|
130 |
+
return out_path
|
131 |
+
|
132 |
+
url = f"https://domsdatabasen.dk/webapi/api/Case/document/download/{document_id}"
|
133 |
+
try:
|
134 |
+
response = retry(requests.get, url, headers=HEADERS)
|
135 |
+
if response.status_code == 200:
|
136 |
+
with open(out_path, "wb") as f:
|
137 |
+
f.write(response.content)
|
138 |
+
logger.info(f"✅ Downloaded PDF: {document_id}")
|
139 |
+
append_log(document_id, pdf=True, text=False)
|
140 |
+
return out_path
|
141 |
+
else:
|
142 |
+
raise RuntimeError(f"Download failed: {response.status_code}")
|
143 |
+
except Exception as e:
|
144 |
+
append_log(document_id, pdf=False, text=False, error=str(e))
|
145 |
+
return None
|
146 |
+
|
147 |
+
|
148 |
+
# ----------------- Parallel Extract Text ------------------
|
149 |
+
|
150 |
+
|
151 |
+
def worker_init():
|
152 |
+
model_dict = create_model_dict()
|
153 |
+
|
154 |
+
global model_refs
|
155 |
+
model_refs = model_dict
|
156 |
+
|
157 |
+
# Ensure we clean up the model references on exit
|
158 |
+
atexit.register(worker_exit)
|
159 |
+
|
160 |
+
|
161 |
+
def worker_exit():
|
162 |
+
global model_refs
|
163 |
+
try:
|
164 |
+
del model_refs
|
165 |
+
except Exception:
|
166 |
+
pass
|
167 |
+
|
168 |
+
|
169 |
+
def process_document(document: dict) -> dict | None:
|
170 |
+
# from marker.output import text_from_rendered
|
171 |
+
# from marker.converters.pdf import PdfConverter
|
172 |
+
|
173 |
+
torch.set_num_threads(2)
|
174 |
+
|
175 |
+
document_id = document["id"]
|
176 |
+
verdict_date = document.get("verdictDateTime")
|
177 |
+
pdf_path = PDF_DIR / f"document_{document_id}.pdf"
|
178 |
+
|
179 |
+
if not pdf_path.exists():
|
180 |
+
url = (
|
181 |
+
f"https://domsdatabasen.dk/webapi/api/Case/document/download/{document_id}"
|
182 |
+
)
|
183 |
+
try:
|
184 |
+
response = retry(requests.get, url, headers=HEADERS)
|
185 |
+
if response.status_code == 200:
|
186 |
+
with open(pdf_path, "wb") as f:
|
187 |
+
f.write(response.content)
|
188 |
+
logger.info(f"✅ Downloaded PDF: {document_id}")
|
189 |
+
else:
|
190 |
+
raise RuntimeError(f"Download failed: {response.status_code}")
|
191 |
+
except Exception as e:
|
192 |
+
append_log(document_id, pdf=False, text=False, error=str(e))
|
193 |
+
return None
|
194 |
+
|
195 |
+
config = {"pdftext_workers": 1, "extract_images": False, "disable_tqdm": True}
|
196 |
+
|
197 |
+
try:
|
198 |
+
converter = PdfConverter(artifact_dict=model_refs, config=config)
|
199 |
+
rendered = retry(converter, str(pdf_path))
|
200 |
+
text, _, _ = text_from_rendered(rendered)
|
201 |
+
logger.info(f"🖍️ Extracted text: {document_id}")
|
202 |
+
append_log(document_id, pdf=True, text=True)
|
203 |
+
|
204 |
+
del rendered
|
205 |
+
del converter
|
206 |
+
|
207 |
+
return {
|
208 |
+
"id": document_id,
|
209 |
+
"text": text,
|
210 |
+
"source": "Domsdatabasen",
|
211 |
+
"created": format_created(verdict_date),
|
212 |
+
"added": date.today().isoformat(),
|
213 |
+
"metadata": {},
|
214 |
+
}
|
215 |
+
except Exception as e:
|
216 |
+
append_log(document_id, pdf=True, text=False, error=str(e))
|
217 |
+
return None
|
218 |
+
finally:
|
219 |
+
gc.collect()
|
220 |
+
|
221 |
+
|
222 |
+
# ----------------- Page Fetching ------------------
|
223 |
+
|
224 |
+
|
225 |
+
def fetch_case_page(page_num: int) -> tuple[list[dict], int]:
|
226 |
+
url = f"https://domsdatabasen.dk/webapi/api/Case/advanced?sorting=VerdictDateDesc&page={page_num}&pageSize=100"
|
227 |
+
response = retry(requests.post, url, headers=HEADERS, json={})
|
228 |
+
data = response.json()
|
229 |
+
|
230 |
+
document_entries = []
|
231 |
+
for case in data.get("cases", []):
|
232 |
+
for doc in case.get("documents", []):
|
233 |
+
document_entries.append(
|
234 |
+
{
|
235 |
+
"id": doc["id"],
|
236 |
+
"verdictDateTime": doc.get("verdictDateTime"),
|
237 |
+
}
|
238 |
+
)
|
239 |
+
|
240 |
+
return document_entries, data.get("pageCount", 1)
|
241 |
+
|
242 |
+
|
243 |
+
# ----------------- Utilities ------------------
|
244 |
+
|
245 |
+
|
246 |
+
def format_created(verdict_date: str | None) -> str:
|
247 |
+
if verdict_date:
|
248 |
+
try:
|
249 |
+
dt = datetime.fromisoformat(verdict_date)
|
250 |
+
formatted = dt.date().isoformat()
|
251 |
+
return f"{formatted}, {formatted}"
|
252 |
+
except Exception:
|
253 |
+
pass
|
254 |
+
today = date.today().isoformat()
|
255 |
+
return f"{today}, {today}"
|
256 |
+
|
257 |
+
|
258 |
+
# ----------------- Main Loop ------------------
|
259 |
+
|
260 |
+
|
261 |
+
def main():
|
262 |
+
PDF_DIR.mkdir(exist_ok=True)
|
263 |
+
init_csv()
|
264 |
+
|
265 |
+
all_records = []
|
266 |
+
page_num = 1
|
267 |
+
_, total_pages = fetch_case_page(1)
|
268 |
+
logger.info(f"📄 Total pages: {total_pages}")
|
269 |
+
|
270 |
+
existing_ids = load_existing_ids()
|
271 |
+
logger.info(f"🔄 Resuming with {len(existing_ids)} already processed IDs")
|
272 |
+
|
273 |
+
while page_num <= total_pages:
|
274 |
+
logger.info(f"\n🔎 Fetching page {page_num}/{total_pages}")
|
275 |
+
|
276 |
+
try:
|
277 |
+
doc_infos, _ = fetch_case_page(page_num)
|
278 |
+
except Exception as e:
|
279 |
+
logger.warning(f"❌ Failed to fetch page {page_num}: {e}")
|
280 |
+
page_num += 1
|
281 |
+
continue
|
282 |
+
|
283 |
+
doc_infos = [doc for doc in doc_infos if doc["id"] not in existing_ids]
|
284 |
+
|
285 |
+
# Extract text in parallel using multiprocessing
|
286 |
+
with mp.Pool(
|
287 |
+
processes=MAX_WORKERS, initializer=worker_init, maxtasksperchild=10
|
288 |
+
) as pool:
|
289 |
+
results = pool.map(process_document, doc_infos)
|
290 |
+
|
291 |
+
all_records.extend([r for r in results if r])
|
292 |
+
|
293 |
+
if all_records:
|
294 |
+
ds_new = Dataset.from_list(all_records)
|
295 |
+
|
296 |
+
if PARQUET_FILE.exists():
|
297 |
+
ds_old = Dataset.from_parquet(str(PARQUET_FILE))
|
298 |
+
ds_old = cast(Dataset, ds_old)
|
299 |
+
ds_combined = concatenate_datasets([ds_old, ds_new])
|
300 |
+
else:
|
301 |
+
ds_combined = ds_new
|
302 |
+
|
303 |
+
ds_combined.to_parquet(str(PARQUET_FILE))
|
304 |
+
logger.info(f"📦 Appended {len(all_records)} records to {PARQUET_FILE}")
|
305 |
+
existing_ids.update([r["id"] for r in all_records])
|
306 |
+
all_records.clear()
|
307 |
+
|
308 |
+
page_num += 1
|
309 |
+
|
310 |
+
ds = Dataset.from_parquet(str(PARQUET_FILE))
|
311 |
+
ds = cast(Dataset, ds)
|
312 |
+
ds = remove_empty_texts(ds)
|
313 |
+
ds = remove_duplicate_text(ds)
|
314 |
+
ds = add_token_count(ds)
|
315 |
+
ds = ensure_column_order(ds)
|
316 |
+
|
317 |
+
ds.to_parquet(str(PARQUET_FILE))
|
318 |
+
|
319 |
+
|
320 |
+
if __name__ == "__main__":
|
321 |
+
# Ensure threads don't contend
|
322 |
+
os.environ["MKL_DYNAMIC"] = "FALSE"
|
323 |
+
os.environ["OMP_DYNAMIC"] = "FALSE"
|
324 |
+
os.environ["OMP_NUM_THREADS"] = "2" # Avoid OpenMP issues with multiprocessing
|
325 |
+
os.environ["OPENBLAS_NUM_THREADS"] = "2"
|
326 |
+
os.environ["MKL_NUM_THREADS"] = "2"
|
327 |
+
os.environ["GRPC_VERBOSITY"] = "ERROR"
|
328 |
+
os.environ["GLOG_minloglevel"] = "2"
|
329 |
+
os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = (
|
330 |
+
"1" # Transformers uses .isin for a simple op, which is not supported on MPS
|
331 |
+
)
|
332 |
+
os.environ["IN_STREAMLIT"] = "true" # Avoid multiprocessing inside surya
|
333 |
+
|
334 |
+
mp.set_start_method("spawn", force=True)
|
335 |
+
log_path = Path(__file__).parent / "domsdatabasen.log"
|
336 |
+
logging.basicConfig(
|
337 |
+
level=logging.INFO,
|
338 |
+
format="%(asctime)s - %(levelname)s - %(message)s",
|
339 |
+
handlers=[
|
340 |
+
logging.StreamHandler(),
|
341 |
+
logging.FileHandler(log_path),
|
342 |
+
],
|
343 |
+
)
|
344 |
+
main()
|
data/domsdatabasen/descriptive_stats.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"number_of_samples": 8468,
|
3 |
+
"average_document_length": 30235.720004723666,
|
4 |
+
"number_of_tokens": 86353024,
|
5 |
+
"revision": "6df6dde969c6de6fde8369c96c2702f2098176b1"
|
6 |
+
}
|
data/domsdatabasen/domsdatabasen.md
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pretty_name: Domsdatabasen.dk
|
3 |
+
language:
|
4 |
+
- da
|
5 |
+
license: other
|
6 |
+
license_name: Danish Copyright Law
|
7 |
+
size_categories:
|
8 |
+
- 10k-100k
|
9 |
+
task_categories:
|
10 |
+
- text-generation
|
11 |
+
- fill-mask
|
12 |
+
task_ids:
|
13 |
+
- language-modeling
|
14 |
+
source_datasets:
|
15 |
+
- danish-foundation-models/danish-gigaword
|
16 |
+
domains:
|
17 |
+
- Legal
|
18 |
+
---
|
19 |
+
|
20 |
+
# Dataset Card for Domsdatabasen.dk
|
21 |
+
|
22 |
+
<!-- START-SHORT DESCRIPTION -->
|
23 |
+
[Domsdatabasen.dk](https://domsdatabasen.dk/) is a public database containing selected judgments from the Danish courts.
|
24 |
+
<!-- END-SHORT DESCRIPTION -->
|
25 |
+
|
26 |
+
Launched in early 2022, the platform aims to increase transparency and public insight into the workings of the judiciary in Denmark. It is accessible to everyone – legal professionals, citizens, companies, and public authorities interested in Danish case law.
|
27 |
+
|
28 |
+
## Dataset Description
|
29 |
+
|
30 |
+
### Purpose and Scope
|
31 |
+
The main goal of the database is to support the principle of openness in the administration of justice. It offers users access to selected civil and criminal decisions, with an initial focus on rulings from the higher courts, such as:
|
32 |
+
|
33 |
+
- The Supreme Court (Højesteret)
|
34 |
+
- The High Courts (Landsretterne)
|
35 |
+
- The Maritime and Commercial Court (Sø- og Handelsretten)
|
36 |
+
|
37 |
+
Some rulings from the district courts (byretterne) are also included, particularly when they are part of a case string that has been appealed.
|
38 |
+
Over time, the database will expand in coverage and volume, especially as the court system transitions to new digital case management systems.
|
39 |
+
|
40 |
+
### Pseudonymization and Data Protection
|
41 |
+
All published rulings are pseudonymized to protect the privacy of individuals involved, in accordance with the EU General Data Protection Regulation (GDPR), the Danish Data Protection Act, and rules from the Danish Data Protection Agency.
|
42 |
+
|
43 |
+
Pseudonymization involves replacing personally identifiable information (e.g., names, CPR numbers) with general terms such as “the accused”, “witness 1”, etc. Additional data such as addresses or health-related details may be redacted or pseudonymized based on a case-specific evaluation.
|
44 |
+
|
45 |
+
Some roles and names are not pseudonymized, including:
|
46 |
+
|
47 |
+
- Judges from higher courts
|
48 |
+
- Legal representatives (lawyers)
|
49 |
+
- Author names in cited legal literature (unless directly involved in the case)
|
50 |
+
- Names in EU court decisions
|
51 |
+
|
52 |
+
Businesses involved in cases are typically not pseudonymized unless their name reveals personal information or constitutes a trade secret.
|
53 |
+
|
54 |
+
### Access and Development
|
55 |
+
Domsdatabasen is continuously being developed. As digitization progresses and technical workflows improve, the number of published decisions is expected to grow. The judgments are published as full case strings, including decisions at multiple judicial levels, providing context and legal reasoning throughout the appeal process.
|
56 |
+
|
57 |
+
|
58 |
+
<!-- START-DESC-STATS -->
|
59 |
+
- **Language**: dan, dansk, Danish
|
60 |
+
- **Domains**: Legal
|
61 |
+
- **Number of samples**: 8.47K
|
62 |
+
- **Number of tokens (Llama 3)**: 86.35M
|
63 |
+
- **Average document length (characters)**: 30235.72
|
64 |
+
<!-- END-DESC-STATS -->
|
65 |
+
|
66 |
+
|
67 |
+
## Dataset Structure
|
68 |
+
An example from the dataset looks as follows.
|
69 |
+
|
70 |
+
|
71 |
+
<!-- START-SAMPLE -->
|
72 |
+
```py
|
73 |
+
{
|
74 |
+
"id": "11389",
|
75 |
+
"text": "## **Ikke grundlag for varetægtsfængsling af hensyn til retshåndhævelsen**\n\nDer var ikke særligt bes[...]",
|
76 |
+
"source": "Domsdatabasen",
|
77 |
+
"added": "2025-07-04",
|
78 |
+
"created": "2025-07-04, 2025-07-04",
|
79 |
+
"token_count": 796
|
80 |
+
}
|
81 |
+
```
|
82 |
+
|
83 |
+
### Data Fields
|
84 |
+
|
85 |
+
An entry in the dataset consists of the following fields:
|
86 |
+
|
87 |
+
- `id` (`str`): An unique identifier for each document.
|
88 |
+
- `text`(`str`): The content of the document.
|
89 |
+
- `source` (`str`): The source of the document (see [Source Data](#source-data)).
|
90 |
+
- `added` (`str`): An date for when the document was added to this collection.
|
91 |
+
- `created` (`str`): An date range for when the document was originally created.
|
92 |
+
- `token_count` (`int`): The number of tokens in the sample computed using the Llama 8B tokenizer
|
93 |
+
<!-- END-SAMPLE -->
|
94 |
+
|
95 |
+
|
96 |
+
## License Information
|
97 |
+
<details>
|
98 |
+
<summary>Danish Copyright Law</summary>
|
99 |
+
<p>
|
100 |
+
Danish Copyright law at https://www.retsinformation.dk/forms/r0710.aspx?id=164796 states
|
101 |
+
|
102 |
+
§ 9. Love, administrative forskrifter, retsafgørelser og lignende offentlige aktstykker er ikke genstand for ophavsret.
|
103 |
+
|
104 |
+
Stk. 2. Bestemmelsen i stk. 1 gælder ikke for værker, der fremtræder som selvstændige bidrag i de i stk. 1 nævnte aktstykker. Sådanne værker må dog gengives i forbindelse med aktstykket. Retten til videre udnyttelse afhænger af de i øvrigt gældende regler.
|
105 |
+
|
106 |
+
</p>
|
107 |
+
</details>
|
108 |
+
|
109 |
+
|
110 |
+
### Dataset Statistics
|
111 |
+
|
112 |
+
<!-- START-DATASET PLOTS -->
|
113 |
+
<p align="center">
|
114 |
+
<img src="./images/dist_document_length.png" width="600" style="margin-right: 10px;" />
|
115 |
+
</p>
|
116 |
+
<!-- END-DATASET PLOTS -->
|
117 |
+
|
118 |
+
|
119 |
+
## Additional Information
|
120 |
+
|
121 |
+
**Extraction of text:** The documents being downloaded from [domsdatabasen.dk](https://www.domsdatabasen.dk/) is PDFs. To extract the texts from those, the `create.py` script uses the [marker-pdf](https://github.com/datalab-to/marker/tree/master) package.
|
data/domsdatabasen/domsdatabasen.parquet
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:132f593c951564e56c262520116bd02eea193f10443b9d12305e130dde16ee99
|
3 |
+
size 123195077
|
data/domsdatabasen/images/dist_document_length.png
ADDED
![]() |
Git LFS Details
|
descriptive_stats.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
-
"number_of_samples":
|
3 |
-
"average_document_length":
|
4 |
-
"number_of_tokens":
|
5 |
-
"revision": "
|
6 |
}
|
|
|
1 |
{
|
2 |
+
"number_of_samples": 960357,
|
3 |
+
"average_document_length": 15301.724414983179,
|
4 |
+
"number_of_tokens": 4784823570,
|
5 |
+
"revision": "02c4bb425478c6b3a421a5d30286ab0e4235a696"
|
6 |
}
|
images/dist_document_length.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
images/domain_distribution.png
CHANGED
![]() |
Git LFS Details
|
![]() |
Git LFS Details
|
images/tokens_over_time.html
CHANGED
@@ -2,6 +2,6 @@
|
|
2 |
<head><meta charset="utf-8" /></head>
|
3 |
<body>
|
4 |
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
|
5 |
-
<script charset="utf-8" src="https://cdn.plot.ly/plotly-3.0.1.min.js"></script> <div id="a8776fd6-9bc6-41ad-94a0-22c4d1eaf95e" class="plotly-graph-div" style="height:400px; width:600px;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("a8776fd6-9bc6-41ad-94a0-22c4d1eaf95e")) { Plotly.newPlot( "a8776fd6-9bc6-41ad-94a0-22c4d1eaf95e", [{"hovertemplate":"%{text}\u003cextra\u003e\u003c\u002fextra\u003e","line":{"color":"#DC2626","width":3},"marker":{"color":"#DC2626","size":5},"mode":"lines+markers","name":"Tokens","text":["Date: 2025-01-02\u003cbr\u003eTokens: 1.57G\u003cbr\u003eSamples: 546,769\u003cbr\u003eCommit: 9c15515d\u003cbr\u003eMessage: Added number of llama3 tokens to desc stats","Date: 2025-01-03\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +271.89M\u003cbr\u003eSamples: 576,589\u003cbr\u003eCommit: 38b692a5\u003cbr\u003eMessage: Added automatically updated samples to update_descriptive_stats.py","Date: 2025-01-04\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 576,589\u003cbr\u003eCommit: 546c3b35\u003cbr\u003eMessage: update opensubtitles","Date: 2025-01-05\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +5.40M\u003cbr\u003eSamples: 588,476\u003cbr\u003eCommit: 0cef3177\u003cbr\u003eMessage: Added distribution plot for number of tokens","Date: 2025-02-10\u003cbr\u003eTokens: 1.85G\u003cbr\u003eChange: +7.30M\u003cbr\u003eSamples: 588,922\u003cbr\u003eCommit: 97b3aa5d\u003cbr\u003eMessage: Add Nota-tekster (#41)","Date: 2025-03-10\u003cbr\u003eTokens: 1.85G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 588,922\u003cbr\u003eCommit: 5affec72\u003cbr\u003eMessage: add_memo (#42)","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +1.51G\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 65faa6e2\u003cbr\u003eMessage: a lot of improvements","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 43d839aa\u003cbr\u003eMessage: updates sheets","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 060c4430\u003cbr\u003eMessage: Updated changelog","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: c9397c44\u003cbr\u003eMessage: reformatted the readme","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +901.15M\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: d36009a4\u003cbr\u003eMessage: update desc stats","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: 2453a15a\u003cbr\u003eMessage: updated datasheet","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: 91cd694a\u003cbr\u003eMessage: docs: minor fixes to datasheets","Date: 2025-06-23\u003cbr\u003eTokens: 4.37G\u003cbr\u003eChange: +104.46M\u003cbr\u003eSamples: 891,094\u003cbr\u003eCommit: 16931a4c\u003cbr\u003eMessage: Fix memo (#68)","Date: 2025-06-25\u003cbr\u003eTokens: 4.37G\u003cbr\u003eChange: +581.06k\u003cbr\u003eSamples: 891,348\u003cbr\u003eCommit: 2c91001b\u003cbr\u003eMessage: Fix Danske Taler (#69)","Date: 2025-06-30\u003cbr\u003eTokens: 4.40G\u003cbr\u003eChange: +26.49M\u003cbr\u003eSamples: 915,090\u003cbr\u003eCommit: 7df022e7\u003cbr\u003eMessage: Adding Scrape Hovedstaden (#70)","Date: 2025-07-01\u003cbr\u003eTokens: 4.70G\u003cbr\u003eChange: +302.40M\u003cbr\u003eSamples: 951,889\u003cbr\u003eCommit: 6a2c8fbf\u003cbr\u003eMessage: update-retsinformationdk (#72)"],"x":["2025-01-02T00:00:00.000000000","2025-01-03T00:00:00.000000000","2025-01-04T00:00:00.000000000","2025-01-05T00:00:00.000000000","2025-02-10T00:00:00.000000000","2025-03-10T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-06-23T00:00:00.000000000","2025-06-25T00:00:00.000000000","2025-06-30T00:00:00.000000000","2025-07-01T00:00:00.000000000"],"y":[1567706760,1839599769,1839599769,1844994816,1852293828,1852293828,3363395483,3363395483,3363395483,3363395483,4264549097,4264549097,4264549097,4369008328,4369589385,4396075044,4698470546],"type":"scatter"}], {"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"shapes":[{"line":{"color":"gray","dash":"dash","width":1},"type":"line","x0":0,"x1":1,"xref":"x domain","y0":300000000,"y1":300000000,"yref":"y"},{"line":{"color":"gray","dash":"dash","width":1},"type":"line","x0":0,"x1":1,"xref":"x domain","y0":1000000000,"y1":1000000000,"yref":"y"}],"annotations":[{"font":{"color":"gray","size":12},"showarrow":false,"text":"Common Corpus (dan) (Langlais et al., 2025)","x":0,"xanchor":"left","xref":"x domain","y":300000000,"yanchor":"bottom","yref":"y"},{"font":{"color":"gray","size":12},"showarrow":false,"text":"Danish Gigaword (Derczynski et al., 2021)","x":0,"xanchor":"left","xref":"x domain","y":1000000000,"yanchor":"bottom","yref":"y"}],"title":{"text":"Number of Tokens Over Time in Danish Dynaword"},"xaxis":{"title":{"text":"Date"}},"yaxis":{"title":{"text":"Number of Tokens (Llama 3)"},"tickformat":".2s","ticksuffix":""},"hovermode":"closest","width":600,"height":400,"showlegend":false,"plot_bgcolor":"rgba(0,0,0,0)","paper_bgcolor":"rgba(0,0,0,0)"}, {"responsive": true} ) }; </script> </div>
|
6 |
</body>
|
7 |
</html>
|
|
|
2 |
<head><meta charset="utf-8" /></head>
|
3 |
<body>
|
4 |
<div> <script type="text/javascript">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>
|
5 |
+
<script charset="utf-8" src="https://cdn.plot.ly/plotly-3.0.1.min.js"></script> <div id="c0935e4f-c069-48ca-a414-42556becd26f" class="plotly-graph-div" style="height:400px; width:600px;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("c0935e4f-c069-48ca-a414-42556becd26f")) { Plotly.newPlot( "c0935e4f-c069-48ca-a414-42556becd26f", [{"hovertemplate":"%{text}\u003cextra\u003e\u003c\u002fextra\u003e","line":{"color":"#DC2626","width":3},"marker":{"color":"#DC2626","size":5},"mode":"lines+markers","name":"Tokens","text":["Date: 2025-01-02\u003cbr\u003eTokens: 1.57G\u003cbr\u003eSamples: 546,769\u003cbr\u003eCommit: 9c15515d\u003cbr\u003eMessage: Added number of llama3 tokens to desc stats","Date: 2025-01-03\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +271.89M\u003cbr\u003eSamples: 576,589\u003cbr\u003eCommit: 38b692a5\u003cbr\u003eMessage: Added automatically updated samples to update_descriptive_stats.py","Date: 2025-01-04\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 576,589\u003cbr\u003eCommit: 546c3b35\u003cbr\u003eMessage: update opensubtitles","Date: 2025-01-05\u003cbr\u003eTokens: 1.84G\u003cbr\u003eChange: +5.40M\u003cbr\u003eSamples: 588,476\u003cbr\u003eCommit: 0cef3177\u003cbr\u003eMessage: Added distribution plot for number of tokens","Date: 2025-02-10\u003cbr\u003eTokens: 1.85G\u003cbr\u003eChange: +7.30M\u003cbr\u003eSamples: 588,922\u003cbr\u003eCommit: 97b3aa5d\u003cbr\u003eMessage: Add Nota-tekster (#41)","Date: 2025-03-10\u003cbr\u003eTokens: 1.85G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 588,922\u003cbr\u003eCommit: 5affec72\u003cbr\u003eMessage: add_memo (#42)","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +1.51G\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 65faa6e2\u003cbr\u003eMessage: a lot of improvements","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 43d839aa\u003cbr\u003eMessage: updates sheets","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: 060c4430\u003cbr\u003eMessage: Updated changelog","Date: 2025-04-29\u003cbr\u003eTokens: 3.36G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 846,387\u003cbr\u003eCommit: c9397c44\u003cbr\u003eMessage: reformatted the readme","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +901.15M\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: 2453a15a\u003cbr\u003eMessage: updated datasheet","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: 91cd694a\u003cbr\u003eMessage: docs: minor fixes to datasheets","Date: 2025-05-12\u003cbr\u003eTokens: 4.26G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 891,075\u003cbr\u003eCommit: d36009a4\u003cbr\u003eMessage: update desc stats","Date: 2025-06-23\u003cbr\u003eTokens: 4.37G\u003cbr\u003eChange: +104.46M\u003cbr\u003eSamples: 891,094\u003cbr\u003eCommit: 16931a4c\u003cbr\u003eMessage: Fix memo (#68)","Date: 2025-06-25\u003cbr\u003eTokens: 4.37G\u003cbr\u003eChange: +581.06k\u003cbr\u003eSamples: 891,348\u003cbr\u003eCommit: 2c91001b\u003cbr\u003eMessage: Fix Danske Taler (#69)","Date: 2025-06-30\u003cbr\u003eTokens: 4.40G\u003cbr\u003eChange: +26.49M\u003cbr\u003eSamples: 915,090\u003cbr\u003eCommit: 7df022e7\u003cbr\u003eMessage: Adding Scrape Hovedstaden (#70)","Date: 2025-07-01\u003cbr\u003eTokens: 4.70G\u003cbr\u003eChange: +302.40M\u003cbr\u003eSamples: 951,889\u003cbr\u003eCommit: 6a2c8fbf\u003cbr\u003eMessage: update-retsinformationdk (#72)","Date: 2025-07-08\u003cbr\u003eTokens: 4.78G\u003cbr\u003eChange: +86.37M\u003cbr\u003eSamples: 960,405\u003cbr\u003eCommit: 8870700b\u003cbr\u003eMessage: Adding domsdatabasen."],"x":["2025-01-02T00:00:00.000000000","2025-01-03T00:00:00.000000000","2025-01-04T00:00:00.000000000","2025-01-05T00:00:00.000000000","2025-02-10T00:00:00.000000000","2025-03-10T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-04-29T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-05-12T00:00:00.000000000","2025-06-23T00:00:00.000000000","2025-06-25T00:00:00.000000000","2025-06-30T00:00:00.000000000","2025-07-01T00:00:00.000000000","2025-07-08T00:00:00.000000000"],"y":[1567706760,1839599769,1839599769,1844994816,1852293828,1852293828,3363395483,3363395483,3363395483,3363395483,4264549097,4264549097,4264549097,4369008328,4369589385,4396075044,4698470546,4784836610],"type":"scatter"}], {"template":{"data":{"histogram2dcontour":[{"type":"histogram2dcontour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"choropleth":[{"type":"choropleth","colorbar":{"outlinewidth":0,"ticks":""}}],"histogram2d":[{"type":"histogram2d","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"heatmap":[{"type":"heatmap","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"contourcarpet":[{"type":"contourcarpet","colorbar":{"outlinewidth":0,"ticks":""}}],"contour":[{"type":"contour","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"surface":[{"type":"surface","colorbar":{"outlinewidth":0,"ticks":""},"colorscale":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]]}],"mesh3d":[{"type":"mesh3d","colorbar":{"outlinewidth":0,"ticks":""}}],"scatter":[{"fillpattern":{"fillmode":"overlay","size":10,"solidity":0.2},"type":"scatter"}],"parcoords":[{"type":"parcoords","line":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolargl":[{"type":"scatterpolargl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"bar":[{"error_x":{"color":"#2a3f5f"},"error_y":{"color":"#2a3f5f"},"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"bar"}],"scattergeo":[{"type":"scattergeo","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterpolar":[{"type":"scatterpolar","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"histogram":[{"marker":{"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"histogram"}],"scattergl":[{"type":"scattergl","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatter3d":[{"type":"scatter3d","line":{"colorbar":{"outlinewidth":0,"ticks":""}},"marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermap":[{"type":"scattermap","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattermapbox":[{"type":"scattermapbox","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scatterternary":[{"type":"scatterternary","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"scattercarpet":[{"type":"scattercarpet","marker":{"colorbar":{"outlinewidth":0,"ticks":""}}}],"carpet":[{"aaxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"baxis":{"endlinecolor":"#2a3f5f","gridcolor":"white","linecolor":"white","minorgridcolor":"white","startlinecolor":"#2a3f5f"},"type":"carpet"}],"table":[{"cells":{"fill":{"color":"#EBF0F8"},"line":{"color":"white"}},"header":{"fill":{"color":"#C8D4E3"},"line":{"color":"white"}},"type":"table"}],"barpolar":[{"marker":{"line":{"color":"#E5ECF6","width":0.5},"pattern":{"fillmode":"overlay","size":10,"solidity":0.2}},"type":"barpolar"}],"pie":[{"automargin":true,"type":"pie"}]},"layout":{"autotypenumbers":"strict","colorway":["#636efa","#EF553B","#00cc96","#ab63fa","#FFA15A","#19d3f3","#FF6692","#B6E880","#FF97FF","#FECB52"],"font":{"color":"#2a3f5f"},"hovermode":"closest","hoverlabel":{"align":"left"},"paper_bgcolor":"white","plot_bgcolor":"#E5ECF6","polar":{"bgcolor":"#E5ECF6","angularaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"radialaxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"ternary":{"bgcolor":"#E5ECF6","aaxis":{"gridcolor":"white","linecolor":"white","ticks":""},"baxis":{"gridcolor":"white","linecolor":"white","ticks":""},"caxis":{"gridcolor":"white","linecolor":"white","ticks":""}},"coloraxis":{"colorbar":{"outlinewidth":0,"ticks":""}},"colorscale":{"sequential":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"sequentialminus":[[0.0,"#0d0887"],[0.1111111111111111,"#46039f"],[0.2222222222222222,"#7201a8"],[0.3333333333333333,"#9c179e"],[0.4444444444444444,"#bd3786"],[0.5555555555555556,"#d8576b"],[0.6666666666666666,"#ed7953"],[0.7777777777777778,"#fb9f3a"],[0.8888888888888888,"#fdca26"],[1.0,"#f0f921"]],"diverging":[[0,"#8e0152"],[0.1,"#c51b7d"],[0.2,"#de77ae"],[0.3,"#f1b6da"],[0.4,"#fde0ef"],[0.5,"#f7f7f7"],[0.6,"#e6f5d0"],[0.7,"#b8e186"],[0.8,"#7fbc41"],[0.9,"#4d9221"],[1,"#276419"]]},"xaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"yaxis":{"gridcolor":"white","linecolor":"white","ticks":"","title":{"standoff":15},"zerolinecolor":"white","automargin":true,"zerolinewidth":2},"scene":{"xaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"yaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2},"zaxis":{"backgroundcolor":"#E5ECF6","gridcolor":"white","linecolor":"white","showbackground":true,"ticks":"","zerolinecolor":"white","gridwidth":2}},"shapedefaults":{"line":{"color":"#2a3f5f"}},"annotationdefaults":{"arrowcolor":"#2a3f5f","arrowhead":0,"arrowwidth":1},"geo":{"bgcolor":"white","landcolor":"#E5ECF6","subunitcolor":"white","showland":true,"showlakes":true,"lakecolor":"white"},"title":{"x":0.05},"mapbox":{"style":"light"}}},"shapes":[{"line":{"color":"gray","dash":"dash","width":1},"type":"line","x0":0,"x1":1,"xref":"x domain","y0":300000000,"y1":300000000,"yref":"y"},{"line":{"color":"gray","dash":"dash","width":1},"type":"line","x0":0,"x1":1,"xref":"x domain","y0":1000000000,"y1":1000000000,"yref":"y"}],"annotations":[{"font":{"color":"gray","size":12},"showarrow":false,"text":"Common Corpus (dan) (Langlais et al., 2025)","x":0,"xanchor":"left","xref":"x domain","y":300000000,"yanchor":"bottom","yref":"y"},{"font":{"color":"gray","size":12},"showarrow":false,"text":"Danish Gigaword (Derczynski et al., 2021)","x":0,"xanchor":"left","xref":"x domain","y":1000000000,"yanchor":"bottom","yref":"y"}],"title":{"text":"Number of Tokens Over Time in Danish Dynaword"},"xaxis":{"title":{"text":"Date"}},"yaxis":{"title":{"text":"Number of Tokens (Llama 3)"},"tickformat":".2s","ticksuffix":""},"hovermode":"closest","width":600,"height":400,"showlegend":false,"plot_bgcolor":"rgba(0,0,0,0)","paper_bgcolor":"rgba(0,0,0,0)"}, {"responsive": true} ) }; </script> </div>
|
6 |
</body>
|
7 |
</html>
|
images/tokens_over_time.svg
CHANGED
|
|
pyproject.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
[project]
|
2 |
name = "dynaword"
|
3 |
-
version = "1.2.
|
4 |
description = "project code for the danish dynaword project"
|
5 |
readme = "README.md"
|
6 |
requires-python = ">=3.12,<3.13" # 3.13 have issues with spacy and pytorch
|
|
|
1 |
[project]
|
2 |
name = "dynaword"
|
3 |
+
version = "1.2.5"
|
4 |
description = "project code for the danish dynaword project"
|
5 |
readme = "README.md"
|
6 |
requires-python = ">=3.12,<3.13" # 3.13 have issues with spacy and pytorch
|
test_results.log
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
============================= test session starts ==============================
|
2 |
platform darwin -- Python 3.12.0, pytest-8.3.4, pluggy-1.5.0
|
3 |
-
rootdir: /Users/
|
4 |
configfile: pyproject.toml
|
5 |
plugins: anyio-4.9.0
|
6 |
-
collected
|
7 |
|
8 |
-
src/tests/test_dataset_schema.py ....................................... [
|
9 |
-
|
10 |
src/tests/test_datasheets.py ........................................... [ 35%]
|
11 |
........................................................................ [ 57%]
|
12 |
-
|
13 |
src/tests/test_load.py .. [ 77%]
|
14 |
src/tests/test_quality/test_duplicates.py .............................. [ 86%]
|
15 |
-
|
16 |
src/tests/test_quality/test_short_texts.py ............................. [ 97%]
|
17 |
-
|
18 |
src/tests/test_unique_ids.py . [100%]
|
19 |
|
20 |
=============================== warnings summary ===============================
|
21 |
-
src/tests/test_quality/test_short_texts.py:
|
22 |
-
/Users/
|
23 |
|
24 |
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
25 |
-
|
|
|
1 |
============================= test session starts ==============================
|
2 |
platform darwin -- Python 3.12.0, pytest-8.3.4, pluggy-1.5.0
|
3 |
+
rootdir: /Users/kristianjensen/Documents/danish-dynaword
|
4 |
configfile: pyproject.toml
|
5 |
plugins: anyio-4.9.0
|
6 |
+
collected 328 items
|
7 |
|
8 |
+
src/tests/test_dataset_schema.py ....................................... [ 11%]
|
9 |
+
................................. [ 21%]
|
10 |
src/tests/test_datasheets.py ........................................... [ 35%]
|
11 |
........................................................................ [ 57%]
|
12 |
+
................................................................. [ 76%]
|
13 |
src/tests/test_load.py .. [ 77%]
|
14 |
src/tests/test_quality/test_duplicates.py .............................. [ 86%]
|
15 |
+
......s [ 88%]
|
16 |
src/tests/test_quality/test_short_texts.py ............................. [ 97%]
|
17 |
+
....... [ 99%]
|
18 |
src/tests/test_unique_ids.py . [100%]
|
19 |
|
20 |
=============================== warnings summary ===============================
|
21 |
+
src/tests/test_quality/test_short_texts.py: 36 warnings
|
22 |
+
/Users/kristianjensen/Documents/danish-dynaword/.venv/lib/python3.12/site-packages/datasets/utils/_dill.py:385: DeprecationWarning: co_lnotab is deprecated, use co_lines instead.
|
23 |
|
24 |
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
|
25 |
+
================= 327 passed, 1 skipped, 36 warnings in 52.74s =================
|
uv.lock
CHANGED
The diff for this file is too large to render.
See raw diff
|
|