Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
Danish
ArXiv:
DOI:
Libraries:
Datasets
Dask
License:
kris927b commited on
Commit
4781621
·
verified ·
1 Parent(s): d216a7f

Update wiki, wikibooks, wikisource (#87)

Browse files

- Updated wiki, wikibooks, wikisource. (455c42b5f0afebf3803e6f7ffb455eff571e4ba7)
- Renamed wiki to wikipedia (154f222309459bef9a9e8d4675e7ef56dd638f56)
- Fixed rounding error in average tokens (a0053a7604c8fcae20ba45fd82ce71004e2e60db)
- Renamed wiki to wikipedia (12c0ca93c6898f3d4f4c8cbc88881ba73af57f6f)
- Improved token count (2a9b93c9c8a6caa932675681fd1a59f7220989b7)
- Fixed logging issues. (914ab8dfe209489ab09c14517ff18d3782566fff)
- Updated changelog to reflect new changes (0bd2b88ea6c556f47e07432cd6291eda5a9dc9b8)
- Adding explanation for the use of `wtf_wikipedia` as parser. (077726d1e73b4912d4b623020277019b06dddbdf)

.gitignore CHANGED
@@ -20,3 +20,6 @@ tmp.py
20
 
21
  ## to allow temporary data drops without pushing it to the hub
22
  data/*/tmp/*
 
 
 
 
20
 
21
  ## to allow temporary data drops without pushing it to the hub
22
  data/*/tmp/*
23
+
24
+ ## node_modules
25
+ **/node_modules/
CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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
 
9
  ## [v1.2.9] - 2025-08-05
10
 
 
5
 
6
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
7
 
8
+ ## [v1.2.10] - 2025-08-18
9
+
10
+ ### Changed
11
+
12
+ - Updated the wiki, wikibooks, wikisource datasets.
13
+ - Changed `wiki` to `wikipedia`
14
+ - Fixed rounding error in average token count
15
+ - Improved the speed of token counting
16
+
17
+ ### Added
18
+
19
+ - Added `create.py` for wiki, wikibooks, wikisource.
20
 
21
  ## [v1.2.9] - 2025-08-05
22
 
README.md CHANGED
@@ -152,10 +152,10 @@ configs:
152
  data_files:
153
  - split: train
154
  path: data/synne/*.parquet
155
- - config_name: wiki
156
  data_files:
157
  - split: train
158
- path: data/wiki/*.parquet
159
  - config_name: nordjyllandnews
160
  data_files:
161
  - split: train
@@ -194,7 +194,7 @@ https://github.com/huggingface/datasets/blob/main/templates/README_guide.md
194
  <!-- START README TABLE -->
195
  | | |
196
  | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
197
- | **Version** | 1.2.8 ([Changelog](/CHANGELOG.md)) |
198
  | **Language** | dan, dansk, Danish |
199
  | **License** | Openly Licensed, See the respective dataset |
200
  | **Models** | For model trained used this data see [danish-foundation-models](https://huggingface.co/danish-foundation-models) |
@@ -233,8 +233,8 @@ https://github.com/huggingface/datasets/blob/main/templates/README_guide.md
233
  ## Dataset Description
234
 
235
  <!-- START-DESC-STATS -->
236
- - **Number of samples**: 5.55M
237
- - **Number of tokens (Llama 3)**: 5.83B
238
  - **Average document length in tokens (min, max)**: 1.05K (2, 9.81M)
239
  <!-- END-DESC-STATS -->
240
 
@@ -299,16 +299,16 @@ This dynaword consist of data from various domains (e.g., legal, books, social m
299
  |:-------------|:---------------------------------------------------------------------------------------------------------|:------------|
300
  | Legal | [cellar], [eur-lex-sum-da], [fm-udgivelser], [retsinformationdk], [skat], [retspraksis], [domsdatabasen] | 2.32B |
301
  | News | [enevaeldens_nyheder], [ncc_newspaper], [tv2r], [nordjyllandnews] | 1.09B |
302
- | Books | [grundtvig], [ncc_books], [memo], [adl], [wikibooks], [jvj], [gutenberg], [relig] | 732.52M |
303
  | Conversation | [danske-taler], [opensubtitles], [ep], [ft], [spont], [naat] | 497.09M |
304
  | Social Media | [hest] | 389.32M |
305
  | Other | [ncc_parliament], [dannet], [depbank], [synne] | 340.59M |
306
  | Web | [ai-aktindsigt], [ncc_maalfrid], [miljoeportalen] | 295.87M |
307
- | Encyclopedic | [wikisource], [wiki] | 127.35M |
308
  | Medical | [health_hovedstaden] | 27.07M |
309
  | Readaloud | [nota] | 7.30M |
310
  | Dialect | [botxt] | 847.97K |
311
- | **Total** | | 5.83B |
312
 
313
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
314
  [cellar]: data/cellar/cellar.md
@@ -342,7 +342,7 @@ This dynaword consist of data from various domains (e.g., legal, books, social m
342
  [depbank]: data/depbank/depbank.md
343
  [naat]: data/naat/naat.md
344
  [synne]: data/synne/synne.md
345
- [wiki]: data/wiki/wiki.md
346
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
347
  [relig]: data/relig/relig.md
348
  [nota]: data/nota/nota.md
@@ -369,13 +369,13 @@ The following gives an overview of the licensing in the Dynaword. To get the exa
369
  These license is applied to the constituent data, i.e., the text. The collection of datasets (metadata, quality control, etc.) is licensed under [CC-0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.en).
370
 
371
  <!-- START-LICENSE TABLE -->
372
- | License | Sources | N. Tokens |
373
- |:--------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------|
374
- | CC-BY-SA 4.0 | [cellar], [enevaeldens_nyheder], [eur-lex-sum-da], [fm-udgivelser], [memo], [tv2r], [jvj], [depbank] | 2.41B |
375
- | CC-0 | [grundtvig], [danske-taler], [ncc_books], [ncc_newspaper], [miljoeportalen], [opensubtitles], [ep], [ft], [wikisource], [spont], [adl], [hest], [skat], [retspraksis], [wikibooks], [botxt], [naat], [synne], [wiki], [nordjyllandnews], [relig], [nota], [health_hovedstaden] | 2.00B |
376
- | Other (No attribution required) | [retsinformationdk], [domsdatabasen] | 904.61M |
377
- | Other (Attribution required) | [ai-aktindsigt], [ncc_maalfrid], [ncc_parliament], [dannet], [gutenberg] | 515.61M |
378
- | **Total** | | 5.83B |
379
 
380
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
381
  [cellar]: data/cellar/cellar.md
@@ -409,7 +409,7 @@ These license is applied to the constituent data, i.e., the text. The collection
409
  [depbank]: data/depbank/depbank.md
410
  [naat]: data/naat/naat.md
411
  [synne]: data/synne/synne.md
412
- [wiki]: data/wiki/wiki.md
413
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
414
  [relig]: data/relig/relig.md
415
  [nota]: data/nota/nota.md
@@ -487,10 +487,10 @@ You can learn more about each dataset by pressing the link in the first column.
487
  | [hest] | Samples from the Danish debate forum www.heste-nettet.dk | Social Media | 389.32M | [CC-0] |
488
  | [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] |
489
  | [opensubtitles] | Danish subsection of [OpenSubtitles](https://opus.nlpl.eu/OpenSubtitles/corpus/version/OpenSubtitles) | Conversation | 271.60M | [CC-0] |
 
490
  | [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] |
491
  | [miljoeportalen] | Data from [Danmarks Miljøportalen](https://www.miljoeportal.dk/om-danmarks-miljoeportal/) (Denmark's Environment Portal) | Web | 127.38M | [CC-0] |
492
  | [skat] | Skat is the Danish tax authority. This dataset contains content from its website skat.dk | Legal | 122.11M | [CC-0] |
493
- | [wiki] | The Danish subsection of [wikipedia](https://en.wikipedia.org/wiki/Main_Page) | Encyclopedic | 122.00M | [CC-0] |
494
  | [ft] | Records from all meetings of The Danish parliament (Folketinget) in the parliament hall | Conversation | 114.09M | [CC-0] |
495
  | [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] |
496
  | [ep] | The Danish subsection of [Europarl](https://aclanthology.org/2005.mtsummit-papers.11/) | Conversation | 100.84M | [CC-0] |
@@ -505,10 +505,10 @@ You can learn more about each dataset by pressing the link in the first column.
505
  | [tv2r] | Contemporary Danish newswire articles published between 2010 and 2019 | News | 21.67M | [CC-BY-SA 4.0] |
506
  | [grundtvig] | The complete collection of [Grundtvig](https://en.wikipedia.org/wiki/N._F._S._Grundtvig) (1783-1872) one of Denmark’s most influential figures | Books | 10.53M | [CC-0] |
507
  | [danske-taler] | Danish Speeches from [dansketaler.dk](https://www.dansketaler.dk) | Conversation | 8.72M | [CC-0] |
 
508
  | [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] |
509
  | [gutenberg] | The Danish subsection from Project [Gutenberg](https://www.gutenberg.org) | Books | 6.76M | [Gutenberg] |
510
- | [wikibooks] | The Danish Subsection of [Wikibooks](https://www.wikibooks.org) | Books | 6.24M | [CC-0] |
511
- | [wikisource] | The Danish subsection of [Wikisource](https://en.wikisource.org/wiki/Main_Page) | Encyclopedic | 5.34M | [CC-0] |
512
  | [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] |
513
  | [spont] | Conversational samples collected as a part of research projects at Aarhus University | Conversation | 1.56M | [CC-0] |
514
  | [dannet] | [DanNet](https://cst.ku.dk/projekter/dannet) is a Danish WordNet | Other | 1.48M | [DanNet 1.0] |
@@ -518,7 +518,7 @@ You can learn more about each dataset by pressing the link in the first column.
518
  | [naat] | Danish speeches from 1930-2022 | Conversation | 286.68K | [CC-0] |
519
  | [depbank] | The Danish subsection of the [Universal Dependencies Treebank](https://github.com/UniversalDependencies/UD_Danish-DDT) | Other | 185.45K | [CC-BY-SA 4.0] |
520
  | [synne] | Dataset collected from [synnejysk forening's website](https://www.synnejysk.dk), covering the Danish dialect sønderjysk | Other | 52.02K | [CC-0] |
521
- | **Total** | | | 5.83B | |
522
 
523
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
524
  [cellar]: data/cellar/cellar.md
@@ -552,7 +552,7 @@ You can learn more about each dataset by pressing the link in the first column.
552
  [depbank]: data/depbank/depbank.md
553
  [naat]: data/naat/naat.md
554
  [synne]: data/synne/synne.md
555
- [wiki]: data/wiki/wiki.md
556
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
557
  [relig]: data/relig/relig.md
558
  [nota]: data/nota/nota.md
 
152
  data_files:
153
  - split: train
154
  path: data/synne/*.parquet
155
+ - config_name: wikipedia
156
  data_files:
157
  - split: train
158
+ path: data/wikipedia/*.parquet
159
  - config_name: nordjyllandnews
160
  data_files:
161
  - split: train
 
194
  <!-- START README TABLE -->
195
  | | |
196
  | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
197
+ | **Version** | 1.2.10 ([Changelog](/CHANGELOG.md)) |
198
  | **Language** | dan, dansk, Danish |
199
  | **License** | Openly Licensed, See the respective dataset |
200
  | **Models** | For model trained used this data see [danish-foundation-models](https://huggingface.co/danish-foundation-models) |
 
233
  ## Dataset Description
234
 
235
  <!-- START-DESC-STATS -->
236
+ - **Number of samples**: 5.60M
237
+ - **Number of tokens (Llama 3)**: 5.88B
238
  - **Average document length in tokens (min, max)**: 1.05K (2, 9.81M)
239
  <!-- END-DESC-STATS -->
240
 
 
299
  |:-------------|:---------------------------------------------------------------------------------------------------------|:------------|
300
  | Legal | [cellar], [eur-lex-sum-da], [fm-udgivelser], [retsinformationdk], [skat], [retspraksis], [domsdatabasen] | 2.32B |
301
  | News | [enevaeldens_nyheder], [ncc_newspaper], [tv2r], [nordjyllandnews] | 1.09B |
302
+ | Books | [grundtvig], [ncc_books], [memo], [adl], [wikibooks], [jvj], [gutenberg], [relig] | 733.92M |
303
  | Conversation | [danske-taler], [opensubtitles], [ep], [ft], [spont], [naat] | 497.09M |
304
  | Social Media | [hest] | 389.32M |
305
  | Other | [ncc_parliament], [dannet], [depbank], [synne] | 340.59M |
306
  | Web | [ai-aktindsigt], [ncc_maalfrid], [miljoeportalen] | 295.87M |
307
+ | Encyclopedic | [wikisource], [wikipedia] | 179.61M |
308
  | Medical | [health_hovedstaden] | 27.07M |
309
  | Readaloud | [nota] | 7.30M |
310
  | Dialect | [botxt] | 847.97K |
311
+ | **Total** | | 5.88B |
312
 
313
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
314
  [cellar]: data/cellar/cellar.md
 
342
  [depbank]: data/depbank/depbank.md
343
  [naat]: data/naat/naat.md
344
  [synne]: data/synne/synne.md
345
+ [wikipedia]: data/wikipedia/wikipedia.md
346
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
347
  [relig]: data/relig/relig.md
348
  [nota]: data/nota/nota.md
 
369
  These license is applied to the constituent data, i.e., the text. The collection of datasets (metadata, quality control, etc.) is licensed under [CC-0](https://creativecommons.org/publicdomain/zero/1.0/legalcode.en).
370
 
371
  <!-- START-LICENSE TABLE -->
372
+ | License | Sources | N. Tokens |
373
+ |:--------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------|
374
+ | CC-BY-SA 4.0 | [cellar], [enevaeldens_nyheder], [eur-lex-sum-da], [fm-udgivelser], [memo], [tv2r], [jvj], [depbank] | 2.41B |
375
+ | CC-0 | [grundtvig], [danske-taler], [ncc_books], [ncc_newspaper], [miljoeportalen], [opensubtitles], [ep], [ft], [wikisource], [spont], [adl], [hest], [skat], [retspraksis], [wikibooks], [botxt], [naat], [synne], [wikipedia], [nordjyllandnews], [relig], [nota], [health_hovedstaden] | 2.06B |
376
+ | Other (No attribution required) | [retsinformationdk], [domsdatabasen] | 904.61M |
377
+ | Other (Attribution required) | [ai-aktindsigt], [ncc_maalfrid], [ncc_parliament], [dannet], [gutenberg] | 515.61M |
378
+ | **Total** | | 5.88B |
379
 
380
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
381
  [cellar]: data/cellar/cellar.md
 
409
  [depbank]: data/depbank/depbank.md
410
  [naat]: data/naat/naat.md
411
  [synne]: data/synne/synne.md
412
+ [wikipedia]: data/wikipedia/wikipedia.md
413
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
414
  [relig]: data/relig/relig.md
415
  [nota]: data/nota/nota.md
 
487
  | [hest] | Samples from the Danish debate forum www.heste-nettet.dk | Social Media | 389.32M | [CC-0] |
488
  | [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] |
489
  | [opensubtitles] | Danish subsection of [OpenSubtitles](https://opus.nlpl.eu/OpenSubtitles/corpus/version/OpenSubtitles) | Conversation | 271.60M | [CC-0] |
490
+ | [wikipedia] | The Danish subsection of [wikipedia](https://en.wikipedia.org/wiki/Main_Page) | Encyclopedic | 173.33M | [CC-0] |
491
  | [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] |
492
  | [miljoeportalen] | Data from [Danmarks Miljøportalen](https://www.miljoeportal.dk/om-danmarks-miljoeportal/) (Denmark's Environment Portal) | Web | 127.38M | [CC-0] |
493
  | [skat] | Skat is the Danish tax authority. This dataset contains content from its website skat.dk | Legal | 122.11M | [CC-0] |
 
494
  | [ft] | Records from all meetings of The Danish parliament (Folketinget) in the parliament hall | Conversation | 114.09M | [CC-0] |
495
  | [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] |
496
  | [ep] | The Danish subsection of [Europarl](https://aclanthology.org/2005.mtsummit-papers.11/) | Conversation | 100.84M | [CC-0] |
 
505
  | [tv2r] | Contemporary Danish newswire articles published between 2010 and 2019 | News | 21.67M | [CC-BY-SA 4.0] |
506
  | [grundtvig] | The complete collection of [Grundtvig](https://en.wikipedia.org/wiki/N._F._S._Grundtvig) (1783-1872) one of Denmark’s most influential figures | Books | 10.53M | [CC-0] |
507
  | [danske-taler] | Danish Speeches from [dansketaler.dk](https://www.dansketaler.dk) | Conversation | 8.72M | [CC-0] |
508
+ | [wikibooks] | The Danish Subsection of [Wikibooks](https://www.wikibooks.org) | Books | 7.63M | [CC-0] |
509
  | [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] |
510
  | [gutenberg] | The Danish subsection from Project [Gutenberg](https://www.gutenberg.org) | Books | 6.76M | [Gutenberg] |
511
+ | [wikisource] | The Danish subsection of [Wikisource](https://en.wikisource.org/wiki/Main_Page) | Encyclopedic | 6.28M | [CC-0] |
 
512
  | [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] |
513
  | [spont] | Conversational samples collected as a part of research projects at Aarhus University | Conversation | 1.56M | [CC-0] |
514
  | [dannet] | [DanNet](https://cst.ku.dk/projekter/dannet) is a Danish WordNet | Other | 1.48M | [DanNet 1.0] |
 
518
  | [naat] | Danish speeches from 1930-2022 | Conversation | 286.68K | [CC-0] |
519
  | [depbank] | The Danish subsection of the [Universal Dependencies Treebank](https://github.com/UniversalDependencies/UD_Danish-DDT) | Other | 185.45K | [CC-BY-SA 4.0] |
520
  | [synne] | Dataset collected from [synnejysk forening's website](https://www.synnejysk.dk), covering the Danish dialect sønderjysk | Other | 52.02K | [CC-0] |
521
+ | **Total** | | | 5.88B | |
522
 
523
  [ai-aktindsigt]: data/ai-aktindsigt/ai-aktindsigt.md
524
  [cellar]: data/cellar/cellar.md
 
552
  [depbank]: data/depbank/depbank.md
553
  [naat]: data/naat/naat.md
554
  [synne]: data/synne/synne.md
555
+ [wikipedia]: data/wikipedia/wikipedia.md
556
  [nordjyllandnews]: data/nordjyllandnews/nordjyllandnews.md
557
  [relig]: data/relig/relig.md
558
  [nota]: data/nota/nota.md
data/wiki/descriptive_stats.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "number_of_samples": 264433,
3
- "number_of_tokens": 122002149,
4
- "min_length_tokens": 3,
5
- "max_length_tokens": 83123,
6
- "number_of_characters": 366763808,
7
- "min_length_characters": 5,
8
- "max_length_characters": 247835
9
- }
 
 
 
 
 
 
 
 
 
 
data/wikibooks/create.py ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "datasets",
5
+ # "mediawiki-dump",
6
+ # "mwparserfromhell",
7
+ # "pandas",
8
+ # "requests",
9
+ # "tqdm",
10
+ # "transformers",
11
+ # "dynaword"
12
+ # ]
13
+ # [tool.uv.sources]
14
+ # dynaword = { git = "https://huggingface.co/datasets/danish-foundation-models/danish-dynaword", rev = "00e7f2aee7f7ad2da423419f77ecbb9c0536de0d" }
15
+ # ///
16
+ import bz2
17
+ import datetime
18
+ import json
19
+ import logging
20
+ import os
21
+ import re
22
+ import subprocess
23
+ import sys
24
+ import threading
25
+
26
+ from mediawiki_dump.dumps import IteratorDump
27
+ from mediawiki_dump.reader import DumpReaderArticles
28
+
29
+ from mwparserfromhell import parse
30
+
31
+ import requests
32
+ from tqdm import tqdm
33
+ import pandas as pd
34
+
35
+ from datasets import Dataset
36
+ from transformers import AutoTokenizer
37
+ from concurrent.futures import ProcessPoolExecutor
38
+ from functools import partial
39
+ from typing import Any, Tuple
40
+
41
+ from dynaword.process_dataset import (
42
+ add_token_count,
43
+ ensure_column_order,
44
+ remove_duplicate_text,
45
+ remove_empty_texts,
46
+ )
47
+
48
+ logger = logging.getLogger(__name__)
49
+ logging.basicConfig(
50
+ level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
51
+ )
52
+ source = "wikibooks"
53
+
54
+
55
+ class WtfNodeBridge:
56
+ """
57
+ Persistent Node bridge to wtf_wikipedia.
58
+ Call .parse(wikitext, lang=None) -> (text, is_redirect)
59
+ Remember to call .close() when done.
60
+ """
61
+
62
+ def __init__(
63
+ self, node_script_path: str = "parser/wtf_bridge.js", node_cmd: str = "node"
64
+ ):
65
+ self.proc = subprocess.Popen(
66
+ [node_cmd, node_script_path],
67
+ stdin=subprocess.PIPE,
68
+ stdout=subprocess.PIPE,
69
+ stderr=subprocess.PIPE,
70
+ text=True,
71
+ encoding="utf-8",
72
+ bufsize=1,
73
+ )
74
+ self._lock = threading.Lock()
75
+
76
+ # background thread to log stderr (helpful for debugging)
77
+ def _drain_stderr(p):
78
+ try:
79
+ for line in p.stderr:
80
+ logger.warning("wtf_node stderr: %s", line.rstrip())
81
+ except Exception:
82
+ pass
83
+
84
+ t = threading.Thread(target=_drain_stderr, args=(self.proc,), daemon=True)
85
+ t.start()
86
+
87
+ def parse(self, wikitext: str, lang: str | None = None) -> Tuple[str, bool]:
88
+ if self.proc.poll() is not None:
89
+ raise RuntimeError("Node bridge process has exited")
90
+ payload = {"wikitext": wikitext}
91
+ if lang:
92
+ payload["lang"] = lang
93
+ line = json.dumps(payload, ensure_ascii=False)
94
+ with self._lock:
95
+ # write and flush a single JSON line
96
+ try:
97
+ self.proc.stdin.write(line + "\n")
98
+ self.proc.stdin.flush()
99
+ except BrokenPipeError as e:
100
+ raise RuntimeError("Broken pipe writing to node bridge") from e
101
+
102
+ # read exactly one JSON line back
103
+ out_line = self.proc.stdout.readline()
104
+ if not out_line:
105
+ raise RuntimeError("No response from node bridge (it may have exited)")
106
+ res = json.loads(out_line)
107
+ if res.get("error"):
108
+ # choose to either raise or return empty text; here we raise
109
+ raise RuntimeError("Node bridge error: " + res["error"])
110
+ return res.get("text", ""), bool(res.get("isRedirect", False))
111
+
112
+ def close(self):
113
+ try:
114
+ if self.proc.stdin:
115
+ self.proc.stdin.close()
116
+ except Exception:
117
+ pass
118
+ try:
119
+ self.proc.terminate()
120
+ self.proc.wait(timeout=3)
121
+ except Exception:
122
+ try:
123
+ self.proc.kill()
124
+ except Exception:
125
+ pass
126
+
127
+
128
+ def download_wiki_dump(url: str, file_path: str):
129
+ """
130
+ Downloads a file from a URL with a progress bar.
131
+
132
+ Args:
133
+ url (str): The URL of the file to download.
134
+ file_path (str): The local path to save the file.
135
+ """
136
+ print(f"Downloading {url} to {file_path}...")
137
+ try:
138
+ with requests.get(url, stream=True) as r:
139
+ r.raise_for_status()
140
+ total_size = int(r.headers.get("content-length", 0))
141
+ block_size = 8192 # 8 Kibibytes
142
+
143
+ with (
144
+ open(file_path, "wb") as f,
145
+ tqdm(
146
+ total=total_size, unit="B", unit_scale=True, desc="Downloading"
147
+ ) as pbar,
148
+ ):
149
+ for chunk in r.iter_content(chunk_size=block_size):
150
+ if chunk: # filter out keep-alive chunks
151
+ f.write(chunk)
152
+ pbar.update(len(chunk))
153
+ logger.info("\nDownload complete.")
154
+ except requests.exceptions.RequestException as e:
155
+ logger.error(f"\nError downloading file: {e}")
156
+ sys.exit(1)
157
+
158
+
159
+ def get_content(file_name: str):
160
+ with bz2.open(file_name, mode="r") as fp:
161
+ yield from fp
162
+
163
+
164
+ def process_dump_to_parquet(bz2_file_path: str, parquet_file_path: str):
165
+ dump = IteratorDump(iterator=get_content(file_name=bz2_file_path))
166
+ pages = DumpReaderArticles().read(dump)
167
+ articles = []
168
+ today = datetime.datetime.now().strftime("%Y-%m-%d")
169
+
170
+ bridge = WtfNodeBridge("parser/wtf_bridge.js")
171
+ try:
172
+ for page in tqdm(pages):
173
+ try:
174
+ plain_text, is_redirect = bridge.parse(page.content, lang="da")
175
+ except Exception as exc:
176
+ logger.warning(
177
+ "wtf parse failed for page %s: %s -- falling back to mwparserfromhell",
178
+ getattr(page, "title", "<unknown>"),
179
+ exc,
180
+ )
181
+ plain_text = parse(page.content).strip_code().strip()
182
+ is_redirect = plain_text.startswith("REDIRECT")
183
+
184
+ if is_redirect:
185
+ continue
186
+
187
+ # Additional cleanup if you like (wtf.text() already removes a lot)
188
+ plain_text = re.sub(
189
+ r"thumb(?:\|(?:left|right|center|\d+px)*)*\|[^\n]*", "", plain_text
190
+ ).strip()
191
+
192
+ if len(plain_text) == 0:
193
+ logger.warning("Skipping empty article")
194
+ continue
195
+
196
+ date = datetime.datetime.strptime(
197
+ page.timestamp, "%Y-%m-%dT%H:%M:%SZ"
198
+ ).strftime("%Y-%m-%d")
199
+
200
+ articles.append(
201
+ {
202
+ "id": f"{source}_{page.page_id}",
203
+ "source": source,
204
+ "created": f"{date}, {date}",
205
+ "text": f"{page.title}\n{plain_text}",
206
+ "added": today,
207
+ }
208
+ )
209
+ finally:
210
+ bridge.close()
211
+
212
+ df = pd.DataFrame(articles)
213
+ ds = Dataset.from_pandas(df)
214
+ ds = add_token_count(ds)
215
+ ds = remove_empty_texts(ds)
216
+ ds = remove_duplicate_text(ds)
217
+ ds = ensure_column_order(ds)
218
+ ds.to_parquet(parquet_file_path, compression="snappy")
219
+
220
+
221
+ def main():
222
+ """
223
+ Main function to orchestrate the download and processing.
224
+ """
225
+ # --- Configuration ---
226
+ # URL for the latest Danish Wikipedia articles dump
227
+ WIKI_DUMP_URL = f"https://dumps.wikimedia.org/da{source}/latest/da{source}-latest-pages-articles.xml.bz2"
228
+
229
+ # Local file paths
230
+ DOWNLOADED_BZ2_FILE = f"tmp/da{source}-latest-pages-articles.xml.bz2"
231
+ OUTPUT_PARQUET_FILE = f"{source}.parquet"
232
+
233
+ # --- Execution ---
234
+ # 1. Download the dump file
235
+ if not os.path.exists(DOWNLOADED_BZ2_FILE):
236
+ download_wiki_dump(WIKI_DUMP_URL, DOWNLOADED_BZ2_FILE)
237
+ else:
238
+ print(f"File '{DOWNLOADED_BZ2_FILE}' already exists. Skipping download.")
239
+
240
+ # 2. Process the dump and save to Parquet
241
+ process_dump_to_parquet(DOWNLOADED_BZ2_FILE, OUTPUT_PARQUET_FILE)
242
+
243
+ # 3. (Optional) Clean up the downloaded file
244
+ # If you want to keep the bz2 file, comment out the next line.
245
+ print(f"Cleaning up by removing '{DOWNLOADED_BZ2_FILE}'...")
246
+ os.remove(DOWNLOADED_BZ2_FILE)
247
+
248
+ print("\nScript finished successfully.")
249
+
250
+
251
+ if __name__ == "__main__":
252
+ # Before running, make sure you have the required libraries installed:
253
+ # pip install requests mwparserfromhell pandas pyarrow
254
+ main()
data/wikibooks/descriptive_stats.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "number_of_samples": 1268,
3
- "number_of_tokens": 6237322,
4
- "min_length_tokens": 4,
5
- "max_length_tokens": 365886,
6
- "number_of_characters": 17525790,
7
- "min_length_characters": 6,
8
- "max_length_characters": 1007458
9
  }
 
1
  {
2
+ "number_of_samples": 1734,
3
+ "number_of_tokens": 7632997,
4
+ "min_length_tokens": 8,
5
+ "max_length_tokens": 368880,
6
+ "number_of_characters": 21572592,
7
+ "min_length_characters": 21,
8
+ "max_length_characters": 1019370
9
  }
data/wikibooks/images/dist_document_length.png CHANGED

Git LFS Details

  • SHA256: 6e281d7a4b5f697fa90e45808f50cb899e66fcc0aa44c07a9bde873ff64f05d8
  • Pointer size: 131 Bytes
  • Size of remote file: 559 kB

Git LFS Details

  • SHA256: 535a84a77b35475811b1d08b6b9511a1764951d4a86e1839a4e2f9f262dac207
  • Pointer size: 131 Bytes
  • Size of remote file: 547 kB
data/wikibooks/parser/package-lock.json ADDED
@@ -0,0 +1,724 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "parser",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "wtf_wikipedia": "^10.4.0"
13
+ }
14
+ },
15
+ "node_modules/@babel/code-frame": {
16
+ "version": "7.27.1",
17
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
18
+ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@babel/helper-validator-identifier": "^7.27.1",
22
+ "js-tokens": "^4.0.0",
23
+ "picocolors": "^1.1.1"
24
+ },
25
+ "engines": {
26
+ "node": ">=6.9.0"
27
+ }
28
+ },
29
+ "node_modules/@babel/helper-validator-identifier": {
30
+ "version": "7.27.1",
31
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
32
+ "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=6.9.0"
36
+ }
37
+ },
38
+ "node_modules/@types/minimist": {
39
+ "version": "1.2.5",
40
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
41
+ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
42
+ "license": "MIT"
43
+ },
44
+ "node_modules/@types/normalize-package-data": {
45
+ "version": "2.4.4",
46
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz",
47
+ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
48
+ "license": "MIT"
49
+ },
50
+ "node_modules/arrify": {
51
+ "version": "1.0.1",
52
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
53
+ "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
54
+ "license": "MIT",
55
+ "engines": {
56
+ "node": ">=0.10.0"
57
+ }
58
+ },
59
+ "node_modules/camelcase": {
60
+ "version": "6.3.0",
61
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
62
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
63
+ "license": "MIT",
64
+ "engines": {
65
+ "node": ">=10"
66
+ },
67
+ "funding": {
68
+ "url": "https://github.com/sponsors/sindresorhus"
69
+ }
70
+ },
71
+ "node_modules/camelcase-keys": {
72
+ "version": "7.0.2",
73
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz",
74
+ "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==",
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "camelcase": "^6.3.0",
78
+ "map-obj": "^4.1.0",
79
+ "quick-lru": "^5.1.1",
80
+ "type-fest": "^1.2.1"
81
+ },
82
+ "engines": {
83
+ "node": ">=12"
84
+ },
85
+ "funding": {
86
+ "url": "https://github.com/sponsors/sindresorhus"
87
+ }
88
+ },
89
+ "node_modules/decamelize": {
90
+ "version": "5.0.1",
91
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",
92
+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",
93
+ "license": "MIT",
94
+ "engines": {
95
+ "node": ">=10"
96
+ },
97
+ "funding": {
98
+ "url": "https://github.com/sponsors/sindresorhus"
99
+ }
100
+ },
101
+ "node_modules/decamelize-keys": {
102
+ "version": "1.1.1",
103
+ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz",
104
+ "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==",
105
+ "license": "MIT",
106
+ "dependencies": {
107
+ "decamelize": "^1.1.0",
108
+ "map-obj": "^1.0.0"
109
+ },
110
+ "engines": {
111
+ "node": ">=0.10.0"
112
+ },
113
+ "funding": {
114
+ "url": "https://github.com/sponsors/sindresorhus"
115
+ }
116
+ },
117
+ "node_modules/decamelize-keys/node_modules/decamelize": {
118
+ "version": "1.2.0",
119
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
120
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
121
+ "license": "MIT",
122
+ "engines": {
123
+ "node": ">=0.10.0"
124
+ }
125
+ },
126
+ "node_modules/decamelize-keys/node_modules/map-obj": {
127
+ "version": "1.0.1",
128
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
129
+ "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==",
130
+ "license": "MIT",
131
+ "engines": {
132
+ "node": ">=0.10.0"
133
+ }
134
+ },
135
+ "node_modules/error-ex": {
136
+ "version": "1.3.2",
137
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
138
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
139
+ "license": "MIT",
140
+ "dependencies": {
141
+ "is-arrayish": "^0.2.1"
142
+ }
143
+ },
144
+ "node_modules/find-up": {
145
+ "version": "5.0.0",
146
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
147
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
148
+ "license": "MIT",
149
+ "dependencies": {
150
+ "locate-path": "^6.0.0",
151
+ "path-exists": "^4.0.0"
152
+ },
153
+ "engines": {
154
+ "node": ">=10"
155
+ },
156
+ "funding": {
157
+ "url": "https://github.com/sponsors/sindresorhus"
158
+ }
159
+ },
160
+ "node_modules/find-up/node_modules/path-exists": {
161
+ "version": "4.0.0",
162
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
163
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
164
+ "license": "MIT",
165
+ "engines": {
166
+ "node": ">=8"
167
+ }
168
+ },
169
+ "node_modules/function-bind": {
170
+ "version": "1.1.2",
171
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
172
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
173
+ "license": "MIT",
174
+ "funding": {
175
+ "url": "https://github.com/sponsors/ljharb"
176
+ }
177
+ },
178
+ "node_modules/hard-rejection": {
179
+ "version": "2.1.0",
180
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
181
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
182
+ "license": "MIT",
183
+ "engines": {
184
+ "node": ">=6"
185
+ }
186
+ },
187
+ "node_modules/hasown": {
188
+ "version": "2.0.2",
189
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
190
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
191
+ "license": "MIT",
192
+ "dependencies": {
193
+ "function-bind": "^1.1.2"
194
+ },
195
+ "engines": {
196
+ "node": ">= 0.4"
197
+ }
198
+ },
199
+ "node_modules/hosted-git-info": {
200
+ "version": "4.1.0",
201
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
202
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
203
+ "license": "ISC",
204
+ "dependencies": {
205
+ "lru-cache": "^6.0.0"
206
+ },
207
+ "engines": {
208
+ "node": ">=10"
209
+ }
210
+ },
211
+ "node_modules/indent-string": {
212
+ "version": "5.0.0",
213
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
214
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
215
+ "license": "MIT",
216
+ "engines": {
217
+ "node": ">=12"
218
+ },
219
+ "funding": {
220
+ "url": "https://github.com/sponsors/sindresorhus"
221
+ }
222
+ },
223
+ "node_modules/is-arrayish": {
224
+ "version": "0.2.1",
225
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
226
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
227
+ "license": "MIT"
228
+ },
229
+ "node_modules/is-core-module": {
230
+ "version": "2.16.1",
231
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
232
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
233
+ "license": "MIT",
234
+ "dependencies": {
235
+ "hasown": "^2.0.2"
236
+ },
237
+ "engines": {
238
+ "node": ">= 0.4"
239
+ },
240
+ "funding": {
241
+ "url": "https://github.com/sponsors/ljharb"
242
+ }
243
+ },
244
+ "node_modules/is-plain-obj": {
245
+ "version": "1.1.0",
246
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
247
+ "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",
248
+ "license": "MIT",
249
+ "engines": {
250
+ "node": ">=0.10.0"
251
+ }
252
+ },
253
+ "node_modules/isomorphic-unfetch": {
254
+ "version": "3.1.0",
255
+ "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz",
256
+ "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==",
257
+ "license": "MIT",
258
+ "dependencies": {
259
+ "node-fetch": "^2.6.1",
260
+ "unfetch": "^4.2.0"
261
+ }
262
+ },
263
+ "node_modules/js-tokens": {
264
+ "version": "4.0.0",
265
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
266
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
267
+ "license": "MIT"
268
+ },
269
+ "node_modules/json-parse-even-better-errors": {
270
+ "version": "2.3.1",
271
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
272
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
273
+ "license": "MIT"
274
+ },
275
+ "node_modules/kind-of": {
276
+ "version": "6.0.3",
277
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
278
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
279
+ "license": "MIT",
280
+ "engines": {
281
+ "node": ">=0.10.0"
282
+ }
283
+ },
284
+ "node_modules/lines-and-columns": {
285
+ "version": "1.2.4",
286
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
287
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
288
+ "license": "MIT"
289
+ },
290
+ "node_modules/locate-path": {
291
+ "version": "6.0.0",
292
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
293
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
294
+ "license": "MIT",
295
+ "dependencies": {
296
+ "p-locate": "^5.0.0"
297
+ },
298
+ "engines": {
299
+ "node": ">=10"
300
+ },
301
+ "funding": {
302
+ "url": "https://github.com/sponsors/sindresorhus"
303
+ }
304
+ },
305
+ "node_modules/lru-cache": {
306
+ "version": "6.0.0",
307
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
308
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
309
+ "license": "ISC",
310
+ "dependencies": {
311
+ "yallist": "^4.0.0"
312
+ },
313
+ "engines": {
314
+ "node": ">=10"
315
+ }
316
+ },
317
+ "node_modules/map-obj": {
318
+ "version": "4.3.0",
319
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
320
+ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
321
+ "license": "MIT",
322
+ "engines": {
323
+ "node": ">=8"
324
+ },
325
+ "funding": {
326
+ "url": "https://github.com/sponsors/sindresorhus"
327
+ }
328
+ },
329
+ "node_modules/meow": {
330
+ "version": "10.1.5",
331
+ "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz",
332
+ "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==",
333
+ "license": "MIT",
334
+ "dependencies": {
335
+ "@types/minimist": "^1.2.2",
336
+ "camelcase-keys": "^7.0.0",
337
+ "decamelize": "^5.0.0",
338
+ "decamelize-keys": "^1.1.0",
339
+ "hard-rejection": "^2.1.0",
340
+ "minimist-options": "4.1.0",
341
+ "normalize-package-data": "^3.0.2",
342
+ "read-pkg-up": "^8.0.0",
343
+ "redent": "^4.0.0",
344
+ "trim-newlines": "^4.0.2",
345
+ "type-fest": "^1.2.2",
346
+ "yargs-parser": "^20.2.9"
347
+ },
348
+ "engines": {
349
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
350
+ },
351
+ "funding": {
352
+ "url": "https://github.com/sponsors/sindresorhus"
353
+ }
354
+ },
355
+ "node_modules/min-indent": {
356
+ "version": "1.0.1",
357
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
358
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
359
+ "license": "MIT",
360
+ "engines": {
361
+ "node": ">=4"
362
+ }
363
+ },
364
+ "node_modules/minimist-options": {
365
+ "version": "4.1.0",
366
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
367
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
368
+ "license": "MIT",
369
+ "dependencies": {
370
+ "arrify": "^1.0.1",
371
+ "is-plain-obj": "^1.1.0",
372
+ "kind-of": "^6.0.3"
373
+ },
374
+ "engines": {
375
+ "node": ">= 6"
376
+ }
377
+ },
378
+ "node_modules/node-fetch": {
379
+ "version": "2.7.0",
380
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
381
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
382
+ "license": "MIT",
383
+ "dependencies": {
384
+ "whatwg-url": "^5.0.0"
385
+ },
386
+ "engines": {
387
+ "node": "4.x || >=6.0.0"
388
+ },
389
+ "peerDependencies": {
390
+ "encoding": "^0.1.0"
391
+ },
392
+ "peerDependenciesMeta": {
393
+ "encoding": {
394
+ "optional": true
395
+ }
396
+ }
397
+ },
398
+ "node_modules/normalize-package-data": {
399
+ "version": "3.0.3",
400
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
401
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
402
+ "license": "BSD-2-Clause",
403
+ "dependencies": {
404
+ "hosted-git-info": "^4.0.1",
405
+ "is-core-module": "^2.5.0",
406
+ "semver": "^7.3.4",
407
+ "validate-npm-package-license": "^3.0.1"
408
+ },
409
+ "engines": {
410
+ "node": ">=10"
411
+ }
412
+ },
413
+ "node_modules/p-limit": {
414
+ "version": "3.1.0",
415
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
416
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
417
+ "license": "MIT",
418
+ "dependencies": {
419
+ "yocto-queue": "^0.1.0"
420
+ },
421
+ "engines": {
422
+ "node": ">=10"
423
+ },
424
+ "funding": {
425
+ "url": "https://github.com/sponsors/sindresorhus"
426
+ }
427
+ },
428
+ "node_modules/p-locate": {
429
+ "version": "5.0.0",
430
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
431
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
432
+ "license": "MIT",
433
+ "dependencies": {
434
+ "p-limit": "^3.0.2"
435
+ },
436
+ "engines": {
437
+ "node": ">=10"
438
+ },
439
+ "funding": {
440
+ "url": "https://github.com/sponsors/sindresorhus"
441
+ }
442
+ },
443
+ "node_modules/parse-json": {
444
+ "version": "5.2.0",
445
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
446
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
447
+ "license": "MIT",
448
+ "dependencies": {
449
+ "@babel/code-frame": "^7.0.0",
450
+ "error-ex": "^1.3.1",
451
+ "json-parse-even-better-errors": "^2.3.0",
452
+ "lines-and-columns": "^1.1.6"
453
+ },
454
+ "engines": {
455
+ "node": ">=8"
456
+ },
457
+ "funding": {
458
+ "url": "https://github.com/sponsors/sindresorhus"
459
+ }
460
+ },
461
+ "node_modules/path-exists": {
462
+ "version": "5.0.0",
463
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
464
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
465
+ "license": "MIT",
466
+ "engines": {
467
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
468
+ }
469
+ },
470
+ "node_modules/path-exists-cli": {
471
+ "version": "2.0.0",
472
+ "resolved": "https://registry.npmjs.org/path-exists-cli/-/path-exists-cli-2.0.0.tgz",
473
+ "integrity": "sha512-qGr0A87KYCznmvabblxyxnzA/MtPZ28wH+4SCMP4tjTFAbzqwvs5xpUZExAYzq5OgHe5vIswzdH5iosCb8YF/Q==",
474
+ "license": "MIT",
475
+ "dependencies": {
476
+ "meow": "^10.1.1",
477
+ "path-exists": "^5.0.0"
478
+ },
479
+ "bin": {
480
+ "path-exists": "cli.js"
481
+ },
482
+ "engines": {
483
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
484
+ },
485
+ "funding": {
486
+ "url": "https://github.com/sponsors/sindresorhus"
487
+ }
488
+ },
489
+ "node_modules/picocolors": {
490
+ "version": "1.1.1",
491
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
492
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
493
+ "license": "ISC"
494
+ },
495
+ "node_modules/quick-lru": {
496
+ "version": "5.1.1",
497
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
498
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
499
+ "license": "MIT",
500
+ "engines": {
501
+ "node": ">=10"
502
+ },
503
+ "funding": {
504
+ "url": "https://github.com/sponsors/sindresorhus"
505
+ }
506
+ },
507
+ "node_modules/read-pkg": {
508
+ "version": "6.0.0",
509
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz",
510
+ "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==",
511
+ "license": "MIT",
512
+ "dependencies": {
513
+ "@types/normalize-package-data": "^2.4.0",
514
+ "normalize-package-data": "^3.0.2",
515
+ "parse-json": "^5.2.0",
516
+ "type-fest": "^1.0.1"
517
+ },
518
+ "engines": {
519
+ "node": ">=12"
520
+ },
521
+ "funding": {
522
+ "url": "https://github.com/sponsors/sindresorhus"
523
+ }
524
+ },
525
+ "node_modules/read-pkg-up": {
526
+ "version": "8.0.0",
527
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
528
+ "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
529
+ "license": "MIT",
530
+ "dependencies": {
531
+ "find-up": "^5.0.0",
532
+ "read-pkg": "^6.0.0",
533
+ "type-fest": "^1.0.1"
534
+ },
535
+ "engines": {
536
+ "node": ">=12"
537
+ },
538
+ "funding": {
539
+ "url": "https://github.com/sponsors/sindresorhus"
540
+ }
541
+ },
542
+ "node_modules/redent": {
543
+ "version": "4.0.0",
544
+ "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
545
+ "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
546
+ "license": "MIT",
547
+ "dependencies": {
548
+ "indent-string": "^5.0.0",
549
+ "strip-indent": "^4.0.0"
550
+ },
551
+ "engines": {
552
+ "node": ">=12"
553
+ },
554
+ "funding": {
555
+ "url": "https://github.com/sponsors/sindresorhus"
556
+ }
557
+ },
558
+ "node_modules/semver": {
559
+ "version": "7.7.2",
560
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
561
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
562
+ "license": "ISC",
563
+ "bin": {
564
+ "semver": "bin/semver.js"
565
+ },
566
+ "engines": {
567
+ "node": ">=10"
568
+ }
569
+ },
570
+ "node_modules/spdx-correct": {
571
+ "version": "3.2.0",
572
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
573
+ "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
574
+ "license": "Apache-2.0",
575
+ "dependencies": {
576
+ "spdx-expression-parse": "^3.0.0",
577
+ "spdx-license-ids": "^3.0.0"
578
+ }
579
+ },
580
+ "node_modules/spdx-exceptions": {
581
+ "version": "2.5.0",
582
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
583
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
584
+ "license": "CC-BY-3.0"
585
+ },
586
+ "node_modules/spdx-expression-parse": {
587
+ "version": "3.0.1",
588
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
589
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
590
+ "license": "MIT",
591
+ "dependencies": {
592
+ "spdx-exceptions": "^2.1.0",
593
+ "spdx-license-ids": "^3.0.0"
594
+ }
595
+ },
596
+ "node_modules/spdx-license-ids": {
597
+ "version": "3.0.22",
598
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz",
599
+ "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==",
600
+ "license": "CC0-1.0"
601
+ },
602
+ "node_modules/strip-indent": {
603
+ "version": "4.0.0",
604
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
605
+ "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
606
+ "license": "MIT",
607
+ "dependencies": {
608
+ "min-indent": "^1.0.1"
609
+ },
610
+ "engines": {
611
+ "node": ">=12"
612
+ },
613
+ "funding": {
614
+ "url": "https://github.com/sponsors/sindresorhus"
615
+ }
616
+ },
617
+ "node_modules/tr46": {
618
+ "version": "0.0.3",
619
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
620
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
621
+ "license": "MIT"
622
+ },
623
+ "node_modules/trim-newlines": {
624
+ "version": "4.1.1",
625
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz",
626
+ "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==",
627
+ "license": "MIT",
628
+ "engines": {
629
+ "node": ">=12"
630
+ },
631
+ "funding": {
632
+ "url": "https://github.com/sponsors/sindresorhus"
633
+ }
634
+ },
635
+ "node_modules/type-fest": {
636
+ "version": "1.4.0",
637
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
638
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
639
+ "license": "(MIT OR CC0-1.0)",
640
+ "engines": {
641
+ "node": ">=10"
642
+ },
643
+ "funding": {
644
+ "url": "https://github.com/sponsors/sindresorhus"
645
+ }
646
+ },
647
+ "node_modules/unfetch": {
648
+ "version": "4.2.0",
649
+ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
650
+ "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==",
651
+ "license": "MIT"
652
+ },
653
+ "node_modules/validate-npm-package-license": {
654
+ "version": "3.0.4",
655
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
656
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
657
+ "license": "Apache-2.0",
658
+ "dependencies": {
659
+ "spdx-correct": "^3.0.0",
660
+ "spdx-expression-parse": "^3.0.0"
661
+ }
662
+ },
663
+ "node_modules/webidl-conversions": {
664
+ "version": "3.0.1",
665
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
666
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
667
+ "license": "BSD-2-Clause"
668
+ },
669
+ "node_modules/whatwg-url": {
670
+ "version": "5.0.0",
671
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
672
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
673
+ "license": "MIT",
674
+ "dependencies": {
675
+ "tr46": "~0.0.3",
676
+ "webidl-conversions": "^3.0.0"
677
+ }
678
+ },
679
+ "node_modules/wtf_wikipedia": {
680
+ "version": "10.4.0",
681
+ "resolved": "https://registry.npmjs.org/wtf_wikipedia/-/wtf_wikipedia-10.4.0.tgz",
682
+ "integrity": "sha512-yRxTiBURj2LW5HWAe+T7bCV2x45C/qTqcknUTmInKmB9cmLSxR6Nh44rB9K+nfNiydtjc3HLHwYWxMuHZtpVSQ==",
683
+ "hasInstallScript": true,
684
+ "license": "MIT",
685
+ "dependencies": {
686
+ "isomorphic-unfetch": "^3.1.0",
687
+ "path-exists-cli": "2.0.0"
688
+ },
689
+ "bin": {
690
+ "wtf_wikipedia": "cli.js"
691
+ },
692
+ "engines": {
693
+ "node": ">=12.0.0"
694
+ }
695
+ },
696
+ "node_modules/yallist": {
697
+ "version": "4.0.0",
698
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
699
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
700
+ "license": "ISC"
701
+ },
702
+ "node_modules/yargs-parser": {
703
+ "version": "20.2.9",
704
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
705
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
706
+ "license": "ISC",
707
+ "engines": {
708
+ "node": ">=10"
709
+ }
710
+ },
711
+ "node_modules/yocto-queue": {
712
+ "version": "0.1.0",
713
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
714
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
715
+ "license": "MIT",
716
+ "engines": {
717
+ "node": ">=10"
718
+ },
719
+ "funding": {
720
+ "url": "https://github.com/sponsors/sindresorhus"
721
+ }
722
+ }
723
+ }
724
+ }
data/wikibooks/parser/package.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs",
13
+ "dependencies": {
14
+ "wtf_wikipedia": "^10.4.0"
15
+ }
16
+ }
data/wikibooks/parser/wtf_bridge.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wtf_bridge.js
2
+ // Usage: node wtf_bridge.js
3
+ // Reads newline-delimited JSON from stdin: {"wikitext":"...","lang":"da"}
4
+ // Writes newline-delimited JSON to stdout: {"text":"...","isRedirect":false} or {"error":"..."}
5
+ const wtf = require('wtf_wikipedia');
6
+ const readline = require('readline');
7
+
8
+ const rl = readline.createInterface({
9
+ input: process.stdin,
10
+ output: process.stdout,
11
+ terminal: false
12
+ });
13
+
14
+ process.on('uncaughtException', (err) => {
15
+ // emit as JSON so Python can see it
16
+ try {
17
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
18
+ } catch (e) {}
19
+ process.exit(1);
20
+ });
21
+
22
+ rl.on('line', (line) => {
23
+ (async () => {
24
+ try {
25
+ const payload = JSON.parse(line);
26
+ const wikitext = payload.wikitext || '';
27
+ const lang = payload.lang || null;
28
+
29
+ // parse wikitext into a document (sync)
30
+ const doc = lang ? wtf(wikitext, lang) : wtf(wikitext);
31
+ const text = (doc && typeof doc.text === 'function') ? doc.text() : '';
32
+ const isRedirect = (doc && typeof doc.isRedirect === 'function') ? doc.isRedirect() : false;
33
+
34
+ process.stdout.write(JSON.stringify({ text, isRedirect }) + '\n');
35
+ } catch (err) {
36
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
37
+ }
38
+ })();
39
+ });
data/wikibooks/wikibooks.md CHANGED
@@ -28,9 +28,9 @@ The Danish Subsection of [Wikibooks](https://www.wikibooks.org).
28
 
29
 
30
  <!-- START-DESC-STATS -->
31
- - **Number of samples**: 1.27K
32
- - **Number of tokens (Llama 3)**: 6.24M
33
- - **Average document length in tokens (min, max)**: 4.92K (4, 365.89K)
34
  <!-- END-DESC-STATS -->
35
 
36
 
@@ -42,12 +42,12 @@ An example from the dataset looks as follows.
42
  <!-- START-SAMPLE -->
43
  ```py
44
  {
45
- "id": "wikibooks_1125",
46
- "text": "Spilinfo.\nSpillet er lavet af Blizzard Entertainment.\nDet er efterfølgeren til Diablo 1, og der er k[...]",
47
  "source": "wikibooks",
48
- "added": "2021-03-28",
49
- "created": "2019-01-01, 2021-01-01",
50
- "token_count": 937
51
  }
52
  ```
53
 
@@ -73,6 +73,20 @@ An entry in the dataset consists of the following fields:
73
  <!-- END-DATASET PLOTS -->
74
 
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  ## Additional Information
77
 
78
 
 
28
 
29
 
30
  <!-- START-DESC-STATS -->
31
+ - **Number of samples**: 1.73K
32
+ - **Number of tokens (Llama 3)**: 7.63M
33
+ - **Average document length in tokens (min, max)**: 4.40K (8, 368.88K)
34
  <!-- END-DESC-STATS -->
35
 
36
 
 
42
  <!-- START-SAMPLE -->
43
  ```py
44
  {
45
+ "id": "wikibooks_7",
46
+ "text": "Boghylde:Hobbies\nHobbies er alle de aktiviteter vi giver os ud i, uden at forvente et afkast ud over[...]",
47
  "source": "wikibooks",
48
+ "added": "2025-08-18",
49
+ "created": "2006-06-20, 2006-06-20",
50
+ "token_count": 95
51
  }
52
  ```
53
 
 
73
  <!-- END-DATASET PLOTS -->
74
 
75
 
76
+ ### Processing
77
+
78
+ For this dataset we have pulled the latest [database dump from wikimedia](https://dumps.wikimedia.org/dawikibooks/latest/) and extracted the texts using the [wtf_wikipedia](https://github.com/spencermountain/wtf_wikipedia/tree/dev) parser.
79
+
80
+ Because the parser is written in javascript you need to have Node.js installed on you machine.
81
+
82
+ To run the `create.py` file you first need to do:
83
+
84
+ ```bash
85
+ $ cd parser/ && npm install && cd ..
86
+ ```
87
+
88
+ We chose to use `wtf_wikipedia` because out of the other parsers we tested this was the imperically best one. We tested `mwparserfromhell`, `mediawiki_dump`, `wikiextractor`, and `wtf_wikipedia`. It seemed that the others still produced some sort of artifacts from the parsing of wikicode.
89
+
90
  ## Additional Information
91
 
92
 
data/wikibooks/wikibooks.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ff6360814c2c5c432995416956ecd6e716f104e4a5d867afae2ce9e4f1f59c36
3
- size 11267762
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:143ce3ed06be9e576d9e0a35eb674595bb835cee162e84884d3c9f45c34dab40
3
+ size 13481948
data/wikipedia/create.py ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "datasets",
5
+ # "mediawiki-dump",
6
+ # "mwparserfromhell",
7
+ # "pandas",
8
+ # "requests",
9
+ # "tqdm",
10
+ # "transformers",
11
+ # "dynaword"
12
+ # ]
13
+ # [tool.uv.sources]
14
+ # dynaword = { git = "https://huggingface.co/datasets/danish-foundation-models/danish-dynaword", rev = "00e7f2aee7f7ad2da423419f77ecbb9c0536de0d" }
15
+ # ///
16
+ import bz2
17
+ import datetime
18
+ import json
19
+ import logging
20
+ import os
21
+ from pathlib import Path
22
+ import re
23
+ import subprocess
24
+ import sys
25
+ import threading
26
+
27
+ from mediawiki_dump.dumps import IteratorDump
28
+ from mediawiki_dump.reader import DumpReaderArticles
29
+
30
+ from mwparserfromhell import parse
31
+
32
+ import requests
33
+ from tqdm import tqdm
34
+ import pandas as pd
35
+
36
+ from datasets import Dataset
37
+ from transformers import AutoTokenizer
38
+ from concurrent.futures import ProcessPoolExecutor
39
+ from functools import partial
40
+ from typing import Any, Tuple
41
+
42
+ from dynaword.process_dataset import (
43
+ add_token_count,
44
+ ensure_column_order,
45
+ remove_duplicate_text,
46
+ remove_empty_texts,
47
+ )
48
+
49
+ logger = logging.getLogger(__name__)
50
+ source = "wiki"
51
+
52
+
53
+ class WtfNodeBridge:
54
+ """
55
+ Persistent Node bridge to wtf_wikipedia.
56
+ Call .parse(wikitext, lang=None) -> (text, is_redirect)
57
+ Remember to call .close() when done.
58
+ """
59
+
60
+ def __init__(
61
+ self, node_script_path: str = "parser/wtf_bridge.js", node_cmd: str = "node"
62
+ ):
63
+ self.proc = subprocess.Popen(
64
+ [node_cmd, node_script_path],
65
+ stdin=subprocess.PIPE,
66
+ stdout=subprocess.PIPE,
67
+ stderr=subprocess.PIPE,
68
+ text=True,
69
+ encoding="utf-8",
70
+ bufsize=1,
71
+ )
72
+ self._lock = threading.Lock()
73
+
74
+ # background thread to log stderr (helpful for debugging)
75
+ def _drain_stderr(p):
76
+ try:
77
+ for line in p.stderr:
78
+ logger.warning("wtf_node stderr: %s", line.rstrip())
79
+ except Exception:
80
+ pass
81
+
82
+ t = threading.Thread(target=_drain_stderr, args=(self.proc,), daemon=True)
83
+ t.start()
84
+
85
+ def parse(self, wikitext: str, lang: str | None = None) -> Tuple[str, bool]:
86
+ if self.proc.poll() is not None:
87
+ raise RuntimeError("Node bridge process has exited")
88
+ payload = {"wikitext": wikitext}
89
+ if lang:
90
+ payload["lang"] = lang
91
+ line = json.dumps(payload, ensure_ascii=False)
92
+ with self._lock:
93
+ # write and flush a single JSON line
94
+ try:
95
+ self.proc.stdin.write(line + "\n")
96
+ self.proc.stdin.flush()
97
+ except BrokenPipeError as e:
98
+ raise RuntimeError("Broken pipe writing to node bridge") from e
99
+
100
+ # read exactly one JSON line back
101
+ out_line = self.proc.stdout.readline()
102
+ if not out_line:
103
+ raise RuntimeError("No response from node bridge (it may have exited)")
104
+ res = json.loads(out_line)
105
+ if res.get("error"):
106
+ # choose to either raise or return empty text; here we raise
107
+ raise RuntimeError("Node bridge error: " + res["error"])
108
+ return res.get("text", ""), bool(res.get("isRedirect", False))
109
+
110
+ def close(self):
111
+ try:
112
+ if self.proc.stdin:
113
+ self.proc.stdin.close()
114
+ except Exception:
115
+ pass
116
+ try:
117
+ self.proc.terminate()
118
+ self.proc.wait(timeout=3)
119
+ except Exception:
120
+ try:
121
+ self.proc.kill()
122
+ except Exception:
123
+ pass
124
+
125
+
126
+ def download_wiki_dump(url: str, file_path: str):
127
+ """
128
+ Downloads a file from a URL with a progress bar.
129
+
130
+ Args:
131
+ url (str): The URL of the file to download.
132
+ file_path (str): The local path to save the file.
133
+ """
134
+ print(f"Downloading {url} to {file_path}...")
135
+ try:
136
+ with requests.get(url, stream=True) as r:
137
+ r.raise_for_status()
138
+ total_size = int(r.headers.get("content-length", 0))
139
+ block_size = 8192 # 8 Kibibytes
140
+
141
+ with (
142
+ open(file_path, "wb") as f,
143
+ tqdm(
144
+ total=total_size, unit="B", unit_scale=True, desc="Downloading"
145
+ ) as pbar,
146
+ ):
147
+ for chunk in r.iter_content(chunk_size=block_size):
148
+ if chunk: # filter out keep-alive chunks
149
+ f.write(chunk)
150
+ pbar.update(len(chunk))
151
+ logger.info("\nDownload complete.")
152
+ except requests.exceptions.RequestException as e:
153
+ logger.error(f"\nError downloading file: {e}")
154
+ sys.exit(1)
155
+
156
+
157
+ def get_content(file_name: str):
158
+ with bz2.open(file_name, mode="r") as fp:
159
+ yield from fp
160
+
161
+
162
+ def process_dump_to_parquet(bz2_file_path: str, parquet_file_path: str):
163
+ dump = IteratorDump(iterator=get_content(file_name=bz2_file_path))
164
+ pages = DumpReaderArticles().read(dump)
165
+ articles = []
166
+ today = datetime.datetime.now().strftime("%Y-%m-%d")
167
+
168
+ bridge = WtfNodeBridge("parser/wtf_bridge.js")
169
+ try:
170
+ for page in tqdm(pages):
171
+ try:
172
+ plain_text, is_redirect = bridge.parse(page.content, lang="da")
173
+ except Exception as exc:
174
+ logger.warning(
175
+ "wtf parse failed for page %s: %s -- falling back to mwparserfromhell",
176
+ getattr(page, "title", "<unknown>"),
177
+ exc,
178
+ )
179
+ plain_text = parse(page.content).strip_code().strip()
180
+ is_redirect = plain_text.startswith("REDIRECT")
181
+
182
+ if is_redirect:
183
+ continue
184
+
185
+ # Additional cleanup if you like (wtf.text() already removes a lot)
186
+ plain_text = re.sub(
187
+ r"thumb(?:\|(?:left|right|center|\d+px)*)*\|[^\n]*", "", plain_text
188
+ ).strip()
189
+
190
+ if len(plain_text) == 0:
191
+ logger.warning("Skipping empty article")
192
+ continue
193
+
194
+ date = datetime.datetime.strptime(
195
+ page.timestamp, "%Y-%m-%dT%H:%M:%SZ"
196
+ ).strftime("%Y-%m-%d")
197
+
198
+ articles.append(
199
+ {
200
+ "id": f"{source}_{page.page_id}",
201
+ "source": source,
202
+ "created": f"{date}, {date}",
203
+ "text": f"{page.title}\n{plain_text}",
204
+ "added": today,
205
+ }
206
+ )
207
+ finally:
208
+ bridge.close()
209
+
210
+ df = pd.DataFrame(articles)
211
+ ds = Dataset.from_pandas(df)
212
+ ds = add_token_count(ds)
213
+ ds = remove_empty_texts(ds)
214
+ ds = remove_duplicate_text(ds)
215
+ ds = ensure_column_order(ds)
216
+ ds.to_parquet(parquet_file_path, compression="snappy")
217
+
218
+
219
+ def main():
220
+ """
221
+ Main function to orchestrate the download and processing.
222
+ """
223
+ # --- Configuration ---
224
+ # URL for the latest Danish Wikipedia articles dump
225
+ WIKI_DUMP_URL = f"https://dumps.wikimedia.org/da{source}/latest/da{source}-latest-pages-articles.xml.bz2"
226
+
227
+ # Local file paths
228
+ DOWNLOADED_BZ2_FILE = f"tmp/da{source}-latest-pages-articles.xml.bz2"
229
+ OUTPUT_PARQUET_FILE = f"wikipedia.parquet"
230
+
231
+ # --- Execution ---
232
+ # 1. Download the dump file
233
+ if not os.path.exists(DOWNLOADED_BZ2_FILE):
234
+ download_wiki_dump(WIKI_DUMP_URL, DOWNLOADED_BZ2_FILE)
235
+ else:
236
+ logger.info(f"File '{DOWNLOADED_BZ2_FILE}' already exists. Skipping download.")
237
+
238
+ # 2. Process the dump and save to Parquet
239
+ process_dump_to_parquet(DOWNLOADED_BZ2_FILE, OUTPUT_PARQUET_FILE)
240
+
241
+ # 3. (Optional) Clean up the downloaded file
242
+ # If you want to keep the bz2 file, comment out the next line.
243
+ logger.info(f"Cleaning up by removing '{DOWNLOADED_BZ2_FILE}'...")
244
+ os.remove(DOWNLOADED_BZ2_FILE)
245
+
246
+ logger.info("\nScript finished successfully.")
247
+
248
+
249
+ if __name__ == "__main__":
250
+ log_path = Path(__file__).parent / f"{source}.log"
251
+ logging.basicConfig(
252
+ level=logging.INFO,
253
+ format="%(asctime)s - %(levelname)s - %(message)s",
254
+ handlers=[
255
+ logging.StreamHandler(),
256
+ logging.FileHandler(log_path),
257
+ ],
258
+ )
259
+ main()
data/wikipedia/descriptive_stats.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "number_of_samples": 309641,
3
+ "number_of_tokens": 173334040,
4
+ "min_length_tokens": 8,
5
+ "max_length_tokens": 107351,
6
+ "number_of_characters": 518132934,
7
+ "min_length_characters": 13,
8
+ "max_length_characters": 321469
9
+ }
data/{wiki → wikipedia}/images/dist_document_length.png RENAMED
File without changes
data/wikipedia/parser/package-lock.json ADDED
@@ -0,0 +1,724 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "parser",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "wtf_wikipedia": "^10.4.0"
13
+ }
14
+ },
15
+ "node_modules/@babel/code-frame": {
16
+ "version": "7.27.1",
17
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
18
+ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@babel/helper-validator-identifier": "^7.27.1",
22
+ "js-tokens": "^4.0.0",
23
+ "picocolors": "^1.1.1"
24
+ },
25
+ "engines": {
26
+ "node": ">=6.9.0"
27
+ }
28
+ },
29
+ "node_modules/@babel/helper-validator-identifier": {
30
+ "version": "7.27.1",
31
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
32
+ "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=6.9.0"
36
+ }
37
+ },
38
+ "node_modules/@types/minimist": {
39
+ "version": "1.2.5",
40
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
41
+ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
42
+ "license": "MIT"
43
+ },
44
+ "node_modules/@types/normalize-package-data": {
45
+ "version": "2.4.4",
46
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz",
47
+ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
48
+ "license": "MIT"
49
+ },
50
+ "node_modules/arrify": {
51
+ "version": "1.0.1",
52
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
53
+ "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
54
+ "license": "MIT",
55
+ "engines": {
56
+ "node": ">=0.10.0"
57
+ }
58
+ },
59
+ "node_modules/camelcase": {
60
+ "version": "6.3.0",
61
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
62
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
63
+ "license": "MIT",
64
+ "engines": {
65
+ "node": ">=10"
66
+ },
67
+ "funding": {
68
+ "url": "https://github.com/sponsors/sindresorhus"
69
+ }
70
+ },
71
+ "node_modules/camelcase-keys": {
72
+ "version": "7.0.2",
73
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz",
74
+ "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==",
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "camelcase": "^6.3.0",
78
+ "map-obj": "^4.1.0",
79
+ "quick-lru": "^5.1.1",
80
+ "type-fest": "^1.2.1"
81
+ },
82
+ "engines": {
83
+ "node": ">=12"
84
+ },
85
+ "funding": {
86
+ "url": "https://github.com/sponsors/sindresorhus"
87
+ }
88
+ },
89
+ "node_modules/decamelize": {
90
+ "version": "5.0.1",
91
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",
92
+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",
93
+ "license": "MIT",
94
+ "engines": {
95
+ "node": ">=10"
96
+ },
97
+ "funding": {
98
+ "url": "https://github.com/sponsors/sindresorhus"
99
+ }
100
+ },
101
+ "node_modules/decamelize-keys": {
102
+ "version": "1.1.1",
103
+ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz",
104
+ "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==",
105
+ "license": "MIT",
106
+ "dependencies": {
107
+ "decamelize": "^1.1.0",
108
+ "map-obj": "^1.0.0"
109
+ },
110
+ "engines": {
111
+ "node": ">=0.10.0"
112
+ },
113
+ "funding": {
114
+ "url": "https://github.com/sponsors/sindresorhus"
115
+ }
116
+ },
117
+ "node_modules/decamelize-keys/node_modules/decamelize": {
118
+ "version": "1.2.0",
119
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
120
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
121
+ "license": "MIT",
122
+ "engines": {
123
+ "node": ">=0.10.0"
124
+ }
125
+ },
126
+ "node_modules/decamelize-keys/node_modules/map-obj": {
127
+ "version": "1.0.1",
128
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
129
+ "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==",
130
+ "license": "MIT",
131
+ "engines": {
132
+ "node": ">=0.10.0"
133
+ }
134
+ },
135
+ "node_modules/error-ex": {
136
+ "version": "1.3.2",
137
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
138
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
139
+ "license": "MIT",
140
+ "dependencies": {
141
+ "is-arrayish": "^0.2.1"
142
+ }
143
+ },
144
+ "node_modules/find-up": {
145
+ "version": "5.0.0",
146
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
147
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
148
+ "license": "MIT",
149
+ "dependencies": {
150
+ "locate-path": "^6.0.0",
151
+ "path-exists": "^4.0.0"
152
+ },
153
+ "engines": {
154
+ "node": ">=10"
155
+ },
156
+ "funding": {
157
+ "url": "https://github.com/sponsors/sindresorhus"
158
+ }
159
+ },
160
+ "node_modules/find-up/node_modules/path-exists": {
161
+ "version": "4.0.0",
162
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
163
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
164
+ "license": "MIT",
165
+ "engines": {
166
+ "node": ">=8"
167
+ }
168
+ },
169
+ "node_modules/function-bind": {
170
+ "version": "1.1.2",
171
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
172
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
173
+ "license": "MIT",
174
+ "funding": {
175
+ "url": "https://github.com/sponsors/ljharb"
176
+ }
177
+ },
178
+ "node_modules/hard-rejection": {
179
+ "version": "2.1.0",
180
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
181
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
182
+ "license": "MIT",
183
+ "engines": {
184
+ "node": ">=6"
185
+ }
186
+ },
187
+ "node_modules/hasown": {
188
+ "version": "2.0.2",
189
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
190
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
191
+ "license": "MIT",
192
+ "dependencies": {
193
+ "function-bind": "^1.1.2"
194
+ },
195
+ "engines": {
196
+ "node": ">= 0.4"
197
+ }
198
+ },
199
+ "node_modules/hosted-git-info": {
200
+ "version": "4.1.0",
201
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
202
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
203
+ "license": "ISC",
204
+ "dependencies": {
205
+ "lru-cache": "^6.0.0"
206
+ },
207
+ "engines": {
208
+ "node": ">=10"
209
+ }
210
+ },
211
+ "node_modules/indent-string": {
212
+ "version": "5.0.0",
213
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
214
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
215
+ "license": "MIT",
216
+ "engines": {
217
+ "node": ">=12"
218
+ },
219
+ "funding": {
220
+ "url": "https://github.com/sponsors/sindresorhus"
221
+ }
222
+ },
223
+ "node_modules/is-arrayish": {
224
+ "version": "0.2.1",
225
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
226
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
227
+ "license": "MIT"
228
+ },
229
+ "node_modules/is-core-module": {
230
+ "version": "2.16.1",
231
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
232
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
233
+ "license": "MIT",
234
+ "dependencies": {
235
+ "hasown": "^2.0.2"
236
+ },
237
+ "engines": {
238
+ "node": ">= 0.4"
239
+ },
240
+ "funding": {
241
+ "url": "https://github.com/sponsors/ljharb"
242
+ }
243
+ },
244
+ "node_modules/is-plain-obj": {
245
+ "version": "1.1.0",
246
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
247
+ "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",
248
+ "license": "MIT",
249
+ "engines": {
250
+ "node": ">=0.10.0"
251
+ }
252
+ },
253
+ "node_modules/isomorphic-unfetch": {
254
+ "version": "3.1.0",
255
+ "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz",
256
+ "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==",
257
+ "license": "MIT",
258
+ "dependencies": {
259
+ "node-fetch": "^2.6.1",
260
+ "unfetch": "^4.2.0"
261
+ }
262
+ },
263
+ "node_modules/js-tokens": {
264
+ "version": "4.0.0",
265
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
266
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
267
+ "license": "MIT"
268
+ },
269
+ "node_modules/json-parse-even-better-errors": {
270
+ "version": "2.3.1",
271
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
272
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
273
+ "license": "MIT"
274
+ },
275
+ "node_modules/kind-of": {
276
+ "version": "6.0.3",
277
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
278
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
279
+ "license": "MIT",
280
+ "engines": {
281
+ "node": ">=0.10.0"
282
+ }
283
+ },
284
+ "node_modules/lines-and-columns": {
285
+ "version": "1.2.4",
286
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
287
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
288
+ "license": "MIT"
289
+ },
290
+ "node_modules/locate-path": {
291
+ "version": "6.0.0",
292
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
293
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
294
+ "license": "MIT",
295
+ "dependencies": {
296
+ "p-locate": "^5.0.0"
297
+ },
298
+ "engines": {
299
+ "node": ">=10"
300
+ },
301
+ "funding": {
302
+ "url": "https://github.com/sponsors/sindresorhus"
303
+ }
304
+ },
305
+ "node_modules/lru-cache": {
306
+ "version": "6.0.0",
307
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
308
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
309
+ "license": "ISC",
310
+ "dependencies": {
311
+ "yallist": "^4.0.0"
312
+ },
313
+ "engines": {
314
+ "node": ">=10"
315
+ }
316
+ },
317
+ "node_modules/map-obj": {
318
+ "version": "4.3.0",
319
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
320
+ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
321
+ "license": "MIT",
322
+ "engines": {
323
+ "node": ">=8"
324
+ },
325
+ "funding": {
326
+ "url": "https://github.com/sponsors/sindresorhus"
327
+ }
328
+ },
329
+ "node_modules/meow": {
330
+ "version": "10.1.5",
331
+ "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz",
332
+ "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==",
333
+ "license": "MIT",
334
+ "dependencies": {
335
+ "@types/minimist": "^1.2.2",
336
+ "camelcase-keys": "^7.0.0",
337
+ "decamelize": "^5.0.0",
338
+ "decamelize-keys": "^1.1.0",
339
+ "hard-rejection": "^2.1.0",
340
+ "minimist-options": "4.1.0",
341
+ "normalize-package-data": "^3.0.2",
342
+ "read-pkg-up": "^8.0.0",
343
+ "redent": "^4.0.0",
344
+ "trim-newlines": "^4.0.2",
345
+ "type-fest": "^1.2.2",
346
+ "yargs-parser": "^20.2.9"
347
+ },
348
+ "engines": {
349
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
350
+ },
351
+ "funding": {
352
+ "url": "https://github.com/sponsors/sindresorhus"
353
+ }
354
+ },
355
+ "node_modules/min-indent": {
356
+ "version": "1.0.1",
357
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
358
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
359
+ "license": "MIT",
360
+ "engines": {
361
+ "node": ">=4"
362
+ }
363
+ },
364
+ "node_modules/minimist-options": {
365
+ "version": "4.1.0",
366
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
367
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
368
+ "license": "MIT",
369
+ "dependencies": {
370
+ "arrify": "^1.0.1",
371
+ "is-plain-obj": "^1.1.0",
372
+ "kind-of": "^6.0.3"
373
+ },
374
+ "engines": {
375
+ "node": ">= 6"
376
+ }
377
+ },
378
+ "node_modules/node-fetch": {
379
+ "version": "2.7.0",
380
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
381
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
382
+ "license": "MIT",
383
+ "dependencies": {
384
+ "whatwg-url": "^5.0.0"
385
+ },
386
+ "engines": {
387
+ "node": "4.x || >=6.0.0"
388
+ },
389
+ "peerDependencies": {
390
+ "encoding": "^0.1.0"
391
+ },
392
+ "peerDependenciesMeta": {
393
+ "encoding": {
394
+ "optional": true
395
+ }
396
+ }
397
+ },
398
+ "node_modules/normalize-package-data": {
399
+ "version": "3.0.3",
400
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
401
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
402
+ "license": "BSD-2-Clause",
403
+ "dependencies": {
404
+ "hosted-git-info": "^4.0.1",
405
+ "is-core-module": "^2.5.0",
406
+ "semver": "^7.3.4",
407
+ "validate-npm-package-license": "^3.0.1"
408
+ },
409
+ "engines": {
410
+ "node": ">=10"
411
+ }
412
+ },
413
+ "node_modules/p-limit": {
414
+ "version": "3.1.0",
415
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
416
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
417
+ "license": "MIT",
418
+ "dependencies": {
419
+ "yocto-queue": "^0.1.0"
420
+ },
421
+ "engines": {
422
+ "node": ">=10"
423
+ },
424
+ "funding": {
425
+ "url": "https://github.com/sponsors/sindresorhus"
426
+ }
427
+ },
428
+ "node_modules/p-locate": {
429
+ "version": "5.0.0",
430
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
431
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
432
+ "license": "MIT",
433
+ "dependencies": {
434
+ "p-limit": "^3.0.2"
435
+ },
436
+ "engines": {
437
+ "node": ">=10"
438
+ },
439
+ "funding": {
440
+ "url": "https://github.com/sponsors/sindresorhus"
441
+ }
442
+ },
443
+ "node_modules/parse-json": {
444
+ "version": "5.2.0",
445
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
446
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
447
+ "license": "MIT",
448
+ "dependencies": {
449
+ "@babel/code-frame": "^7.0.0",
450
+ "error-ex": "^1.3.1",
451
+ "json-parse-even-better-errors": "^2.3.0",
452
+ "lines-and-columns": "^1.1.6"
453
+ },
454
+ "engines": {
455
+ "node": ">=8"
456
+ },
457
+ "funding": {
458
+ "url": "https://github.com/sponsors/sindresorhus"
459
+ }
460
+ },
461
+ "node_modules/path-exists": {
462
+ "version": "5.0.0",
463
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
464
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
465
+ "license": "MIT",
466
+ "engines": {
467
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
468
+ }
469
+ },
470
+ "node_modules/path-exists-cli": {
471
+ "version": "2.0.0",
472
+ "resolved": "https://registry.npmjs.org/path-exists-cli/-/path-exists-cli-2.0.0.tgz",
473
+ "integrity": "sha512-qGr0A87KYCznmvabblxyxnzA/MtPZ28wH+4SCMP4tjTFAbzqwvs5xpUZExAYzq5OgHe5vIswzdH5iosCb8YF/Q==",
474
+ "license": "MIT",
475
+ "dependencies": {
476
+ "meow": "^10.1.1",
477
+ "path-exists": "^5.0.0"
478
+ },
479
+ "bin": {
480
+ "path-exists": "cli.js"
481
+ },
482
+ "engines": {
483
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
484
+ },
485
+ "funding": {
486
+ "url": "https://github.com/sponsors/sindresorhus"
487
+ }
488
+ },
489
+ "node_modules/picocolors": {
490
+ "version": "1.1.1",
491
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
492
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
493
+ "license": "ISC"
494
+ },
495
+ "node_modules/quick-lru": {
496
+ "version": "5.1.1",
497
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
498
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
499
+ "license": "MIT",
500
+ "engines": {
501
+ "node": ">=10"
502
+ },
503
+ "funding": {
504
+ "url": "https://github.com/sponsors/sindresorhus"
505
+ }
506
+ },
507
+ "node_modules/read-pkg": {
508
+ "version": "6.0.0",
509
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz",
510
+ "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==",
511
+ "license": "MIT",
512
+ "dependencies": {
513
+ "@types/normalize-package-data": "^2.4.0",
514
+ "normalize-package-data": "^3.0.2",
515
+ "parse-json": "^5.2.0",
516
+ "type-fest": "^1.0.1"
517
+ },
518
+ "engines": {
519
+ "node": ">=12"
520
+ },
521
+ "funding": {
522
+ "url": "https://github.com/sponsors/sindresorhus"
523
+ }
524
+ },
525
+ "node_modules/read-pkg-up": {
526
+ "version": "8.0.0",
527
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
528
+ "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
529
+ "license": "MIT",
530
+ "dependencies": {
531
+ "find-up": "^5.0.0",
532
+ "read-pkg": "^6.0.0",
533
+ "type-fest": "^1.0.1"
534
+ },
535
+ "engines": {
536
+ "node": ">=12"
537
+ },
538
+ "funding": {
539
+ "url": "https://github.com/sponsors/sindresorhus"
540
+ }
541
+ },
542
+ "node_modules/redent": {
543
+ "version": "4.0.0",
544
+ "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
545
+ "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
546
+ "license": "MIT",
547
+ "dependencies": {
548
+ "indent-string": "^5.0.0",
549
+ "strip-indent": "^4.0.0"
550
+ },
551
+ "engines": {
552
+ "node": ">=12"
553
+ },
554
+ "funding": {
555
+ "url": "https://github.com/sponsors/sindresorhus"
556
+ }
557
+ },
558
+ "node_modules/semver": {
559
+ "version": "7.7.2",
560
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
561
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
562
+ "license": "ISC",
563
+ "bin": {
564
+ "semver": "bin/semver.js"
565
+ },
566
+ "engines": {
567
+ "node": ">=10"
568
+ }
569
+ },
570
+ "node_modules/spdx-correct": {
571
+ "version": "3.2.0",
572
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
573
+ "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
574
+ "license": "Apache-2.0",
575
+ "dependencies": {
576
+ "spdx-expression-parse": "^3.0.0",
577
+ "spdx-license-ids": "^3.0.0"
578
+ }
579
+ },
580
+ "node_modules/spdx-exceptions": {
581
+ "version": "2.5.0",
582
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
583
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
584
+ "license": "CC-BY-3.0"
585
+ },
586
+ "node_modules/spdx-expression-parse": {
587
+ "version": "3.0.1",
588
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
589
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
590
+ "license": "MIT",
591
+ "dependencies": {
592
+ "spdx-exceptions": "^2.1.0",
593
+ "spdx-license-ids": "^3.0.0"
594
+ }
595
+ },
596
+ "node_modules/spdx-license-ids": {
597
+ "version": "3.0.22",
598
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz",
599
+ "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==",
600
+ "license": "CC0-1.0"
601
+ },
602
+ "node_modules/strip-indent": {
603
+ "version": "4.0.0",
604
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
605
+ "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
606
+ "license": "MIT",
607
+ "dependencies": {
608
+ "min-indent": "^1.0.1"
609
+ },
610
+ "engines": {
611
+ "node": ">=12"
612
+ },
613
+ "funding": {
614
+ "url": "https://github.com/sponsors/sindresorhus"
615
+ }
616
+ },
617
+ "node_modules/tr46": {
618
+ "version": "0.0.3",
619
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
620
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
621
+ "license": "MIT"
622
+ },
623
+ "node_modules/trim-newlines": {
624
+ "version": "4.1.1",
625
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz",
626
+ "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==",
627
+ "license": "MIT",
628
+ "engines": {
629
+ "node": ">=12"
630
+ },
631
+ "funding": {
632
+ "url": "https://github.com/sponsors/sindresorhus"
633
+ }
634
+ },
635
+ "node_modules/type-fest": {
636
+ "version": "1.4.0",
637
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
638
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
639
+ "license": "(MIT OR CC0-1.0)",
640
+ "engines": {
641
+ "node": ">=10"
642
+ },
643
+ "funding": {
644
+ "url": "https://github.com/sponsors/sindresorhus"
645
+ }
646
+ },
647
+ "node_modules/unfetch": {
648
+ "version": "4.2.0",
649
+ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
650
+ "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==",
651
+ "license": "MIT"
652
+ },
653
+ "node_modules/validate-npm-package-license": {
654
+ "version": "3.0.4",
655
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
656
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
657
+ "license": "Apache-2.0",
658
+ "dependencies": {
659
+ "spdx-correct": "^3.0.0",
660
+ "spdx-expression-parse": "^3.0.0"
661
+ }
662
+ },
663
+ "node_modules/webidl-conversions": {
664
+ "version": "3.0.1",
665
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
666
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
667
+ "license": "BSD-2-Clause"
668
+ },
669
+ "node_modules/whatwg-url": {
670
+ "version": "5.0.0",
671
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
672
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
673
+ "license": "MIT",
674
+ "dependencies": {
675
+ "tr46": "~0.0.3",
676
+ "webidl-conversions": "^3.0.0"
677
+ }
678
+ },
679
+ "node_modules/wtf_wikipedia": {
680
+ "version": "10.4.0",
681
+ "resolved": "https://registry.npmjs.org/wtf_wikipedia/-/wtf_wikipedia-10.4.0.tgz",
682
+ "integrity": "sha512-yRxTiBURj2LW5HWAe+T7bCV2x45C/qTqcknUTmInKmB9cmLSxR6Nh44rB9K+nfNiydtjc3HLHwYWxMuHZtpVSQ==",
683
+ "hasInstallScript": true,
684
+ "license": "MIT",
685
+ "dependencies": {
686
+ "isomorphic-unfetch": "^3.1.0",
687
+ "path-exists-cli": "2.0.0"
688
+ },
689
+ "bin": {
690
+ "wtf_wikipedia": "cli.js"
691
+ },
692
+ "engines": {
693
+ "node": ">=12.0.0"
694
+ }
695
+ },
696
+ "node_modules/yallist": {
697
+ "version": "4.0.0",
698
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
699
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
700
+ "license": "ISC"
701
+ },
702
+ "node_modules/yargs-parser": {
703
+ "version": "20.2.9",
704
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
705
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
706
+ "license": "ISC",
707
+ "engines": {
708
+ "node": ">=10"
709
+ }
710
+ },
711
+ "node_modules/yocto-queue": {
712
+ "version": "0.1.0",
713
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
714
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
715
+ "license": "MIT",
716
+ "engines": {
717
+ "node": ">=10"
718
+ },
719
+ "funding": {
720
+ "url": "https://github.com/sponsors/sindresorhus"
721
+ }
722
+ }
723
+ }
724
+ }
data/wikipedia/parser/package.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs",
13
+ "dependencies": {
14
+ "wtf_wikipedia": "^10.4.0"
15
+ }
16
+ }
data/wikipedia/parser/wtf_bridge.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wtf_bridge.js
2
+ // Usage: node wtf_bridge.js
3
+ // Reads newline-delimited JSON from stdin: {"wikitext":"...","lang":"da"}
4
+ // Writes newline-delimited JSON to stdout: {"text":"...","isRedirect":false} or {"error":"..."}
5
+ const wtf = require('wtf_wikipedia');
6
+ const readline = require('readline');
7
+
8
+ const rl = readline.createInterface({
9
+ input: process.stdin,
10
+ output: process.stdout,
11
+ terminal: false
12
+ });
13
+
14
+ process.on('uncaughtException', (err) => {
15
+ // emit as JSON so Python can see it
16
+ try {
17
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
18
+ } catch (e) {}
19
+ process.exit(1);
20
+ });
21
+
22
+ rl.on('line', (line) => {
23
+ (async () => {
24
+ try {
25
+ const payload = JSON.parse(line);
26
+ const wikitext = payload.wikitext || '';
27
+ const lang = payload.lang || null;
28
+
29
+ // parse wikitext into a document (sync)
30
+ const doc = lang ? wtf(wikitext, lang) : wtf(wikitext);
31
+ const text = (doc && typeof doc.text === 'function') ? doc.text() : '';
32
+ const isRedirect = (doc && typeof doc.isRedirect === 'function') ? doc.isRedirect() : false;
33
+
34
+ process.stdout.write(JSON.stringify({ text, isRedirect }) + '\n');
35
+ } catch (err) {
36
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
37
+ }
38
+ })();
39
+ });
data/wikipedia/wiki.log ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ 2025-08-18 19:13:08,960 - INFO - Parsing XML dump...
2
+ 2025-08-18 19:13:09,118 - WARNING - Skipping empty article
3
+ 2025-08-18 19:13:11,361 - WARNING - Skipping empty article
4
+ 2025-08-18 19:13:12,764 - WARNING - Skipping empty article
5
+ 2025-08-18 19:13:13,945 - WARNING - Skipping empty article
data/{wiki/wiki.md → wikipedia/wikipedia.md} RENAMED
@@ -30,9 +30,9 @@ You can read more about wikipedia on their [about](https://en.wikipedia.org/wiki
30
 
31
 
32
  <!-- START-DESC-STATS -->
33
- - **Number of samples**: 264.43K
34
- - **Number of tokens (Llama 3)**: 122.00M
35
- - **Average document length in tokens (min, max)**: 461.372631252529 (3, 83.12K)
36
  <!-- END-DESC-STATS -->
37
 
38
 
@@ -44,12 +44,12 @@ An example from the dataset looks as follows.
44
  <!-- START-SAMPLE -->
45
  ```py
46
  {
47
- "id": "wiki_366127",
48
- "text": "Vimoutiers er en kommune i departementet Orne i Basse-Normandie regionen i det nordvestlige Frankrig[...]",
49
  "source": "wiki",
50
- "added": "2021-03-28",
51
- "created": "2019-01-01, 2021-01-01",
52
- "token_count": 126
53
  }
54
  ```
55
 
@@ -74,6 +74,21 @@ An entry in the dataset consists of the following fields:
74
  <!-- END-DATASET PLOTS -->
75
 
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  ## Additional Information
79
 
 
30
 
31
 
32
  <!-- START-DESC-STATS -->
33
+ - **Number of samples**: 309.64K
34
+ - **Number of tokens (Llama 3)**: 173.33M
35
+ - **Average document length in tokens (min, max)**: 559.79 (8, 107.35K)
36
  <!-- END-DESC-STATS -->
37
 
38
 
 
44
  <!-- START-SAMPLE -->
45
  ```py
46
  {
47
+ "id": "wiki_2",
48
+ "text": "Arkæologi\nArkæologi er studiet af tidligere tiders menneskelige aktivitet, primært gennem studiet af[...]",
49
  "source": "wiki",
50
+ "added": "2025-08-18",
51
+ "created": "2024-06-16, 2024-06-16",
52
+ "token_count": 3380
53
  }
54
  ```
55
 
 
74
  <!-- END-DATASET PLOTS -->
75
 
76
 
77
+ ### Processing
78
+
79
+ For this dataset we have pulled the latest [database dump from wikimedia](https://dumps.wikimedia.org/dawiki/latest/) and extracted the texts using the [wtf_wikipedia](https://github.com/spencermountain/wtf_wikipedia/tree/dev) parser.
80
+
81
+
82
+
83
+ Because the parser is written in javascript you need to have Node.js installed on you machine.
84
+
85
+ To run the `create.py` file you first need to do:
86
+
87
+ ```bash
88
+ $ cd parser/ && npm install && cd ..
89
+ ```
90
+
91
+ We chose to use `wtf_wikipedia` because out of the other parsers we tested this was the imperically best one. We tested `mwparserfromhell`, `mediawiki_dump`, `wikiextractor`, and `wtf_wikipedia`. It seemed that the others still produced some sort of artifacts from the parsing of wikicode.
92
 
93
  ## Additional Information
94
 
data/{wiki/wiki.parquet → wikipedia/wikipedia.parquet} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b141c49429bbdca99ee7edc21f5cf2065935cbd0d7b342fae62ea8c305f6d901
3
- size 242613795
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0a8f27f66a761017e155b7820366227cd75566379aa755611f53e9299ed8717
3
+ size 318870452
data/wikisource/create.py ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "datasets",
5
+ # "mediawiki-dump",
6
+ # "mwparserfromhell",
7
+ # "pandas",
8
+ # "requests",
9
+ # "tqdm",
10
+ # "transformers",
11
+ # "dynaword"
12
+ # ]
13
+ # [tool.uv.sources]
14
+ # dynaword = { git = "https://huggingface.co/datasets/danish-foundation-models/danish-dynaword", rev = "00e7f2aee7f7ad2da423419f77ecbb9c0536de0d" }
15
+ # ///
16
+ import bz2
17
+ import datetime
18
+ import json
19
+ import logging
20
+ import os
21
+ import re
22
+ import subprocess
23
+ import sys
24
+ import threading
25
+
26
+ from mediawiki_dump.dumps import IteratorDump
27
+ from mediawiki_dump.reader import DumpReaderArticles
28
+
29
+ from mwparserfromhell import parse
30
+
31
+ import requests
32
+ from tqdm import tqdm
33
+ import pandas as pd
34
+
35
+ from datasets import Dataset
36
+ from transformers import AutoTokenizer
37
+ from concurrent.futures import ProcessPoolExecutor
38
+ from functools import partial
39
+ from typing import Any, Tuple
40
+
41
+ from dynaword.process_dataset import (
42
+ add_token_count,
43
+ ensure_column_order,
44
+ remove_duplicate_text,
45
+ remove_empty_texts,
46
+ )
47
+
48
+ logger = logging.getLogger(__name__)
49
+ logging.basicConfig(
50
+ level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
51
+ )
52
+ source = "wikisource"
53
+
54
+
55
+ class WtfNodeBridge:
56
+ """
57
+ Persistent Node bridge to wtf_wikipedia.
58
+ Call .parse(wikitext, lang=None) -> (text, is_redirect)
59
+ Remember to call .close() when done.
60
+ """
61
+
62
+ def __init__(
63
+ self, node_script_path: str = "parser/wtf_bridge.js", node_cmd: str = "node"
64
+ ):
65
+ self.proc = subprocess.Popen(
66
+ [node_cmd, node_script_path],
67
+ stdin=subprocess.PIPE,
68
+ stdout=subprocess.PIPE,
69
+ stderr=subprocess.PIPE,
70
+ text=True,
71
+ encoding="utf-8",
72
+ bufsize=1,
73
+ )
74
+ self._lock = threading.Lock()
75
+
76
+ # background thread to log stderr (helpful for debugging)
77
+ def _drain_stderr(p):
78
+ try:
79
+ for line in p.stderr:
80
+ logger.warning("wtf_node stderr: %s", line.rstrip())
81
+ except Exception:
82
+ pass
83
+
84
+ t = threading.Thread(target=_drain_stderr, args=(self.proc,), daemon=True)
85
+ t.start()
86
+
87
+ def parse(self, wikitext: str, lang: str | None = None) -> Tuple[str, bool]:
88
+ if self.proc.poll() is not None:
89
+ raise RuntimeError("Node bridge process has exited")
90
+ payload = {"wikitext": wikitext}
91
+ if lang:
92
+ payload["lang"] = lang
93
+ line = json.dumps(payload, ensure_ascii=False)
94
+ with self._lock:
95
+ # write and flush a single JSON line
96
+ try:
97
+ self.proc.stdin.write(line + "\n")
98
+ self.proc.stdin.flush()
99
+ except BrokenPipeError as e:
100
+ raise RuntimeError("Broken pipe writing to node bridge") from e
101
+
102
+ # read exactly one JSON line back
103
+ out_line = self.proc.stdout.readline()
104
+ if not out_line:
105
+ raise RuntimeError("No response from node bridge (it may have exited)")
106
+ res = json.loads(out_line)
107
+ if res.get("error"):
108
+ # choose to either raise or return empty text; here we raise
109
+ raise RuntimeError("Node bridge error: " + res["error"])
110
+ return res.get("text", ""), bool(res.get("isRedirect", False))
111
+
112
+ def close(self):
113
+ try:
114
+ if self.proc.stdin:
115
+ self.proc.stdin.close()
116
+ except Exception:
117
+ pass
118
+ try:
119
+ self.proc.terminate()
120
+ self.proc.wait(timeout=3)
121
+ except Exception:
122
+ try:
123
+ self.proc.kill()
124
+ except Exception:
125
+ pass
126
+
127
+
128
+ def download_wiki_dump(url: str, file_path: str):
129
+ """
130
+ Downloads a file from a URL with a progress bar.
131
+
132
+ Args:
133
+ url (str): The URL of the file to download.
134
+ file_path (str): The local path to save the file.
135
+ """
136
+ print(f"Downloading {url} to {file_path}...")
137
+ try:
138
+ with requests.get(url, stream=True) as r:
139
+ r.raise_for_status()
140
+ total_size = int(r.headers.get("content-length", 0))
141
+ block_size = 8192 # 8 Kibibytes
142
+
143
+ with (
144
+ open(file_path, "wb") as f,
145
+ tqdm(
146
+ total=total_size, unit="B", unit_scale=True, desc="Downloading"
147
+ ) as pbar,
148
+ ):
149
+ for chunk in r.iter_content(chunk_size=block_size):
150
+ if chunk: # filter out keep-alive chunks
151
+ f.write(chunk)
152
+ pbar.update(len(chunk))
153
+ logger.info("\nDownload complete.")
154
+ except requests.exceptions.RequestException as e:
155
+ logger.error(f"\nError downloading file: {e}")
156
+ sys.exit(1)
157
+
158
+
159
+ def get_content(file_name: str):
160
+ with bz2.open(file_name, mode="r") as fp:
161
+ yield from fp
162
+
163
+
164
+ def process_dump_to_parquet(bz2_file_path: str, parquet_file_path: str):
165
+ dump = IteratorDump(iterator=get_content(file_name=bz2_file_path))
166
+ pages = DumpReaderArticles().read(dump)
167
+ articles = []
168
+ today = datetime.datetime.now().strftime("%Y-%m-%d")
169
+
170
+ bridge = WtfNodeBridge("parser/wtf_bridge.js")
171
+ try:
172
+ for page in tqdm(pages):
173
+ try:
174
+ plain_text, is_redirect = bridge.parse(page.content, lang="da")
175
+ except Exception as exc:
176
+ logger.warning(
177
+ "wtf parse failed for page %s: %s -- falling back to mwparserfromhell",
178
+ getattr(page, "title", "<unknown>"),
179
+ exc,
180
+ )
181
+ plain_text = parse(page.content).strip_code().strip()
182
+ is_redirect = plain_text.startswith("REDIRECT")
183
+
184
+ if is_redirect:
185
+ continue
186
+
187
+ # Additional cleanup if you like (wtf.text() already removes a lot)
188
+ plain_text = re.sub(
189
+ r"thumb(?:\|(?:left|right|center|\d+px)*)*\|[^\n]*", "", plain_text
190
+ ).strip()
191
+
192
+ if len(plain_text) == 0:
193
+ logger.warning("Skipping empty article")
194
+ continue
195
+
196
+ date = datetime.datetime.strptime(
197
+ page.timestamp, "%Y-%m-%dT%H:%M:%SZ"
198
+ ).strftime("%Y-%m-%d")
199
+
200
+ articles.append(
201
+ {
202
+ "id": f"{source}_{page.page_id}",
203
+ "source": source,
204
+ "created": f"{date}, {date}",
205
+ "text": f"{page.title}\n{plain_text}",
206
+ "added": today,
207
+ }
208
+ )
209
+ finally:
210
+ bridge.close()
211
+
212
+ df = pd.DataFrame(articles)
213
+ ds = Dataset.from_pandas(df)
214
+ ds = add_token_count(ds)
215
+ ds = remove_empty_texts(ds)
216
+ ds = remove_duplicate_text(ds)
217
+ ds = ensure_column_order(ds)
218
+ ds.to_parquet(parquet_file_path, compression="snappy")
219
+
220
+
221
+ def main():
222
+ """
223
+ Main function to orchestrate the download and processing.
224
+ """
225
+ # --- Configuration ---
226
+ # URL for the latest Danish Wikipedia articles dump
227
+ WIKI_DUMP_URL = f"https://dumps.wikimedia.org/da{source}/latest/da{source}-latest-pages-articles.xml.bz2"
228
+
229
+ # Local file paths
230
+ DOWNLOADED_BZ2_FILE = f"tmp/da{source}-latest-pages-articles.xml.bz2"
231
+ OUTPUT_PARQUET_FILE = f"{source}.parquet"
232
+
233
+ # --- Execution ---
234
+ # 1. Download the dump file
235
+ if not os.path.exists(DOWNLOADED_BZ2_FILE):
236
+ download_wiki_dump(WIKI_DUMP_URL, DOWNLOADED_BZ2_FILE)
237
+ else:
238
+ print(f"File '{DOWNLOADED_BZ2_FILE}' already exists. Skipping download.")
239
+
240
+ # 2. Process the dump and save to Parquet
241
+ process_dump_to_parquet(DOWNLOADED_BZ2_FILE, OUTPUT_PARQUET_FILE)
242
+
243
+ # 3. (Optional) Clean up the downloaded file
244
+ # If you want to keep the bz2 file, comment out the next line.
245
+ print(f"Cleaning up by removing '{DOWNLOADED_BZ2_FILE}'...")
246
+ os.remove(DOWNLOADED_BZ2_FILE)
247
+
248
+ print("\nScript finished successfully.")
249
+
250
+
251
+ if __name__ == "__main__":
252
+ # Before running, make sure you have the required libraries installed:
253
+ # pip install requests mwparserfromhell pandas pyarrow
254
+ main()
data/wikisource/descriptive_stats.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "number_of_samples": 2419,
3
- "number_of_tokens": 5344862,
4
- "min_length_tokens": 5,
5
- "max_length_tokens": 218362,
6
- "number_of_characters": 15478618,
7
- "min_length_characters": 10,
8
- "max_length_characters": 613148
9
  }
 
1
  {
2
+ "number_of_samples": 3004,
3
+ "number_of_tokens": 6275973,
4
+ "min_length_tokens": 17,
5
+ "max_length_tokens": 261099,
6
+ "number_of_characters": 18286474,
7
+ "min_length_characters": 54,
8
+ "max_length_characters": 754270
9
  }
data/wikisource/images/dist_document_length.png CHANGED

Git LFS Details

  • SHA256: 6bd621342d847c65b6fe39a33628b6f1ee74e25f00f0841956d4263d1c70f9c5
  • Pointer size: 131 Bytes
  • Size of remote file: 563 kB

Git LFS Details

  • SHA256: a56b61df3f6093ec6caa098b61913854643bd2bbc976e9633b441ceb059e18cf
  • Pointer size: 131 Bytes
  • Size of remote file: 544 kB
data/wikisource/parser/package-lock.json ADDED
@@ -0,0 +1,724 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "parser",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "wtf_wikipedia": "^10.4.0"
13
+ }
14
+ },
15
+ "node_modules/@babel/code-frame": {
16
+ "version": "7.27.1",
17
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.27.1.tgz",
18
+ "integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
19
+ "license": "MIT",
20
+ "dependencies": {
21
+ "@babel/helper-validator-identifier": "^7.27.1",
22
+ "js-tokens": "^4.0.0",
23
+ "picocolors": "^1.1.1"
24
+ },
25
+ "engines": {
26
+ "node": ">=6.9.0"
27
+ }
28
+ },
29
+ "node_modules/@babel/helper-validator-identifier": {
30
+ "version": "7.27.1",
31
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz",
32
+ "integrity": "sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==",
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=6.9.0"
36
+ }
37
+ },
38
+ "node_modules/@types/minimist": {
39
+ "version": "1.2.5",
40
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",
41
+ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",
42
+ "license": "MIT"
43
+ },
44
+ "node_modules/@types/normalize-package-data": {
45
+ "version": "2.4.4",
46
+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz",
47
+ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",
48
+ "license": "MIT"
49
+ },
50
+ "node_modules/arrify": {
51
+ "version": "1.0.1",
52
+ "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
53
+ "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==",
54
+ "license": "MIT",
55
+ "engines": {
56
+ "node": ">=0.10.0"
57
+ }
58
+ },
59
+ "node_modules/camelcase": {
60
+ "version": "6.3.0",
61
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
62
+ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
63
+ "license": "MIT",
64
+ "engines": {
65
+ "node": ">=10"
66
+ },
67
+ "funding": {
68
+ "url": "https://github.com/sponsors/sindresorhus"
69
+ }
70
+ },
71
+ "node_modules/camelcase-keys": {
72
+ "version": "7.0.2",
73
+ "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz",
74
+ "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==",
75
+ "license": "MIT",
76
+ "dependencies": {
77
+ "camelcase": "^6.3.0",
78
+ "map-obj": "^4.1.0",
79
+ "quick-lru": "^5.1.1",
80
+ "type-fest": "^1.2.1"
81
+ },
82
+ "engines": {
83
+ "node": ">=12"
84
+ },
85
+ "funding": {
86
+ "url": "https://github.com/sponsors/sindresorhus"
87
+ }
88
+ },
89
+ "node_modules/decamelize": {
90
+ "version": "5.0.1",
91
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz",
92
+ "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==",
93
+ "license": "MIT",
94
+ "engines": {
95
+ "node": ">=10"
96
+ },
97
+ "funding": {
98
+ "url": "https://github.com/sponsors/sindresorhus"
99
+ }
100
+ },
101
+ "node_modules/decamelize-keys": {
102
+ "version": "1.1.1",
103
+ "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz",
104
+ "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==",
105
+ "license": "MIT",
106
+ "dependencies": {
107
+ "decamelize": "^1.1.0",
108
+ "map-obj": "^1.0.0"
109
+ },
110
+ "engines": {
111
+ "node": ">=0.10.0"
112
+ },
113
+ "funding": {
114
+ "url": "https://github.com/sponsors/sindresorhus"
115
+ }
116
+ },
117
+ "node_modules/decamelize-keys/node_modules/decamelize": {
118
+ "version": "1.2.0",
119
+ "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
120
+ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
121
+ "license": "MIT",
122
+ "engines": {
123
+ "node": ">=0.10.0"
124
+ }
125
+ },
126
+ "node_modules/decamelize-keys/node_modules/map-obj": {
127
+ "version": "1.0.1",
128
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
129
+ "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==",
130
+ "license": "MIT",
131
+ "engines": {
132
+ "node": ">=0.10.0"
133
+ }
134
+ },
135
+ "node_modules/error-ex": {
136
+ "version": "1.3.2",
137
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
138
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
139
+ "license": "MIT",
140
+ "dependencies": {
141
+ "is-arrayish": "^0.2.1"
142
+ }
143
+ },
144
+ "node_modules/find-up": {
145
+ "version": "5.0.0",
146
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
147
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
148
+ "license": "MIT",
149
+ "dependencies": {
150
+ "locate-path": "^6.0.0",
151
+ "path-exists": "^4.0.0"
152
+ },
153
+ "engines": {
154
+ "node": ">=10"
155
+ },
156
+ "funding": {
157
+ "url": "https://github.com/sponsors/sindresorhus"
158
+ }
159
+ },
160
+ "node_modules/find-up/node_modules/path-exists": {
161
+ "version": "4.0.0",
162
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
163
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
164
+ "license": "MIT",
165
+ "engines": {
166
+ "node": ">=8"
167
+ }
168
+ },
169
+ "node_modules/function-bind": {
170
+ "version": "1.1.2",
171
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
172
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
173
+ "license": "MIT",
174
+ "funding": {
175
+ "url": "https://github.com/sponsors/ljharb"
176
+ }
177
+ },
178
+ "node_modules/hard-rejection": {
179
+ "version": "2.1.0",
180
+ "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz",
181
+ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==",
182
+ "license": "MIT",
183
+ "engines": {
184
+ "node": ">=6"
185
+ }
186
+ },
187
+ "node_modules/hasown": {
188
+ "version": "2.0.2",
189
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
190
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
191
+ "license": "MIT",
192
+ "dependencies": {
193
+ "function-bind": "^1.1.2"
194
+ },
195
+ "engines": {
196
+ "node": ">= 0.4"
197
+ }
198
+ },
199
+ "node_modules/hosted-git-info": {
200
+ "version": "4.1.0",
201
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
202
+ "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==",
203
+ "license": "ISC",
204
+ "dependencies": {
205
+ "lru-cache": "^6.0.0"
206
+ },
207
+ "engines": {
208
+ "node": ">=10"
209
+ }
210
+ },
211
+ "node_modules/indent-string": {
212
+ "version": "5.0.0",
213
+ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
214
+ "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
215
+ "license": "MIT",
216
+ "engines": {
217
+ "node": ">=12"
218
+ },
219
+ "funding": {
220
+ "url": "https://github.com/sponsors/sindresorhus"
221
+ }
222
+ },
223
+ "node_modules/is-arrayish": {
224
+ "version": "0.2.1",
225
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
226
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
227
+ "license": "MIT"
228
+ },
229
+ "node_modules/is-core-module": {
230
+ "version": "2.16.1",
231
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
232
+ "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
233
+ "license": "MIT",
234
+ "dependencies": {
235
+ "hasown": "^2.0.2"
236
+ },
237
+ "engines": {
238
+ "node": ">= 0.4"
239
+ },
240
+ "funding": {
241
+ "url": "https://github.com/sponsors/ljharb"
242
+ }
243
+ },
244
+ "node_modules/is-plain-obj": {
245
+ "version": "1.1.0",
246
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
247
+ "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==",
248
+ "license": "MIT",
249
+ "engines": {
250
+ "node": ">=0.10.0"
251
+ }
252
+ },
253
+ "node_modules/isomorphic-unfetch": {
254
+ "version": "3.1.0",
255
+ "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz",
256
+ "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==",
257
+ "license": "MIT",
258
+ "dependencies": {
259
+ "node-fetch": "^2.6.1",
260
+ "unfetch": "^4.2.0"
261
+ }
262
+ },
263
+ "node_modules/js-tokens": {
264
+ "version": "4.0.0",
265
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
266
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
267
+ "license": "MIT"
268
+ },
269
+ "node_modules/json-parse-even-better-errors": {
270
+ "version": "2.3.1",
271
+ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
272
+ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
273
+ "license": "MIT"
274
+ },
275
+ "node_modules/kind-of": {
276
+ "version": "6.0.3",
277
+ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
278
+ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
279
+ "license": "MIT",
280
+ "engines": {
281
+ "node": ">=0.10.0"
282
+ }
283
+ },
284
+ "node_modules/lines-and-columns": {
285
+ "version": "1.2.4",
286
+ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
287
+ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
288
+ "license": "MIT"
289
+ },
290
+ "node_modules/locate-path": {
291
+ "version": "6.0.0",
292
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
293
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
294
+ "license": "MIT",
295
+ "dependencies": {
296
+ "p-locate": "^5.0.0"
297
+ },
298
+ "engines": {
299
+ "node": ">=10"
300
+ },
301
+ "funding": {
302
+ "url": "https://github.com/sponsors/sindresorhus"
303
+ }
304
+ },
305
+ "node_modules/lru-cache": {
306
+ "version": "6.0.0",
307
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
308
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
309
+ "license": "ISC",
310
+ "dependencies": {
311
+ "yallist": "^4.0.0"
312
+ },
313
+ "engines": {
314
+ "node": ">=10"
315
+ }
316
+ },
317
+ "node_modules/map-obj": {
318
+ "version": "4.3.0",
319
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz",
320
+ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==",
321
+ "license": "MIT",
322
+ "engines": {
323
+ "node": ">=8"
324
+ },
325
+ "funding": {
326
+ "url": "https://github.com/sponsors/sindresorhus"
327
+ }
328
+ },
329
+ "node_modules/meow": {
330
+ "version": "10.1.5",
331
+ "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz",
332
+ "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==",
333
+ "license": "MIT",
334
+ "dependencies": {
335
+ "@types/minimist": "^1.2.2",
336
+ "camelcase-keys": "^7.0.0",
337
+ "decamelize": "^5.0.0",
338
+ "decamelize-keys": "^1.1.0",
339
+ "hard-rejection": "^2.1.0",
340
+ "minimist-options": "4.1.0",
341
+ "normalize-package-data": "^3.0.2",
342
+ "read-pkg-up": "^8.0.0",
343
+ "redent": "^4.0.0",
344
+ "trim-newlines": "^4.0.2",
345
+ "type-fest": "^1.2.2",
346
+ "yargs-parser": "^20.2.9"
347
+ },
348
+ "engines": {
349
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
350
+ },
351
+ "funding": {
352
+ "url": "https://github.com/sponsors/sindresorhus"
353
+ }
354
+ },
355
+ "node_modules/min-indent": {
356
+ "version": "1.0.1",
357
+ "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
358
+ "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
359
+ "license": "MIT",
360
+ "engines": {
361
+ "node": ">=4"
362
+ }
363
+ },
364
+ "node_modules/minimist-options": {
365
+ "version": "4.1.0",
366
+ "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz",
367
+ "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==",
368
+ "license": "MIT",
369
+ "dependencies": {
370
+ "arrify": "^1.0.1",
371
+ "is-plain-obj": "^1.1.0",
372
+ "kind-of": "^6.0.3"
373
+ },
374
+ "engines": {
375
+ "node": ">= 6"
376
+ }
377
+ },
378
+ "node_modules/node-fetch": {
379
+ "version": "2.7.0",
380
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
381
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
382
+ "license": "MIT",
383
+ "dependencies": {
384
+ "whatwg-url": "^5.0.0"
385
+ },
386
+ "engines": {
387
+ "node": "4.x || >=6.0.0"
388
+ },
389
+ "peerDependencies": {
390
+ "encoding": "^0.1.0"
391
+ },
392
+ "peerDependenciesMeta": {
393
+ "encoding": {
394
+ "optional": true
395
+ }
396
+ }
397
+ },
398
+ "node_modules/normalize-package-data": {
399
+ "version": "3.0.3",
400
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz",
401
+ "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==",
402
+ "license": "BSD-2-Clause",
403
+ "dependencies": {
404
+ "hosted-git-info": "^4.0.1",
405
+ "is-core-module": "^2.5.0",
406
+ "semver": "^7.3.4",
407
+ "validate-npm-package-license": "^3.0.1"
408
+ },
409
+ "engines": {
410
+ "node": ">=10"
411
+ }
412
+ },
413
+ "node_modules/p-limit": {
414
+ "version": "3.1.0",
415
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
416
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
417
+ "license": "MIT",
418
+ "dependencies": {
419
+ "yocto-queue": "^0.1.0"
420
+ },
421
+ "engines": {
422
+ "node": ">=10"
423
+ },
424
+ "funding": {
425
+ "url": "https://github.com/sponsors/sindresorhus"
426
+ }
427
+ },
428
+ "node_modules/p-locate": {
429
+ "version": "5.0.0",
430
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
431
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
432
+ "license": "MIT",
433
+ "dependencies": {
434
+ "p-limit": "^3.0.2"
435
+ },
436
+ "engines": {
437
+ "node": ">=10"
438
+ },
439
+ "funding": {
440
+ "url": "https://github.com/sponsors/sindresorhus"
441
+ }
442
+ },
443
+ "node_modules/parse-json": {
444
+ "version": "5.2.0",
445
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
446
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
447
+ "license": "MIT",
448
+ "dependencies": {
449
+ "@babel/code-frame": "^7.0.0",
450
+ "error-ex": "^1.3.1",
451
+ "json-parse-even-better-errors": "^2.3.0",
452
+ "lines-and-columns": "^1.1.6"
453
+ },
454
+ "engines": {
455
+ "node": ">=8"
456
+ },
457
+ "funding": {
458
+ "url": "https://github.com/sponsors/sindresorhus"
459
+ }
460
+ },
461
+ "node_modules/path-exists": {
462
+ "version": "5.0.0",
463
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
464
+ "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
465
+ "license": "MIT",
466
+ "engines": {
467
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
468
+ }
469
+ },
470
+ "node_modules/path-exists-cli": {
471
+ "version": "2.0.0",
472
+ "resolved": "https://registry.npmjs.org/path-exists-cli/-/path-exists-cli-2.0.0.tgz",
473
+ "integrity": "sha512-qGr0A87KYCznmvabblxyxnzA/MtPZ28wH+4SCMP4tjTFAbzqwvs5xpUZExAYzq5OgHe5vIswzdH5iosCb8YF/Q==",
474
+ "license": "MIT",
475
+ "dependencies": {
476
+ "meow": "^10.1.1",
477
+ "path-exists": "^5.0.0"
478
+ },
479
+ "bin": {
480
+ "path-exists": "cli.js"
481
+ },
482
+ "engines": {
483
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
484
+ },
485
+ "funding": {
486
+ "url": "https://github.com/sponsors/sindresorhus"
487
+ }
488
+ },
489
+ "node_modules/picocolors": {
490
+ "version": "1.1.1",
491
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
492
+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
493
+ "license": "ISC"
494
+ },
495
+ "node_modules/quick-lru": {
496
+ "version": "5.1.1",
497
+ "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
498
+ "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
499
+ "license": "MIT",
500
+ "engines": {
501
+ "node": ">=10"
502
+ },
503
+ "funding": {
504
+ "url": "https://github.com/sponsors/sindresorhus"
505
+ }
506
+ },
507
+ "node_modules/read-pkg": {
508
+ "version": "6.0.0",
509
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz",
510
+ "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==",
511
+ "license": "MIT",
512
+ "dependencies": {
513
+ "@types/normalize-package-data": "^2.4.0",
514
+ "normalize-package-data": "^3.0.2",
515
+ "parse-json": "^5.2.0",
516
+ "type-fest": "^1.0.1"
517
+ },
518
+ "engines": {
519
+ "node": ">=12"
520
+ },
521
+ "funding": {
522
+ "url": "https://github.com/sponsors/sindresorhus"
523
+ }
524
+ },
525
+ "node_modules/read-pkg-up": {
526
+ "version": "8.0.0",
527
+ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz",
528
+ "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==",
529
+ "license": "MIT",
530
+ "dependencies": {
531
+ "find-up": "^5.0.0",
532
+ "read-pkg": "^6.0.0",
533
+ "type-fest": "^1.0.1"
534
+ },
535
+ "engines": {
536
+ "node": ">=12"
537
+ },
538
+ "funding": {
539
+ "url": "https://github.com/sponsors/sindresorhus"
540
+ }
541
+ },
542
+ "node_modules/redent": {
543
+ "version": "4.0.0",
544
+ "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz",
545
+ "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==",
546
+ "license": "MIT",
547
+ "dependencies": {
548
+ "indent-string": "^5.0.0",
549
+ "strip-indent": "^4.0.0"
550
+ },
551
+ "engines": {
552
+ "node": ">=12"
553
+ },
554
+ "funding": {
555
+ "url": "https://github.com/sponsors/sindresorhus"
556
+ }
557
+ },
558
+ "node_modules/semver": {
559
+ "version": "7.7.2",
560
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
561
+ "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
562
+ "license": "ISC",
563
+ "bin": {
564
+ "semver": "bin/semver.js"
565
+ },
566
+ "engines": {
567
+ "node": ">=10"
568
+ }
569
+ },
570
+ "node_modules/spdx-correct": {
571
+ "version": "3.2.0",
572
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
573
+ "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
574
+ "license": "Apache-2.0",
575
+ "dependencies": {
576
+ "spdx-expression-parse": "^3.0.0",
577
+ "spdx-license-ids": "^3.0.0"
578
+ }
579
+ },
580
+ "node_modules/spdx-exceptions": {
581
+ "version": "2.5.0",
582
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz",
583
+ "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==",
584
+ "license": "CC-BY-3.0"
585
+ },
586
+ "node_modules/spdx-expression-parse": {
587
+ "version": "3.0.1",
588
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
589
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
590
+ "license": "MIT",
591
+ "dependencies": {
592
+ "spdx-exceptions": "^2.1.0",
593
+ "spdx-license-ids": "^3.0.0"
594
+ }
595
+ },
596
+ "node_modules/spdx-license-ids": {
597
+ "version": "3.0.22",
598
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz",
599
+ "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==",
600
+ "license": "CC0-1.0"
601
+ },
602
+ "node_modules/strip-indent": {
603
+ "version": "4.0.0",
604
+ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz",
605
+ "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==",
606
+ "license": "MIT",
607
+ "dependencies": {
608
+ "min-indent": "^1.0.1"
609
+ },
610
+ "engines": {
611
+ "node": ">=12"
612
+ },
613
+ "funding": {
614
+ "url": "https://github.com/sponsors/sindresorhus"
615
+ }
616
+ },
617
+ "node_modules/tr46": {
618
+ "version": "0.0.3",
619
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
620
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
621
+ "license": "MIT"
622
+ },
623
+ "node_modules/trim-newlines": {
624
+ "version": "4.1.1",
625
+ "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.1.1.tgz",
626
+ "integrity": "sha512-jRKj0n0jXWo6kh62nA5TEh3+4igKDXLvzBJcPpiizP7oOolUrYIxmVBG9TOtHYFHoddUk6YvAkGeGoSVTXfQXQ==",
627
+ "license": "MIT",
628
+ "engines": {
629
+ "node": ">=12"
630
+ },
631
+ "funding": {
632
+ "url": "https://github.com/sponsors/sindresorhus"
633
+ }
634
+ },
635
+ "node_modules/type-fest": {
636
+ "version": "1.4.0",
637
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
638
+ "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
639
+ "license": "(MIT OR CC0-1.0)",
640
+ "engines": {
641
+ "node": ">=10"
642
+ },
643
+ "funding": {
644
+ "url": "https://github.com/sponsors/sindresorhus"
645
+ }
646
+ },
647
+ "node_modules/unfetch": {
648
+ "version": "4.2.0",
649
+ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
650
+ "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA==",
651
+ "license": "MIT"
652
+ },
653
+ "node_modules/validate-npm-package-license": {
654
+ "version": "3.0.4",
655
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
656
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
657
+ "license": "Apache-2.0",
658
+ "dependencies": {
659
+ "spdx-correct": "^3.0.0",
660
+ "spdx-expression-parse": "^3.0.0"
661
+ }
662
+ },
663
+ "node_modules/webidl-conversions": {
664
+ "version": "3.0.1",
665
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
666
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
667
+ "license": "BSD-2-Clause"
668
+ },
669
+ "node_modules/whatwg-url": {
670
+ "version": "5.0.0",
671
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
672
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
673
+ "license": "MIT",
674
+ "dependencies": {
675
+ "tr46": "~0.0.3",
676
+ "webidl-conversions": "^3.0.0"
677
+ }
678
+ },
679
+ "node_modules/wtf_wikipedia": {
680
+ "version": "10.4.0",
681
+ "resolved": "https://registry.npmjs.org/wtf_wikipedia/-/wtf_wikipedia-10.4.0.tgz",
682
+ "integrity": "sha512-yRxTiBURj2LW5HWAe+T7bCV2x45C/qTqcknUTmInKmB9cmLSxR6Nh44rB9K+nfNiydtjc3HLHwYWxMuHZtpVSQ==",
683
+ "hasInstallScript": true,
684
+ "license": "MIT",
685
+ "dependencies": {
686
+ "isomorphic-unfetch": "^3.1.0",
687
+ "path-exists-cli": "2.0.0"
688
+ },
689
+ "bin": {
690
+ "wtf_wikipedia": "cli.js"
691
+ },
692
+ "engines": {
693
+ "node": ">=12.0.0"
694
+ }
695
+ },
696
+ "node_modules/yallist": {
697
+ "version": "4.0.0",
698
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
699
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
700
+ "license": "ISC"
701
+ },
702
+ "node_modules/yargs-parser": {
703
+ "version": "20.2.9",
704
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
705
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
706
+ "license": "ISC",
707
+ "engines": {
708
+ "node": ">=10"
709
+ }
710
+ },
711
+ "node_modules/yocto-queue": {
712
+ "version": "0.1.0",
713
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
714
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
715
+ "license": "MIT",
716
+ "engines": {
717
+ "node": ">=10"
718
+ },
719
+ "funding": {
720
+ "url": "https://github.com/sponsors/sindresorhus"
721
+ }
722
+ }
723
+ }
724
+ }
data/wikisource/parser/package.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "parser",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "type": "commonjs",
13
+ "dependencies": {
14
+ "wtf_wikipedia": "^10.4.0"
15
+ }
16
+ }
data/wikisource/parser/wtf_bridge.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // wtf_bridge.js
2
+ // Usage: node wtf_bridge.js
3
+ // Reads newline-delimited JSON from stdin: {"wikitext":"...","lang":"da"}
4
+ // Writes newline-delimited JSON to stdout: {"text":"...","isRedirect":false} or {"error":"..."}
5
+ const wtf = require('wtf_wikipedia');
6
+ const readline = require('readline');
7
+
8
+ const rl = readline.createInterface({
9
+ input: process.stdin,
10
+ output: process.stdout,
11
+ terminal: false
12
+ });
13
+
14
+ process.on('uncaughtException', (err) => {
15
+ // emit as JSON so Python can see it
16
+ try {
17
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
18
+ } catch (e) {}
19
+ process.exit(1);
20
+ });
21
+
22
+ rl.on('line', (line) => {
23
+ (async () => {
24
+ try {
25
+ const payload = JSON.parse(line);
26
+ const wikitext = payload.wikitext || '';
27
+ const lang = payload.lang || null;
28
+
29
+ // parse wikitext into a document (sync)
30
+ const doc = lang ? wtf(wikitext, lang) : wtf(wikitext);
31
+ const text = (doc && typeof doc.text === 'function') ? doc.text() : '';
32
+ const isRedirect = (doc && typeof doc.isRedirect === 'function') ? doc.isRedirect() : false;
33
+
34
+ process.stdout.write(JSON.stringify({ text, isRedirect }) + '\n');
35
+ } catch (err) {
36
+ process.stdout.write(JSON.stringify({ error: String(err && err.stack || err) }) + '\n');
37
+ }
38
+ })();
39
+ });
data/wikisource/wikisource.md CHANGED
@@ -28,9 +28,9 @@ The Danish subsection of [Wikisource](https://en.wikisource.org/wiki/Main_Page).
28
 
29
 
30
  <!-- START-DESC-STATS -->
31
- - **Number of samples**: 2.42K
32
- - **Number of tokens (Llama 3)**: 5.34M
33
- - **Average document length in tokens (min, max)**: 2.21K (5, 218.36K)
34
  <!-- END-DESC-STATS -->
35
 
36
 
@@ -42,12 +42,12 @@ An example from the dataset looks as follows.
42
  <!-- START-SAMPLE -->
43
  ```py
44
  {
45
- "id": "wikisource_4804",
46
- "text": "&lt;poem&gt;\nKæmpehøjen.\nJeg har stået mindets høje,\nfølt dets vemodsdybe lyst\nmed en tåre i mit [...]",
47
  "source": "wikisource",
48
- "added": "2021-03-28",
49
- "created": "1700-01-01, 2022-01-01",
50
- "token_count": 1025
51
  }
52
  ```
53
 
@@ -72,6 +72,20 @@ An entry in the dataset consists of the following fields:
72
  <!-- END-DATASET PLOTS -->
73
 
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  ## Additional Information
76
 
77
 
 
28
 
29
 
30
  <!-- START-DESC-STATS -->
31
+ - **Number of samples**: 3.00K
32
+ - **Number of tokens (Llama 3)**: 6.28M
33
+ - **Average document length in tokens (min, max)**: 2.09K (17, 261.10K)
34
  <!-- END-DESC-STATS -->
35
 
36
 
 
42
  <!-- START-SAMPLE -->
43
  ```py
44
  {
45
+ "id": "wikisource_1292",
46
+ "text": "Dejlig er den himmel blå\nDejlig er den himmel blå, lyst det er at se derpå, hvor de gyldne stjerner [...]",
47
  "source": "wikisource",
48
+ "added": "2025-08-18",
49
+ "created": "2022-04-18, 2022-04-18",
50
+ "token_count": 1243
51
  }
52
  ```
53
 
 
72
  <!-- END-DATASET PLOTS -->
73
 
74
 
75
+ ### Processing
76
+
77
+ For this dataset we have pulled the latest [database dump from wikimedia](https://dumps.wikimedia.org/dawikisource/latest/) and extracted the texts using the [wtf_wikipedia](https://github.com/spencermountain/wtf_wikipedia/tree/dev) parser.
78
+
79
+ Because the parser is written in javascript you need to have Node.js installed on you machine.
80
+
81
+ To run the `create.py` file you first need to do:
82
+
83
+ ```bash
84
+ $ cd parser/ && npm install && cd ..
85
+ ```
86
+
87
+ We chose to use `wtf_wikipedia` because out of the other parsers we tested this was the imperically best one. We tested `mwparserfromhell`, `mediawiki_dump`, `wikiextractor`, and `wtf_wikipedia`. It seemed that the others still produced some sort of artifacts from the parsing of wikicode.
88
+
89
  ## Additional Information
90
 
91
 
data/wikisource/wikisource.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:adc3206d75182f54ac5019e8cba8e87d07f0b84e64e47ecf6fe6a0003ca3d8bc
3
- size 9493193
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6a0405062f691a38eb39cd834281511abf1da0199b08ee9806a7b632e6a055c
3
+ size 10996692
descriptive_stats.json CHANGED
@@ -1,9 +1,9 @@
1
  {
2
- "number_of_samples": 5554217,
3
- "number_of_tokens": 5829657307,
4
  "min_length_tokens": 2,
5
  "max_length_tokens": 9812841,
6
- "number_of_characters": 17614232708,
7
  "min_length_characters": 1,
8
  "max_length_characters": 37287484
9
  }
 
1
  {
2
+ "number_of_samples": 5600476,
3
+ "number_of_tokens": 5883315984,
4
  "min_length_tokens": 2,
5
  "max_length_tokens": 9812841,
6
+ "number_of_characters": 17772456492,
7
  "min_length_characters": 1,
8
  "max_length_characters": 37287484
9
  }
images/domain_distribution.png CHANGED

Git LFS Details

  • SHA256: d10f804c5d81902a35c43cf4cda69d02c656235319a50e60f73a85a3fc002683
  • Pointer size: 131 Bytes
  • Size of remote file: 359 kB

Git LFS Details

  • SHA256: c7f16ed2c4ade5e6e41595c58d90946fa9f9dd7d6e6696c96061e7dd08bb3b84
  • Pointer size: 131 Bytes
  • Size of remote file: 373 kB
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="454f45ce-89ca-4d4a-aada-d2d82428926c" class="plotly-graph-div" style="height:400px; width:600px;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("454f45ce-89ca-4d4a-aada-d2d82428926c")) { Plotly.newPlot( "454f45ce-89ca-4d4a-aada-d2d82428926c", [{"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)","Date: 2025-07-08\u003cbr\u003eTokens: 4.70G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 951,889\u003cbr\u003eCommit: 0cdc88c0\u003cbr\u003eMessage: Add tokens over time (+ rename scrape_hovedstaten) (#73)","Date: 2025-07-11\u003cbr\u003eTokens: 4.78G\u003cbr\u003eChange: +86.35M\u003cbr\u003eSamples: 960,357\u003cbr\u003eCommit: dd36adfe\u003cbr\u003eMessage: Add domsdatabasen (#74)","Date: 2025-07-21\u003cbr\u003eTokens: 4.78G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 960,357\u003cbr\u003eCommit: 30071635\u003cbr\u003eMessage: restructuring-main-table (#75)","Date: 2025-07-22\u003cbr\u003eTokens: 4.80G\u003cbr\u003eChange: +10.53M\u003cbr\u003eSamples: 960,989\u003cbr\u003eCommit: 439e14c0\u003cbr\u003eMessage: Add Grundtvigs works (#79)","Date: 2025-08-06\u003cbr\u003eTokens: 5.83G\u003cbr\u003eChange: +1.03G\u003cbr\u003eSamples: 5,554,217\u003cbr\u003eCommit: 5f324fad\u003cbr\u003eMessage: Add Enev\u00e6ldens Nyheder Online (#83)","Date: 2025-08-07\u003cbr\u003eTokens: 5.83G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 5,554,217\u003cbr\u003eCommit: d9093e1a\u003cbr\u003eMessage: Update CI (#85)"],"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","2025-07-11T00:00:00.000000000","2025-07-21T00:00:00.000000000","2025-07-22T00:00:00.000000000","2025-08-06T00:00:00.000000000","2025-08-07T00:00:00.000000000"],"y":[1567706760,1839599769,1839599769,1844994816,1852293828,1852293828,3363395483,3363395483,3363395483,3363395483,4264549097,4264549097,4264549097,4369008328,4369589385,4396075044,4698470546,4698470546,4784823570,4784823570,4795348963,5829657307,5829657307],"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="6b0f2f0c-7165-45e0-9db0-13ac1f2871c8" class="plotly-graph-div" style="height:400px; width:600px;"></div> <script type="text/javascript"> window.PLOTLYENV=window.PLOTLYENV || {}; if (document.getElementById("6b0f2f0c-7165-45e0-9db0-13ac1f2871c8")) { Plotly.newPlot( "6b0f2f0c-7165-45e0-9db0-13ac1f2871c8", [{"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)","Date: 2025-07-08\u003cbr\u003eTokens: 4.70G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 951,889\u003cbr\u003eCommit: 0cdc88c0\u003cbr\u003eMessage: Add tokens over time (+ rename scrape_hovedstaten) (#73)","Date: 2025-07-11\u003cbr\u003eTokens: 4.78G\u003cbr\u003eChange: +86.35M\u003cbr\u003eSamples: 960,357\u003cbr\u003eCommit: dd36adfe\u003cbr\u003eMessage: Add domsdatabasen (#74)","Date: 2025-07-21\u003cbr\u003eTokens: 4.78G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 960,357\u003cbr\u003eCommit: 30071635\u003cbr\u003eMessage: restructuring-main-table (#75)","Date: 2025-07-22\u003cbr\u003eTokens: 4.80G\u003cbr\u003eChange: +10.53M\u003cbr\u003eSamples: 960,989\u003cbr\u003eCommit: 439e14c0\u003cbr\u003eMessage: Add Grundtvigs works (#79)","Date: 2025-08-06\u003cbr\u003eTokens: 5.83G\u003cbr\u003eChange: +1.03G\u003cbr\u003eSamples: 5,554,217\u003cbr\u003eCommit: 5f324fad\u003cbr\u003eMessage: Add Enev\u00e6ldens Nyheder Online (#83)","Date: 2025-08-07\u003cbr\u003eTokens: 5.83G\u003cbr\u003eChange: +0\u003cbr\u003eSamples: 5,554,217\u003cbr\u003eCommit: d9093e1a\u003cbr\u003eMessage: Update CI (#85)","Date: 2025-08-18\u003cbr\u003eTokens: 5.88G\u003cbr\u003eChange: +53.66M\u003cbr\u003eSamples: 5,600,476\u003cbr\u003eCommit: 455c42b5\u003cbr\u003eMessage: Updated wiki, wikibooks, wikisource."],"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","2025-07-11T00:00:00.000000000","2025-07-21T00:00:00.000000000","2025-07-22T00:00:00.000000000","2025-08-06T00:00:00.000000000","2025-08-07T00:00:00.000000000","2025-08-18T00:00:00.000000000"],"y":[1567706760,1839599769,1839599769,1844994816,1852293828,1852293828,3363395483,3363395483,3363395483,3363395483,4264549097,4264549097,4264549097,4369008328,4369589385,4396075044,4698470546,4698470546,4784823570,4784823570,4795348963,5829657307,5829657307,5883315984],"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.8"
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.10"
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
src/dynaword/descriptive_stats.py CHANGED
@@ -41,7 +41,7 @@ class DescriptiveStatsOverview:
41
  @property
42
  def average_document_length_tokens(self) -> float:
43
  return (
44
- self.number_of_tokens / self.number_of_samples
45
  if self.number_of_samples > 0
46
  else 0.0
47
  )
@@ -49,7 +49,7 @@ class DescriptiveStatsOverview:
49
  @property
50
  def average_document_length_characters(self) -> float:
51
  return (
52
- self.number_of_characters / self.number_of_samples
53
  if self.number_of_samples > 0
54
  else 0.0
55
  )
 
41
  @property
42
  def average_document_length_tokens(self) -> float:
43
  return (
44
+ round(self.number_of_tokens / self.number_of_samples, 2)
45
  if self.number_of_samples > 0
46
  else 0.0
47
  )
 
49
  @property
50
  def average_document_length_characters(self) -> float:
51
  return (
52
+ round(self.number_of_characters / self.number_of_samples, 2)
53
  if self.number_of_samples > 0
54
  else 0.0
55
  )
src/dynaword/process_dataset.py CHANGED
@@ -17,14 +17,13 @@ logger = logging.getLogger(__name__)
17
  def _tokenize_function(
18
  examples: dict[str, Any], tokenizer: AutoTokenizer
19
  ) -> dict[str, Any]:
20
- token_count = [
21
- len(tokens)
22
- for tokens in tokenizer(examples[ColumnNames.text.value], padding=False)[ # type: ignore
23
- "input_ids"
24
- ]
25
- ]
26
- examples[ColumnNames.token_count.value] = token_count
27
- return examples
28
 
29
 
30
  def add_token_count(
 
17
  def _tokenize_function(
18
  examples: dict[str, Any], tokenizer: AutoTokenizer
19
  ) -> dict[str, Any]:
20
+ encodings = tokenizer(
21
+ examples["text"],
22
+ padding=False,
23
+ truncation=False,
24
+ return_length=True, # much faster, avoids storing all IDs
25
+ ) # type: ignore
26
+ return {"token_count": encodings["length"]}
 
27
 
28
 
29
  def add_token_count(
test_results.log CHANGED
@@ -1,6 +1,6 @@
1
  ============================= test session starts ==============================
2
  platform darwin -- Python 3.12.0, pytest-8.3.4, pluggy-1.5.0
3
- rootdir: /Users/au561649/Github/danish-dynaword
4
  configfile: pyproject.toml
5
  plugins: anyio-4.9.0
6
  collected 346 items
@@ -20,7 +20,7 @@ src/tests/test_unique_ids.py . [100%]
20
 
21
  =============================== warnings summary ===============================
22
  src/tests/test_quality/test_short_texts.py: 38 warnings
23
- /Users/au561649/Github/danish-dynaword/.venv/lib/python3.12/site-packages/datasets/utils/_dill.py:385: DeprecationWarning: co_lnotab is deprecated, use co_lines instead.
24
 
25
  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
26
- ============ 345 passed, 1 skipped, 38 warnings in 65.92s (0:01:05) ============
 
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 346 items
 
20
 
21
  =============================== warnings summary ===============================
22
  src/tests/test_quality/test_short_texts.py: 38 warnings
23
+ /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.
24
 
25
  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
26
+ ============ 345 passed, 1 skipped, 38 warnings in 89.12s (0:01:29) ============
uv.lock CHANGED
The diff for this file is too large to render. See raw diff