pere commited on
Commit
aaeee64
·
verified ·
1 Parent(s): a786e95

Publish AltMorph-coded NPSC Ortho dataset

Browse files
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - nb
4
+ license: cc-by-sa-3.0
5
+ task_categories:
6
+ - text2text-generation
7
+ pretty_name: NPSC Ortho Morphcoded
8
+ tags:
9
+ - norwegian
10
+ - morphology
11
+ - text2text-generation
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: data/train-*
17
+ - split: validation
18
+ path: data/validation-*
19
+ - split: test
20
+ path: data/test-*
21
+ ---
22
+
23
+ # NPSC Ortho Morphcoded
24
+
25
+ This dataset pairs Norwegian Bokmål sentences from [NbAiLab/NPSC_orto](https://huggingface.co/datasets/NbAiLab/NPSC_orto) with output from [AltMorph](https://github.com/NationalLibraryOfNorway/altmorph). AltMorph marks allowed morphological or spelling alternatives in square brackets, separated by a vertical bar. Rows without an applicable alternative are retained with identical source and target text.
26
+
27
+ ## Fields
28
+
29
+ | Field | Meaning |
30
+ | --- | --- |
31
+ | id | Original NPSC sentence ID. Only an overlong source row would receive a deterministic part suffix. |
32
+ | source | Whitespace-normalized NPSC Bokmål transcript sentence. |
33
+ | target | The same sentence encoded by AltMorph. |
34
+
35
+ Example target syntax: [brua|bruen|broa|broen].
36
+
37
+ ## Splits
38
+
39
+ All source rows were pooled before the published split assignment. With random seed 42, 1,000 distinct rows were drawn for validation and another 1,000 distinct rows for test. All remaining rows form train. IDs are disjoint across splits.
40
+
41
+ | Split | Rows | Rows changed by AltMorph |
42
+ | --- | ---: | ---: |
43
+ | train | 62,541 | 35,886 |
44
+ | validation | 1,000 | 581 |
45
+ | test | 1,000 | 563 |
46
+
47
+ ## Length handling
48
+
49
+ The build uses 200 whitespace-separated words as a practical proxy for a roughly 256-token standard LLM context. An upstream row is preserved as-is when it is within that limit. Only an overlong row is first split on clear sentence-ending punctuation; an individual segment still above the limit is split into fixed word chunks. No row in the pinned source revision exceeded the limit, so every published ID is the original NPSC sentence_id converted to a string.
50
+
51
+ The maximum source length in this build is 175 words.
52
+
53
+ ## Generation
54
+
55
+ - Generated: 2026-08-27T20:47:41.175564+00:00
56
+ - NPSC source revision: b6537bebda02239b125a8a415ef75f633f9a8aed
57
+ - AltMorph revision: 41d3adb911d61bb169fd9ccbffd31854d72fd555
58
+ - Language: Bokmål (nob)
59
+ - Tagger: Humit-Oslo/humit-tagger-large at revision 942f2901ec3271c9f627eb6a78b07ade87cf8126
60
+ - Context scorer: north/t5_base_NCC (north-t5)
61
+ - Lexical and inflection data: Ordbank API
62
+ - Total alternative groups: 70,365
63
+ - Total unchanged rows: 27,511
64
+
65
+ The source metadata was streamed from the pinned Hub revision; no audio was downloaded. Whitespace was normalized before processing. HumIT supplies morphology and part-of-speech analysis. AltMorph queries Ordbank for allowed forms. If an inflection-expanded Ordbank lookup returns a 5xx server response after all API retries, the build tries the authoritative exact-lemma endpoint; network timeouts and non-5xx statuses keep retrying the full lookup. A narrower result is not cached as a complete inflection search.
66
+
67
+ North-T5 is applied only to candidates where context can change the reading; authoritative linked spelling variants bypass contextual scoring. The Ordbank cache is persistent, and restartable workers write a completed prefix after every batch.
68
+
69
+ The reproducible build scripts are kept outside the generated dataset directory in dataset_tools/npsc_orto_morphcoded in the AltMorph repository. The local generated workspace is ignored by Git.
70
+
71
+ ## Intended use and limitations
72
+
73
+ The dataset is intended for training or evaluating systems that recognize or generate allowed Norwegian morphological and spelling alternatives. It is silver data: targets are automatically generated and have not been manually verified. They can contain false positives, omit valid alternatives, or include an inflection that is not valid in the sentence context. They should not be treated as claims that every alternative is equally usual in every context. The data preserves all rows, including source-equals-target examples.
74
+
75
+ ## Licensing and attribution
76
+
77
+ The upstream NPSC card describes the parliamentary transcriptions as CC0 and its Hugging Face curation as CC BY-SA 3.0. This derived dataset uses CC BY-SA 3.0 conservatively. Please also follow the citation guidance in the [NPSC dataset card](https://huggingface.co/datasets/NbAiLab/NPSC_orto) and credit:
78
+
79
+ - the National Library of Norway / NPSC dataset maintainers;
80
+ - the University of Oslo HumIT team and Humit-Oslo/humit-tagger-large;
81
+ - the University of Bergen Ordbank service;
82
+ - the North-T5 authors and north/t5_base_NCC;
83
+ - the AltMorph authors.
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3784245c10b336a223ca8298bd896554f30248d1ca0c8e65ed44f78ff854b8f3
3
+ size 109754
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd7731e7b4e9f8f6bfdaa5bc24c63c3177b70c08ee06e25addada9862bdaf673
3
+ size 5596758
data/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9f0f54530514108d81f47a46e166019d4068018072d86eb700dbc9c5c39c42d7
3
+ size 110293