ppuzio PiotrSty commited on
Commit
b263479
·
1 Parent(s): 34e7ea3

Add CC0 Polish Common Voice validated text (v26.0) (#22)

Browse files

- Add CC0 Polish Common Voice validated text (v26.0) (ab6734acf7ae604d3f415e836dccd0e678d5ed62)
- Address review: unit note, origin license + terms covenant, PII scan (f5c8e754b2a7e294621fda51c034878a22fa2880)


Co-authored-by: Piotr Styla <PiotrSty@users.noreply.huggingface.co>

artifacts/common_voice_pl_language_audit.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "protocol": "langid.py constrained to pl,en,de,cs,sk,uk,ru,fr",
3
+ "interpretation_limit": "Short and archaic Polish sentences can be misclassified; this audit is evidence, not an automatic exclusion rule.",
4
+ "population_rows": 45043,
5
+ "sample_method": "lowest sha256(language-audit:<id>)",
6
+ "sample_rows": 5000,
7
+ "language_counts": {
8
+ "de": 2,
9
+ "en": 13,
10
+ "pl": 4985
11
+ },
12
+ "polish_share": 0.997,
13
+ "high_confidence_non_polish_examples": [
14
+ {
15
+ "id": "common_voice_pl_1da2469d4482c5a8b7451bcefcd11524c01c1a75af6b7524fae159e38c107afc",
16
+ "language": "en",
17
+ "confidence": 0.9869612260680103,
18
+ "text": "Co Jurand na to powie?"
19
+ },
20
+ {
21
+ "id": "common_voice_pl_c7075bcb641111707f91fd1320141b7f38eab6f81c84d53e231b96b7ce91b1dd",
22
+ "language": "en",
23
+ "confidence": 0.9594204784447719,
24
+ "text": "Diana Wallis"
25
+ },
26
+ {
27
+ "id": "common_voice_pl_bf1385eddd5da209a9d2f7318c405ba6e34418af4da756fb27415d83e9194311",
28
+ "language": "en",
29
+ "confidence": 0.998238339390609,
30
+ "text": "- Buruburu, ten stary portier."
31
+ },
32
+ {
33
+ "id": "common_voice_pl_d2504e622883977b5ca1d43e384908038931314af890df209dd0854826c5abba",
34
+ "language": "de",
35
+ "confidence": 0.9997776236889044,
36
+ "text": "Nie denerwuj mnie."
37
+ }
38
+ ],
39
+ "character_length": {
40
+ "min": 12,
41
+ "p10": 25.0,
42
+ "p50": 56.0,
43
+ "p90": 95.0,
44
+ "p99": 119.0,
45
+ "max": 153,
46
+ "mean": 58.54627800102125
47
+ },
48
+ "token_count": {
49
+ "min": 3,
50
+ "p10": 10.0,
51
+ "p50": 21.0,
52
+ "p90": 35.0,
53
+ "p99": 44.0,
54
+ "max": 59,
55
+ "mean": 22.088271207512822
56
+ }
57
+ }
artifacts/common_voice_pl_ontology_manifest.json ADDED
@@ -0,0 +1,463 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "actors": [
3
+ {
4
+ "id": "hf:PiotrSty",
5
+ "identifiers": {
6
+ "github": "PiotrStyla",
7
+ "hugging_face": "PiotrSty"
8
+ },
9
+ "identity": "Piotr Styła",
10
+ "kind": "human"
11
+ },
12
+ {
13
+ "id": "org:mozilla-data-collective",
14
+ "identifiers": {
15
+ "dataset_id": "cmqinmu2a00winq07gyrtri0q"
16
+ },
17
+ "identity": "Mozilla Data Collective",
18
+ "kind": "organization"
19
+ },
20
+ {
21
+ "id": "agent:codex",
22
+ "identifiers": {},
23
+ "identity": "OpenAI Codex",
24
+ "kind": "agent"
25
+ }
26
+ ],
27
+ "attestations": [
28
+ {
29
+ "actor_id": "hf:PiotrSty",
30
+ "created_at": "2026-09-05T12:00:00Z",
31
+ "id": "slayer://attestation/common_voice_pl/schema_valid@sha256:3d798daf66ef446b3acf626dce26ad3434f789e105b5a83e2942cad4a6b4f1f3",
32
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
33
+ "supported_by": [
34
+ "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844",
35
+ "slayer://evidence/common_voice_pl/artifact_checksums@sha256:a750f1356bf04f1c45047d5fabe7331b5bc8c7060f8ac2e3a69d7945e26648b2"
36
+ ],
37
+ "type": "schema_valid",
38
+ "value": true
39
+ },
40
+ {
41
+ "actor_id": "hf:PiotrSty",
42
+ "created_at": "2026-09-05T12:00:00Z",
43
+ "id": "slayer://attestation/common_voice_pl/license_status@sha256:0577a1236ade031e6b1f80d49d80cc4254222307c40366b6eda43fe05473f0f7",
44
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
45
+ "supported_by": [
46
+ "slayer://evidence/common_voice_pl/license_metadata@sha256:9d2ca832386649731f552f1721ff8c0e9811cea6a45f1eac5fa65d455ea49cf8"
47
+ ],
48
+ "type": "license_status",
49
+ "value": "documented_cc0_1_0"
50
+ },
51
+ {
52
+ "actor_id": "hf:PiotrSty",
53
+ "created_at": "2026-09-05T12:00:00Z",
54
+ "id": "slayer://attestation/common_voice_pl/cross_source_deduplication@sha256:f06e8ea90508754266d0aabae688e6a418cd897c489491bd6cae286163e44e85",
55
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
56
+ "supported_by": [
57
+ "slayer://evidence/common_voice_pl/target_registry_check@sha256:8897861e9a850e239f08e098759adb1f5a8c36bc6e9bc15782e86b6509321578"
58
+ ],
59
+ "type": "cross_source_deduplication",
60
+ "value": "pending_target_integration"
61
+ }
62
+ ],
63
+ "claim_evidence": [
64
+ {
65
+ "claim_id": "slayer://claim/common_voice_pl@sha256:ad1af527fc2ff42895293153486ae7f25efd75d7e75fcd8a9d7f6fefd4954beb",
66
+ "evidence_id": "slayer://evidence/common_voice_pl/dataset_record_counts@sha256:05d20035652774e58d383e259ffc155afa6d7fc9934d283955ca34d5f10d13d8",
67
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
68
+ "relation": "SUPPORTS"
69
+ },
70
+ {
71
+ "claim_id": "slayer://claim/common_voice_pl@sha256:ad1af527fc2ff42895293153486ae7f25efd75d7e75fcd8a9d7f6fefd4954beb",
72
+ "evidence_id": "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844",
73
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
74
+ "relation": "SUPPORTS"
75
+ },
76
+ {
77
+ "claim_id": "slayer://claim/common_voice_pl@sha256:df7da8964a490434eeeccc6994fabaaea2340047d82d8d50e60558fa7bf26c9f",
78
+ "evidence_id": "slayer://evidence/common_voice_pl/license_metadata@sha256:9d2ca832386649731f552f1721ff8c0e9811cea6a45f1eac5fa65d455ea49cf8",
79
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
80
+ "relation": "SUPPORTS"
81
+ },
82
+ {
83
+ "claim_id": "slayer://claim/common_voice_pl@sha256:f9b072f22fb89c277b6ccecc170669b442f60b756338052344fac6801ee1a5b0",
84
+ "evidence_id": "slayer://evidence/common_voice_pl/direct_metadata_exclusion@sha256:428ce405d4434ba0388ce312d26ec6b3d2a8a94fbc2237c50d71e68247f1e932",
85
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
86
+ "relation": "SUPPORTS"
87
+ },
88
+ {
89
+ "claim_id": "slayer://claim/common_voice_pl@sha256:f9b072f22fb89c277b6ccecc170669b442f60b756338052344fac6801ee1a5b0",
90
+ "evidence_id": "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844",
91
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
92
+ "relation": "SUPPORTS"
93
+ },
94
+ {
95
+ "claim_id": "slayer://claim/common_voice_pl@sha256:2149a11a99e9585180e9c5776fe8589dc54e535511fb31a2687c18cec69c51a7",
96
+ "evidence_id": "slayer://evidence/common_voice_pl/target_registry_check@sha256:8897861e9a850e239f08e098759adb1f5a8c36bc6e9bc15782e86b6509321578",
97
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
98
+ "relation": "SUPPORTS"
99
+ }
100
+ ],
101
+ "claims": [
102
+ {
103
+ "asserted_by": "hf:PiotrSty",
104
+ "falsification_condition": "A retained normalized key occurs more than once or an accepted key is absent without a recorded rejection.",
105
+ "id": "slayer://claim/common_voice_pl@sha256:ad1af527fc2ff42895293153486ae7f25efd75d7e75fcd8a9d7f6fefd4954beb",
106
+ "scope": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
107
+ "statement": "The artifact contains one retained row per within-source normalized sentence after the recorded filters.",
108
+ "supported_by": [
109
+ "slayer://evidence/common_voice_pl/dataset_record_counts@sha256:05d20035652774e58d383e259ffc155afa6d7fc9934d283955ca34d5f10d13d8",
110
+ "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844"
111
+ ]
112
+ },
113
+ {
114
+ "asserted_by": "hf:PiotrSty",
115
+ "falsification_condition": "The pinned records or official dataset terms identify a conflicting license.",
116
+ "id": "slayer://claim/common_voice_pl@sha256:df7da8964a490434eeeccc6994fabaaea2340047d82d8d50e60558fa7bf26c9f",
117
+ "scope": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
118
+ "statement": "The pinned source records and official dataset page identify the selected material as CC0-1.0.",
119
+ "supported_by": [
120
+ "slayer://evidence/common_voice_pl/license_metadata@sha256:9d2ca832386649731f552f1721ff8c0e9811cea6a45f1eac5fa65d455ea49cf8"
121
+ ]
122
+ },
123
+ {
124
+ "asserted_by": "hf:PiotrSty",
125
+ "falsification_condition": "A forbidden direct-source metadata field is present in the Parquet or attribution sidecar.",
126
+ "id": "slayer://claim/common_voice_pl@sha256:f9b072f22fb89c277b6ccecc170669b442f60b756338052344fac6801ee1a5b0",
127
+ "scope": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
128
+ "statement": "No source client identifier, demographic field, path or audio payload is included in the published projection.",
129
+ "supported_by": [
130
+ "slayer://evidence/common_voice_pl/direct_metadata_exclusion@sha256:428ce405d4434ba0388ce312d26ec6b3d2a8a94fbc2237c50d71e68247f1e932",
131
+ "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844"
132
+ ]
133
+ },
134
+ {
135
+ "asserted_by": "hf:PiotrSty",
136
+ "falsification_condition": "The source key exists in the pinned pre-contribution registry or this contribution asserts completed cross-source deduplication.",
137
+ "id": "slayer://claim/common_voice_pl@sha256:2149a11a99e9585180e9c5776fe8589dc54e535511fb31a2687c18cec69c51a7",
138
+ "scope": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
139
+ "statement": "The source key was absent from the pinned DynaWord registry before this contribution; corpus-wide novelty is not asserted.",
140
+ "supported_by": [
141
+ "slayer://evidence/common_voice_pl/target_registry_check@sha256:8897861e9a850e239f08e098759adb1f5a8c36bc6e9bc15782e86b6509321578"
142
+ ]
143
+ }
144
+ ],
145
+ "evidence": [
146
+ {
147
+ "id": "slayer://evidence/common_voice_pl/dataset_record_counts@sha256:05d20035652774e58d383e259ffc155afa6d7fc9934d283955ca34d5f10d13d8",
148
+ "observation_type": "dataset_record_counts",
149
+ "observed_at": "2026-09-05T12:00:00Z",
150
+ "payload": {
151
+ "accepted_source_sentence_ids": 45136,
152
+ "added": "2026-09-05",
153
+ "authors_with_value": 45043,
154
+ "by_sentence_domain": {
155
+ "agriculture_food": 2,
156
+ "finance": 3,
157
+ "finance,technology_robotics": 1,
158
+ "general": 2,
159
+ "unspecified": 45035
160
+ },
161
+ "chars": 2637100,
162
+ "collapsed_accepted_rows": 91198,
163
+ "created_max": "2026-06-12",
164
+ "created_min": "2026-06-12",
165
+ "cross_source_exact_dedup_completed": false,
166
+ "cross_source_near_dedup_completed": false,
167
+ "drop_by_reason_source_rows": {
168
+ "too_long": 19,
169
+ "too_short": 2538
170
+ },
171
+ "kept": 45043,
172
+ "license": "CC0-1.0",
173
+ "licenses": {
174
+ "CC0-1.0": 45043
175
+ },
176
+ "normalized_unique_sentences": 45043,
177
+ "rejected_source_rows": 2557,
178
+ "source": "common_voice_pl",
179
+ "source_parquet_path": "data/validated/common_voice_scripted_speech_26_0__pl__cmqinmu2a00winq07gyrtri0q.parquet",
180
+ "source_parquet_sha256": "abd846a0411d04cf88920161100625e9cbe64a111d17474ac49375f490dafb3a",
181
+ "source_parquet_size": 4481707510,
182
+ "source_repository": "Peacockery/common-voice-scripted-speech-26",
183
+ "source_revision": "b4d8b94d43831475de59a455345acf6945cfd66e",
184
+ "source_rows": 138798,
185
+ "stats_recomputed_from_output_rows": true,
186
+ "target_base_revision": "a916edecabc2be8832e08fb2bd9dfafcc1d2dd71",
187
+ "tokens": 994922,
188
+ "upstream_dataset_id": "cmqinmu2a00winq07gyrtri0q",
189
+ "upstream_version": "26.0",
190
+ "whitespace_words": 379819
191
+ },
192
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
193
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
194
+ },
195
+ {
196
+ "id": "slayer://evidence/common_voice_pl/artifact_checksums@sha256:a750f1356bf04f1c45047d5fabe7331b5bc8c7060f8ac2e3a69d7945e26648b2",
197
+ "observation_type": "artifact_checksums",
198
+ "observed_at": "2026-09-05T12:00:00Z",
199
+ "payload": {
200
+ "attribution_sha256": "9988cdaaf406193ec07d5936ee875f640212fc78599e615b497a3fbf3a66867d",
201
+ "language_audit_sha256": "3f4a645fc79a7a9f8bec3affee76745ebe5cd58bc8c17f8c971a2f9aed805926",
202
+ "license_evidence_sha256": "5053b342b18733a8d5871299e947bbb88206acf8d31b97784352b9b67977fcde",
203
+ "parquet_sha256": "2c22fb1be8badb75f55c0f1f6719360ab50dc798054a7673d67b2780c41858b2",
204
+ "sample_sha256": "73a1a35319744c9c125c51599520a01b467c304a4c6f313d2bb6a7ca696fe474",
205
+ "stats_sha256": "a98e21f6ecc4d71afda11e184afad67db13b141d0e2ec65f1d484ae17a301b5a"
206
+ },
207
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
208
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
209
+ },
210
+ {
211
+ "id": "slayer://evidence/common_voice_pl/license_metadata@sha256:9d2ca832386649731f552f1721ff8c0e9811cea6a45f1eac5fa65d455ea49cf8",
212
+ "observation_type": "license_metadata",
213
+ "observed_at": "2026-09-05T12:00:00Z",
214
+ "payload": {
215
+ "artifact": "data/common_voice_pl/common_voice_pl.license-evidence.json",
216
+ "license": "CC0-1.0",
217
+ "mirror_revision": "b4d8b94d43831475de59a455345acf6945cfd66e",
218
+ "official_dataset": "https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q",
219
+ "source_parquet_sha256": "abd846a0411d04cf88920161100625e9cbe64a111d17474ac49375f490dafb3a",
220
+ "source_parquet_size": 4481707510
221
+ },
222
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
223
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
224
+ },
225
+ {
226
+ "id": "slayer://evidence/common_voice_pl/direct_metadata_exclusion@sha256:428ce405d4434ba0388ce312d26ec6b3d2a8a94fbc2237c50d71e68247f1e932",
227
+ "observation_type": "direct_metadata_exclusion",
228
+ "observed_at": "2026-09-05T12:00:00Z",
229
+ "payload": {
230
+ "excluded_columns": [
231
+ "audio",
232
+ "client_id",
233
+ "age",
234
+ "gender",
235
+ "accents",
236
+ "variant",
237
+ "path"
238
+ ],
239
+ "selected_direct_identifiers": 0,
240
+ "text_filter_drop_counts": {
241
+ "too_long": 19,
242
+ "too_short": 2538
243
+ }
244
+ },
245
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
246
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
247
+ },
248
+ {
249
+ "id": "slayer://evidence/common_voice_pl/target_registry_check@sha256:8897861e9a850e239f08e098759adb1f5a8c36bc6e9bc15782e86b6509321578",
250
+ "observation_type": "target_registry_check",
251
+ "observed_at": "2026-09-05T12:00:00Z",
252
+ "payload": {
253
+ "cross_source_exact_dedup_completed": false,
254
+ "cross_source_near_dedup_completed": false,
255
+ "source_key_absent_before_contribution": true,
256
+ "target": "hf://datasets/SlayerLab/polish-dynaword@a916edecabc2be8832e08fb2bd9dfafcc1d2dd71"
257
+ },
258
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
259
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
260
+ },
261
+ {
262
+ "id": "slayer://evidence/common_voice_pl/schema_validation@sha256:d931b5710b6b58dc8dc8a0f46e9b3cf8b7652d2d6a339c1d9c2e28cf02eaf844",
263
+ "observation_type": "schema_validation",
264
+ "observed_at": "2026-09-05T12:00:00Z",
265
+ "payload": {
266
+ "records": 45043,
267
+ "schema": [
268
+ "id",
269
+ "text",
270
+ "source",
271
+ "added",
272
+ "created",
273
+ "token_count",
274
+ "license",
275
+ "author"
276
+ ],
277
+ "valid": true
278
+ },
279
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
280
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
281
+ },
282
+ {
283
+ "id": "slayer://evidence/common_voice_pl/language_audit@sha256:f1184203a8049961d2c5a57c13564f7cb5ac3a32c84e1c1f7b3681e51c6837c9",
284
+ "observation_type": "language_audit",
285
+ "observed_at": "2026-09-05T12:00:00Z",
286
+ "payload": {
287
+ "artifact": "artifacts/common_voice_pl_language_audit.json",
288
+ "interpretation_limit": "Short and archaic Polish sentences can be misclassified; this audit is evidence, not an automatic exclusion rule.",
289
+ "polish_share": 0.997,
290
+ "sample_rows": 5000,
291
+ "sha256": "3f4a645fc79a7a9f8bec3affee76745ebe5cd58bc8c17f8c971a2f9aed805926"
292
+ },
293
+ "run_id": "common-voice-pl-v26-20260905T120000Z",
294
+ "subject_version": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
295
+ }
296
+ ],
297
+ "object": {
298
+ "id": "slayer://object/dataset-source/common_voice_pl",
299
+ "kind": "dataset_source",
300
+ "metadata": {
301
+ "domain": "spoken/scripted",
302
+ "language": "pl",
303
+ "provider": "Mozilla Data Collective"
304
+ },
305
+ "name": "common_voice_pl"
306
+ },
307
+ "ontology_version": "slayer.ai/research-ontology/v0.1",
308
+ "protocol": {
309
+ "id": "slayer://object/protocol/common_voice_pl-text-projection",
310
+ "kind": "dataset_filtering",
311
+ "name": "common_voice_pl-text-projection",
312
+ "specification": {
313
+ "deduplication": "casefolded punctuation-insensitive exact key within source",
314
+ "entrypoint": "python src/fetch_common_voice_pl.py",
315
+ "normalization": "Unicode NFKC and whitespace collapse",
316
+ "quality_filters": [
317
+ "length",
318
+ "control characters",
319
+ "HTML",
320
+ "URL",
321
+ "email",
322
+ "phone-like",
323
+ "PESEL-like",
324
+ "letter ratio"
325
+ ],
326
+ "selection": {
327
+ "columns_excluded": [
328
+ "audio",
329
+ "client_id",
330
+ "age",
331
+ "gender",
332
+ "accents",
333
+ "variant",
334
+ "path"
335
+ ],
336
+ "language": "Polish",
337
+ "locale": "pl",
338
+ "split": "validated"
339
+ },
340
+ "source_path": "src/fetch_common_voice_pl.py",
341
+ "tokenizer": "cl100k_base"
342
+ },
343
+ "version": {
344
+ "code_sha256": "f448649c52e947e5cdbf0ca0bc7e9502dc1427405d78c944c08d2fa2810fc842",
345
+ "created_at": "2026-09-05T12:00:00Z",
346
+ "created_by": "hf:PiotrSty",
347
+ "digest": "sha256:8d74ca15c0a1584b8ba094ae8926fbeddfbd0490fb1b096a25d21acda1912d05",
348
+ "id": "slayer://version/protocol/common_voice_pl-text-projection@sha256:8d74ca15c0a1584b8ba094ae8926fbeddfbd0490fb1b096a25d21acda1912d05",
349
+ "object_id": "slayer://object/protocol/common_voice_pl-text-projection",
350
+ "payload_uri": "hf://datasets/PiotrSty/common-voice-pl-text@2e3e62d374df8cad50e443a356e2c2bec86e10b4/src/fetch_common_voice_pl.py",
351
+ "schema_version": "slayer.ai/protocol/v1"
352
+ }
353
+ },
354
+ "relations": [
355
+ {
356
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
357
+ "predicate": "DERIVED_FROM",
358
+ "source_version_id": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
359
+ "target_version_id": "hf://datasets/Peacockery/common-voice-scripted-speech-26@b4d8b94d43831475de59a455345acf6945cfd66e"
360
+ },
361
+ {
362
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
363
+ "predicate": "MIRRORS",
364
+ "source_version_id": "hf://datasets/Peacockery/common-voice-scripted-speech-26@b4d8b94d43831475de59a455345acf6945cfd66e",
365
+ "target_version_id": "mdc://dataset/cmqinmu2a00winq07gyrtri0q@26.0"
366
+ },
367
+ {
368
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
369
+ "predicate": "FILTERED_BY",
370
+ "source_version_id": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
371
+ "target_version_id": "slayer://version/protocol/common_voice_pl-text-projection@sha256:8d74ca15c0a1584b8ba094ae8926fbeddfbd0490fb1b096a25d21acda1912d05"
372
+ },
373
+ {
374
+ "introduced_by_run": "common-voice-pl-v26-20260905T120000Z",
375
+ "predicate": "COMPATIBLE_WITH",
376
+ "source_version_id": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
377
+ "target_version_id": "hf://datasets/SlayerLab/polish-dynaword@a916edecabc2be8832e08fb2bd9dfafcc1d2dd71"
378
+ }
379
+ ],
380
+ "run": {
381
+ "actor_id": "hf:PiotrSty",
382
+ "config": {
383
+ "deduplication": "casefolded punctuation-insensitive exact key within source",
384
+ "entrypoint": "python src/fetch_common_voice_pl.py",
385
+ "normalization": "Unicode NFKC and whitespace collapse",
386
+ "quality_filters": [
387
+ "length",
388
+ "control characters",
389
+ "HTML",
390
+ "URL",
391
+ "email",
392
+ "phone-like",
393
+ "PESEL-like",
394
+ "letter ratio"
395
+ ],
396
+ "selection": {
397
+ "columns_excluded": [
398
+ "audio",
399
+ "client_id",
400
+ "age",
401
+ "gender",
402
+ "accents",
403
+ "variant",
404
+ "path"
405
+ ],
406
+ "language": "Polish",
407
+ "locale": "pl",
408
+ "split": "validated"
409
+ },
410
+ "source_path": "src/fetch_common_voice_pl.py",
411
+ "tokenizer": "cl100k_base"
412
+ },
413
+ "environment": {
414
+ "determinism": {
415
+ "sampling": "hash-ranked sample only",
416
+ "seed": "sha256(sample:id)"
417
+ },
418
+ "machine": "AMD64",
419
+ "packages": {
420
+ "duckdb": "1.5.5",
421
+ "pyarrow": "25.0.1",
422
+ "tiktoken": "0.14.0"
423
+ },
424
+ "platform": "Windows-10-10.0.26200-SP0",
425
+ "python": "3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]"
426
+ },
427
+ "finished_at": "2026-09-05T12:00:00Z",
428
+ "git_commit": "2e3e62d374df8cad50e443a356e2c2bec86e10b4",
429
+ "id": "common-voice-pl-v26-20260905T120000Z",
430
+ "inputs": [
431
+ {
432
+ "role": "official_upstream",
433
+ "version_id": "mdc://dataset/cmqinmu2a00winq07gyrtri0q@26.0"
434
+ },
435
+ {
436
+ "role": "access_mirror",
437
+ "version_id": "hf://datasets/Peacockery/common-voice-scripted-speech-26@b4d8b94d43831475de59a455345acf6945cfd66e"
438
+ },
439
+ {
440
+ "role": "target_base",
441
+ "version_id": "hf://datasets/SlayerLab/polish-dynaword@a916edecabc2be8832e08fb2bd9dfafcc1d2dd71"
442
+ }
443
+ ],
444
+ "outputs": [
445
+ {
446
+ "role": "dataset_source",
447
+ "version_id": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545"
448
+ }
449
+ ],
450
+ "protocol_version_id": "slayer://version/protocol/common_voice_pl-text-projection@sha256:8d74ca15c0a1584b8ba094ae8926fbeddfbd0490fb1b096a25d21acda1912d05",
451
+ "started_at": "2026-09-05T12:00:00Z"
452
+ },
453
+ "schema_version": "slayer.ai/dataset-source-contribution/v1",
454
+ "version": {
455
+ "created_at": "2026-09-05T12:00:00Z",
456
+ "created_by": "hf:PiotrSty",
457
+ "digest": "sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
458
+ "id": "slayer://version/dataset-source/common_voice_pl@sha256:097ceddeda1333d9a400bbfcbfac885cc9b9b62760c752da1bfd3f8f41225545",
459
+ "object_id": "slayer://object/dataset-source/common_voice_pl",
460
+ "payload_uri": "hf://datasets/PiotrSty/common-voice-pl-text@2e3e62d374df8cad50e443a356e2c2bec86e10b4/data/train-00000-of-00001.parquet",
461
+ "schema_version": "slayer.ai/dataset-source/v1"
462
+ }
463
+ }
artifacts/source_findings.md CHANGED
@@ -541,3 +541,40 @@ Crawl the corpus already draws on.
541
  If the goal is raw scale: SAOS. If the goal is a corpus that is not two-thirds
542
  legalese, **there is no billion-scale option**, and the honest plan is a number of
543
  50–200M-token sources across different registers.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
541
  If the goal is raw scale: SAOS. If the goal is a corpus that is not two-thirds
542
  legalese, **there is no billion-scale option**, and the honest plan is a number of
543
  50–200M-token sources across different registers.
544
+
545
+ ---
546
+
547
+ ## common_voice_pl — Common Voice Polish validated sentences (v26.0)
548
+
549
+ **Investigated** — 2026-09-05 (review round 2026-09-29).
550
+
551
+ **Verdict** — `added` with a **unit caveat** (proposed with `release: None`, merge
552
+ blocked on a maintainer unit decision). 45,043 unique validated speech prompts /
553
+ 995k `cl100k_base` tokens, CC0-1.0, from Mozilla Common Voice Scripted Speech
554
+ 26.0 (Polish).
555
+
556
+ **Enumeration** — official dataset record on Mozilla Data Collective
557
+ (<https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q>, id
558
+ `cmqinmu2a00winq07gyrtri0q`, release 2026-06-12), read via a pinned row mirror
559
+ with DuckDB column projection (the 4.48 GB audio is never pulled). 138,798
560
+ validated clip rows -> 45,043 unique normalized sentences (91,198 repeated
561
+ clips collapsed; 2,538 too-short and 19 too-long rows rejected).
562
+
563
+ **License evidence** — verified AT THE ORIGIN: the MDC dataset record's license
564
+ field is "Creative Commons Zero v1.0 Universal (CC0-1.0)", and the same
565
+ `license`/`license_url` ride along per source row (build rejects non-CC0 rows).
566
+ **Terms covenant**: MDC Terms of Use (Data Consumer License, clause viii)
567
+ prohibit re-identifying individual contributors/sources — carried to downstream
568
+ users in the datasheet and registry.
569
+
570
+ **Blockers** — (1) **unit decision**: every doc is a single speech prompt (min 12
571
+ / median 56 / max 153 chars; 0 docs reach the 200-char corpus gate, no
572
+ concatenation exists) — accept sentence units with a per-source gate override +
573
+ training cap, or withdraw as unit-incompatible; (2) before release: NERGAL pass
574
+ (full-shard residual scan was clean — 0 contacts across 45,043 docs — but the
575
+ prompts are user-contributed speech material).
576
+
577
+ **Lesson** — speech corpora's natural unit (the prompt sentence) is smaller than
578
+ a pretraining corpus's document gate; measure the length distribution BEFORE
579
+ promising the source, and keep the unit question in the PR description up
580
+ front — it is the first thing a reviewer will ask.
data/common_voice_pl/NOTICE.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Attribution and provenance
2
+
3
+ Source: Mozilla Data Collective, Common Voice Scripted Speech 26.0 - Polish (`cmqinmu2a00winq07gyrtri0q`). License: `CC0-1.0`. Text-only preparation: Piotr Styla.
data/common_voice_pl/common_voice_pl.attribution.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9988cdaaf406193ec07d5936ee875f640212fc78599e615b497a3fbf3a66867d
3
+ size 24300412
data/common_voice_pl/common_voice_pl.license-evidence.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "creative_commons": "https://creativecommons.org/publicdomain/zero/1.0/",
3
+ "finding": "The official dataset page and pinned mirror identify the release as CC0-1.0.",
4
+ "license": "CC0-1.0",
5
+ "official_dataset": "https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q",
6
+ "official_dataset_id": "cmqinmu2a00winq07gyrtri0q",
7
+ "pinned_access_mirror": "hf://datasets/Peacockery/common-voice-scripted-speech-26@b4d8b94d43831475de59a455345acf6945cfd66e/data/validated/common_voice_scripted_speech_26_0__pl__cmqinmu2a00winq07gyrtri0q.parquet",
8
+ "review_scope": "dataset-level license metadata; not independent legal advice",
9
+ "source_parquet_sha256": "abd846a0411d04cf88920161100625e9cbe64a111d17474ac49375f490dafb3a",
10
+ "source_parquet_size": 4481707510,
11
+ "spdx": "https://spdx.org/licenses/CC0-1.0.html",
12
+ "status": "documented-open-cc0",
13
+ "upstream_release": "26.0",
14
+ "upstream_release_date": "2026-06-12"
15
+ }
data/common_voice_pl/common_voice_pl.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Common Voice Polish text v26.0
2
+
3
+ Text-only projection of Polish sentences associated with validated recordings
4
+ in Mozilla Common Voice Scripted Speech 26.0.
5
+
6
+ ## Source and scope
7
+
8
+ - Official upstream: https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q
9
+ - Upstream dataset ID: `cmqinmu2a00winq07gyrtri0q`
10
+ - Upstream release: `26.0` (2026-06-12)
11
+ - Pinned access mirror: `Peacockery/common-voice-scripted-speech-26@b4d8b94d43831475de59a455345acf6945cfd66e`
12
+ - Selected split: `validated`
13
+ - Language: Polish (`pl`)
14
+ - License: `CC0-1.0`
15
+ - Records: 45,043
16
+ - Tokens: 994,922 (`cl100k_base` proxy)
17
+
18
+ Audio, `client_id`, age, gender, accent, file paths and other direct contributor
19
+ metadata are not selected. Repeated recordings of the same normalized sentence
20
+ are represented once; aggregate clip count and duration are retained only in the
21
+ attribution sidecar.
22
+
23
+ ## Processing
24
+
25
+ 1. Read only selected metadata columns from the pinned Parquet with DuckDB.
26
+ 2. Require the expected Polish locale, upstream dataset ID and CC0 license.
27
+ 3. Normalize Unicode and whitespace.
28
+ 4. Exclude malformed text and simple URL, email, telephone and PESEL-like matches.
29
+ 5. Collapse case/punctuation-equivalent text within this source.
30
+ 6. Compute deterministic IDs and `cl100k_base` token counts.
31
+
32
+ ## Unit note — document length vs the corpus gate
33
+
34
+ Every record is a **single validated speech prompt** (the Common Voice unit):
35
+ 45,043 docs, min 12 / median 56 / mean 58.5 / **max 153 characters** — **zero
36
+ documents reach `build_dynaword.py`'s 200-character minimum**, and nothing in
37
+ the pipeline concatenates sentences. The shard ships as
38
+ `data/<key>/<key>.parquet` (like the other in-repo sources), so the
39
+ SpeakLeash-flow gate does not run over it — but as corpus policy this is a unit
40
+ mismatch and needs a maintainer decision before merge:
41
+
42
+ - **(a) accept sentence-level units** for this source via a documented
43
+ per-source gate override (a small shared-build change, to be reviewed as its
44
+ own PR) plus a training-mix cap — the sentences are clean contemporary Polish
45
+ prompts (995k tokens, ~0.01% of the corpus) and synthetic concatenation would
46
+ fabricate documents that never existed;
47
+ - **(b) withdraw the source** as unit-incompatible with the document-level gates.
48
+
49
+ Recommendation: (a) with the cap; (b) is equally defensible given the reviewer's
50
+ lean ("single sentences may not belong here at all"). The decision is the
51
+ maintainer's.
52
+
53
+ ## License at the origin and downstream terms
54
+
55
+ - License statement at the origin: the dataset record on the **Mozilla Data
56
+ Collective** portal — <https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q>
57
+ — carries `license: "Creative Commons Zero v1.0 Universal (CC0-1.0)"` for the
58
+ Common Voice Scripted Speech 26.0 datasets, and the same `license` /
59
+ `license_url` values ride along per row in the source Parquet (the build
60
+ rejects any row not labelled `CC0-1.0`).
61
+ - **Re-identification prohibition carried to downstream users**: the Mozilla
62
+ Data Collective Terms of Use
63
+ (<https://mozilladatacollective.com/terms>) forbid users to "decompile,
64
+ analyze, or otherwise attempt to determine, trace, match the identity of, or
65
+ re-identify the individual contributor or source of any data contained in any
66
+ Dataset" (Data Consumer License, clause viii). Any redistribution of this
67
+ shard must keep that restriction on its users; this projection already drops
68
+ audio, `client_id`, age, gender, accent and file paths.
69
+
70
+ ## PII scrubber and residual scan
71
+
72
+ Scrubber that ran: the `quality_rejection()` pattern filters in
73
+ `src/fetch_common_voice_pl.py` (malformed text; URL, e-mail, telephone-like and
74
+ PESEL-like matches are **rejected**, not rewritten) plus Unicode/whitespace
75
+ normalization. This is **not**
76
+ [SlayerLab/NERGAL](https://huggingface.co/SlayerLab/NERGAL); the shard must be
77
+ re-run through NERGAL before it is admitted to a release. Merge with
78
+ `release: None` is fine meanwhile.
79
+
80
+ Residual scan covers **all 45,043 records** (the shard is tiny): 0 e-mail-like
81
+ strings, 0 digit runs (7-15), 0 PESEL mentions, 0 URLs; 12 records mention the
82
+ word "telefon" in narrative prose (e.g. "w tej chwili zadzwonił telefon") — not
83
+ contact data. Residual risk is low here; the NERGAL gate stands because the
84
+ prompts are user-contributed speech material.
85
+
86
+ This source has not yet been cross-deduplicated against every released DynaWord
87
+ source. The target integration should run the corpus-wide exact and near-duplicate
88
+ protocol before a training release. Short isolated sentences should also receive
89
+ a source cap in training-mix experiments.
data/common_voice_pl/common_voice_pl.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c22fb1be8badb75f55c0f1f6719360ab50dc798054a7673d67b2780c41858b2
3
+ size 2989184
data/common_voice_pl/common_voice_pl.sample.jsonl ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_5e2ec2dde9ffd220fd94d635142aa8b5de71fc21385dc0eb6e69366735b5e289", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Sztuczny ptak zajął miejsce na jedwabnej poduszce, tuż obok cesarskiego łoża.", "token_count": 32}
2
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_2072b6d588c75a38c02e710834f70f2bbc3fd6413f103dd96220459c514dd2ed", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Uważam, że na tych zmianach w kształceniu zawodowym skorzystają gospodarki wszystkich państw członkowskich", "token_count": 43}
3
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_56d61bacf5c4c09f00848975904ccb8bf99dc801561af1d474c164c890937f70", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Na szczęście wcześnie dostrzeżono ucieczkę i konny pościg schwytał ich jeszcze nie daleko obozu.", "token_count": 37}
4
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_7c82e9d8250f403cea974e0c252c21d12fb278f56dae43c3ec7267f6528f1906", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Powiedział \"Plato jest moim przyjacielem, lecz większą przyjaciółką prawda\"", "token_count": 28}
5
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_f7571b348e34787ca0d21eb01a61367277734850ce70663452aa6551043c00f9", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Przeciwnie, zachęci do kolejnych przybyć", "token_count": 15}
6
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_153d3816cd6c21839a4e6796f05dd0f02f0ca9ceb3b7e424151d82152e64e955", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Słyszałem, jak więźniowie się obudzili i, ziewając, prowadzili rozmowę po czesku.", "token_count": 35}
7
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_5a44e3be716d92cea96f5216649dbb3c60a1f5d3449ab9153da61fee9ca66b62", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Pamięć ulatuje i ludziom chyba nie zależy, żeby pamiętać.", "token_count": 27}
8
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_8075acd0628883fd26cb40280766d047c90e2bf554b425670c9cd5c523a6fc9c", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Wszystko jest tak, jak znalazłem.", "token_count": 13}
9
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_cc668aafd1b853ece10697cc1d785adaaa4902e19be01f71ee40330d83ba476e", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Brzydkich nóg nie da się ukryć całkowicie.", "token_count": 17}
10
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_c1ff26df9ea27270b4f74b8eb68d06ee1569eadefbba6d844009559e40ebaf7b", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Nie wolno wykorzystywać dziczyzny zbieranej w lesie", "token_count": 21}
11
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_4f9175619d0aca2a787dc0e7c611a5eb5437a13f9ab8a727ab1ca68f9bcf2c13", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Przepraszam, ale nie mogłem znaleźć informacji.", "token_count": 17}
12
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_d1724b3d8c6afbc0e3ac713f8c8074579e1e906cd93858f92443ab9fa2080ca7", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Kogut myślał o niedzieli, a w sobotę łeb mu ucięli.", "token_count": 25}
13
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_8e1a7b870b0a26f25b3e9177c0b2250bfb594d4d6cd3c1bf23c4253929098fc7", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Nastała chwila milczenia, poczem znów ozwał się stary rycerz.", "token_count": 25}
14
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_2d6556b5fe22c31e26119d4cc0d65a8b9170a8de0a6ea360d75c3a937d5da922", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Niech i tak będzie, ale po co was nudzę tem wszystkiem?", "token_count": 16}
15
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_164cfd445093f2d3871ea4d2e95180d592abec7f483400f21eddfc71232b9c55", "license": "CC0-1.0", "source": "common_voice_pl", "text": "W końcu stanął na miejscu, opuścił ramię prawe i znieruchomiał.", "token_count": 27}
16
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_183ea428f8fa74be114f953b4962124a240c36e6a4891160cdd04055f2edea5d", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Niemniej jednak inni także muszą spełnić swoją powinność", "token_count": 18}
17
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_de78c96c76b24cc09576ac9eced5fd0b703a2145cdb70ba1dab354fd89b2fa84", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Ani godziny, ani minuty.", "token_count": 10}
18
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_45729b7153dd9aaa123da57dfa8386be0d062a9532cb09c6163470360d756c5e", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Jak ty umiesz zawsze uspokoić mnie, Jur!", "token_count": 16}
19
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_b4290f260aee6b708dd4df57e40c4566c62b36117d42d424485b4cfda230c350", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Wszędzie mdły, duszący zapach, pleśniowego grzyba i wilgotnej ziemi.", "token_count": 27}
20
+ {"added": "2026-09-05", "author": "Mozilla Common Voice contributors", "created": "2026-06-12", "id": "common_voice_pl_49a9ff059e8c86f8221f1a2c32fb32ee86b8c35cf9247ee062469fe4ff580422", "license": "CC0-1.0", "source": "common_voice_pl", "text": "Jest to efektem szeregu środków zawartych w kompleksowej polityce rodzinnej", "token_count": 26}
data/common_voice_pl/common_voice_pl.stats.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "accepted_source_sentence_ids": 45136,
3
+ "added": "2026-09-05",
4
+ "authors_with_value": 45043,
5
+ "by_sentence_domain": {
6
+ "agriculture_food": 2,
7
+ "finance": 3,
8
+ "finance,technology_robotics": 1,
9
+ "general": 2,
10
+ "unspecified": 45035
11
+ },
12
+ "chars": 2637100,
13
+ "collapsed_accepted_rows": 91198,
14
+ "created_max": "2026-06-12",
15
+ "created_min": "2026-06-12",
16
+ "cross_source_exact_dedup_completed": false,
17
+ "cross_source_near_dedup_completed": false,
18
+ "drop_by_reason_source_rows": {
19
+ "too_long": 19,
20
+ "too_short": 2538
21
+ },
22
+ "kept": 45043,
23
+ "license": "CC0-1.0",
24
+ "licenses": {
25
+ "CC0-1.0": 45043
26
+ },
27
+ "normalized_unique_sentences": 45043,
28
+ "rejected_source_rows": 2557,
29
+ "source": "common_voice_pl",
30
+ "source_parquet_path": "data/validated/common_voice_scripted_speech_26_0__pl__cmqinmu2a00winq07gyrtri0q.parquet",
31
+ "source_parquet_sha256": "abd846a0411d04cf88920161100625e9cbe64a111d17474ac49375f490dafb3a",
32
+ "source_parquet_size": 4481707510,
33
+ "source_repository": "Peacockery/common-voice-scripted-speech-26",
34
+ "source_revision": "b4d8b94d43831475de59a455345acf6945cfd66e",
35
+ "source_rows": 138798,
36
+ "stats_recomputed_from_output_rows": true,
37
+ "target_base_revision": "a916edecabc2be8832e08fb2bd9dfafcc1d2dd71",
38
+ "tokens": 994922,
39
+ "upstream_dataset_id": "cmqinmu2a00winq07gyrtri0q",
40
+ "upstream_version": "26.0",
41
+ "whitespace_words": 379819
42
+ }
src/fetch_common_voice_pl.py ADDED
@@ -0,0 +1,733 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build the text-only Polish Common Voice contribution for DynaWord.
3
+
4
+ The source Parquet embeds audio. This builder uses DuckDB column projection over
5
+ HTTP and never materializes the audio column or direct contributor metadata.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import argparse
11
+ import collections
12
+ import datetime as dt
13
+ import hashlib
14
+ import importlib.metadata
15
+ import json
16
+ import pathlib
17
+ import platform
18
+ import re
19
+ import shutil
20
+ import sys
21
+ import unicodedata
22
+ from typing import Any
23
+
24
+
25
+ SOURCE_NAME = "common_voice_pl"
26
+ MIRROR_REPOSITORY = "Peacockery/common-voice-scripted-speech-26"
27
+ MIRROR_REVISION = "b4d8b94d43831475de59a455345acf6945cfd66e"
28
+ UPSTREAM_DATASET_ID = "cmqinmu2a00winq07gyrtri0q"
29
+ UPSTREAM_VERSION = "26.0"
30
+ UPSTREAM_RELEASE_DATE = "2026-06-12"
31
+ UPSTREAM_URL = f"https://mozilladatacollective.com/datasets/{UPSTREAM_DATASET_ID}"
32
+ SOURCE_PARQUET_PATH = (
33
+ "data/validated/"
34
+ "common_voice_scripted_speech_26_0__pl__cmqinmu2a00winq07gyrtri0q.parquet"
35
+ )
36
+ SOURCE_PARQUET_URL = (
37
+ f"https://huggingface.co/datasets/{MIRROR_REPOSITORY}/resolve/"
38
+ f"{MIRROR_REVISION}/{SOURCE_PARQUET_PATH}"
39
+ )
40
+ SOURCE_PARQUET_SHA256 = "abd846a0411d04cf88920161100625e9cbe64a111d17474ac49375f490dafb3a"
41
+ SOURCE_PARQUET_SIZE = 4_481_707_510
42
+ TARGET_REPOSITORY = "SlayerLab/polish-dynaword"
43
+ OWN_REPOSITORY = "PiotrSty/common-voice-pl-text"
44
+ SOURCE_LICENSE = "CC0-1.0"
45
+ AUTHOR = "Mozilla Common Voice contributors"
46
+ EXPECTED_FIELDS = (
47
+ "id", "text", "source", "added", "created", "token_count", "license", "author"
48
+ )
49
+ COMMIT_PATTERN = re.compile(r"^[0-9a-f]{40}$")
50
+ URL_RE = re.compile(r"(?i)\b(?:https?://|www\.)\S+")
51
+ EMAIL_RE = re.compile(r"(?i)\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b")
52
+ PESEL_RE = re.compile(r"(?<!\d)\d{11}(?!\d)")
53
+ PHONE_RE = re.compile(r"(?<!\d)(?:\+?48[ .-]?)?(?:\d[ .-]?){9}(?!\d)")
54
+ CONTROL_RE = re.compile(r"[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]")
55
+ HTML_RE = re.compile(r"<[^>]{1,120}>")
56
+ REPEATED_RE = re.compile(r"(.)\1{7,}", re.IGNORECASE)
57
+
58
+
59
+ class BuildError(ValueError):
60
+ pass
61
+
62
+
63
+ def sha256_file(path: pathlib.Path) -> str:
64
+ digest = hashlib.sha256()
65
+ with path.open("rb") as stream:
66
+ for chunk in iter(lambda: stream.read(1024 * 1024), b""):
67
+ digest.update(chunk)
68
+ return digest.hexdigest()
69
+
70
+
71
+ def canonical_sha256(value: Any) -> str:
72
+ payload = json.dumps(
73
+ value, ensure_ascii=False, sort_keys=True, separators=(",", ":")
74
+ ).encode("utf-8")
75
+ return hashlib.sha256(payload).hexdigest()
76
+
77
+
78
+ def write_json(path: pathlib.Path, payload: Any) -> None:
79
+ path.parent.mkdir(parents=True, exist_ok=True)
80
+ path.write_text(
81
+ json.dumps(payload, ensure_ascii=False, indent=2, sort_keys=True) + "\n",
82
+ encoding="utf-8",
83
+ )
84
+
85
+
86
+ def normalize_text(value: str) -> str:
87
+ value = unicodedata.normalize("NFKC", value or "")
88
+ value = value.replace("\u00a0", " ").replace("\u200b", "")
89
+ return " ".join(value.split()).strip()
90
+
91
+
92
+ def dedup_key(text: str) -> str:
93
+ folded = unicodedata.normalize("NFKC", text).casefold()
94
+ folded = "".join(" " if unicodedata.category(ch).startswith("P") else ch for ch in folded)
95
+ return " ".join(folded.split())
96
+
97
+
98
+ def quality_rejection(text: str) -> str | None:
99
+ if len(text) < 12:
100
+ return "too_short"
101
+ if len(text) > 500:
102
+ return "too_long"
103
+ if CONTROL_RE.search(text):
104
+ return "control_character"
105
+ if HTML_RE.search(text):
106
+ return "html"
107
+ if URL_RE.search(text):
108
+ return "url"
109
+ if EMAIL_RE.search(text):
110
+ return "email"
111
+ if PESEL_RE.search(text):
112
+ return "pesel_like"
113
+ if PHONE_RE.search(text):
114
+ return "phone_like"
115
+ if REPEATED_RE.search(text):
116
+ return "repeated_character"
117
+ letters = sum(ch.isalpha() for ch in text)
118
+ if letters < 6 or letters / max(1, len(text)) < 0.45:
119
+ return "low_letter_ratio"
120
+ return None
121
+
122
+
123
+ def stable_id(key: str) -> str:
124
+ return f"{SOURCE_NAME}_{hashlib.sha256(key.encode('utf-8')).hexdigest()}"
125
+
126
+
127
+ def source_registry_entry() -> str:
128
+ return f''' "{SOURCE_NAME}": {{
129
+ "file_key": "{SOURCE_NAME}",
130
+ "pretty": "Mozilla Common Voice Polish validated sentences (v26.0)",
131
+ "license": "{SOURCE_LICENSE}",
132
+ "license_spdx": "{SOURCE_LICENSE}",
133
+ "traceable": "Mozilla Data Collective distributes Common Voice Scripted "
134
+ "Speech 26.0 under CC0-1.0; this text-only projection retains "
135
+ "only sentences associated with validated recordings.",
136
+ "upstream": "{UPSTREAM_URL}",
137
+ "provenance": "Official Mozilla dataset {UPSTREAM_DATASET_ID}, accessed "
138
+ "through the pinned row-normalized HF mirror "
139
+ "{MIRROR_REPOSITORY}@{MIRROR_REVISION}.",
140
+ "domain": "spoken/scripted contemporary sentences",
141
+ "created": "{UPSTREAM_RELEASE_DATE}, {UPSTREAM_RELEASE_DATE}",
142
+ "is_ocr": False,
143
+ "custom_datasheet": True,
144
+ }},
145
+ '''
146
+
147
+
148
+ def update_registry(registry: str) -> str:
149
+ if re.search(rf'^\s{{4}}["\']{SOURCE_NAME}["\']\s*:', registry, re.MULTILINE):
150
+ required = (
151
+ f'"file_key": "{SOURCE_NAME}"',
152
+ f'"license_spdx": "{SOURCE_LICENSE}"',
153
+ f'"upstream": "{UPSTREAM_URL}"',
154
+ )
155
+ if not all(value in registry for value in required):
156
+ raise BuildError(f"existing {SOURCE_NAME} registry entry differs from the contract")
157
+ return registry
158
+ marker = ' "global_voices": {'
159
+ if registry.count(marker) != 1:
160
+ raise BuildError("cannot locate global_voices registry entry")
161
+ return registry.replace(marker, source_registry_entry() + marker, 1)
162
+
163
+
164
+ def source_rows() -> list[dict[str, Any]]:
165
+ import duckdb
166
+
167
+ query = """
168
+ SELECT
169
+ sentence_id, sentence, sentence_domain, source_dataset_id,
170
+ collection, locale, language, license, license_url,
171
+ duration_ms, up_votes, down_votes
172
+ FROM read_parquet(?)
173
+ ORDER BY sentence_id, sentence
174
+ """
175
+ connection = duckdb.connect()
176
+ try:
177
+ table = connection.execute(query, [SOURCE_PARQUET_URL]).to_arrow_table()
178
+ finally:
179
+ connection.close()
180
+ return table.to_pylist()
181
+
182
+
183
+ def aggregate(rows: list[dict[str, Any]]) -> tuple[list[dict[str, Any]], dict[str, Any]]:
184
+ groups: dict[str, dict[str, Any]] = {}
185
+ sentence_ids: set[str] = set()
186
+ rejected: collections.Counter[str] = collections.Counter()
187
+ contract: collections.Counter[str] = collections.Counter()
188
+
189
+ for row in rows:
190
+ if row.get("locale") != "pl" or row.get("language") != "Polish":
191
+ contract["unexpected_language"] += 1
192
+ continue
193
+ if row.get("source_dataset_id") != UPSTREAM_DATASET_ID:
194
+ contract["unexpected_dataset_id"] += 1
195
+ continue
196
+ if str(row.get("license") or "").upper() != SOURCE_LICENSE:
197
+ contract["unexpected_license"] += 1
198
+ continue
199
+ text = normalize_text(str(row.get("sentence") or ""))
200
+ reason = quality_rejection(text)
201
+ if reason:
202
+ rejected[reason] += 1
203
+ continue
204
+ key = dedup_key(text)
205
+ if not key:
206
+ rejected["empty_dedup_key"] += 1
207
+ continue
208
+ sentence_id = str(row.get("sentence_id") or "").strip()
209
+ if not sentence_id:
210
+ rejected["missing_sentence_id"] += 1
211
+ continue
212
+ sentence_ids.add(sentence_id)
213
+ current = groups.get(key)
214
+ candidate = {
215
+ "key": key,
216
+ "text": text,
217
+ "sentence_id": sentence_id,
218
+ "sentence_ids": {sentence_id},
219
+ "clip_count": 1,
220
+ "duration_ms": int(row.get("duration_ms") or 0),
221
+ "up_votes": int(row.get("up_votes") or 0),
222
+ "down_votes": int(row.get("down_votes") or 0),
223
+ "sentence_domain": str(row.get("sentence_domain") or "").strip(),
224
+ "collection": str(row.get("collection") or "").strip(),
225
+ "license_url": str(row.get("license_url") or "").strip(),
226
+ }
227
+ if current is None:
228
+ groups[key] = candidate
229
+ continue
230
+ current["clip_count"] += 1
231
+ current["duration_ms"] += candidate["duration_ms"]
232
+ current["up_votes"] = max(current["up_votes"], candidate["up_votes"])
233
+ current["down_votes"] = max(current["down_votes"], candidate["down_votes"])
234
+ current["sentence_ids"].add(sentence_id)
235
+ if (sentence_id, text) < (current["sentence_id"], current["text"]):
236
+ current["sentence_id"] = sentence_id
237
+ current["text"] = text
238
+ if not current["sentence_domain"] and candidate["sentence_domain"]:
239
+ current["sentence_domain"] = candidate["sentence_domain"]
240
+
241
+ if contract:
242
+ raise BuildError(f"source contract violations: {dict(contract)}")
243
+ result = sorted(groups.values(), key=lambda item: (item["key"], item["sentence_id"]))
244
+ for item in result:
245
+ item["sentence_id_count"] = len(item.pop("sentence_ids"))
246
+ diagnostics = {
247
+ "source_rows": len(rows),
248
+ "accepted_source_sentence_ids": len(sentence_ids),
249
+ "rejected_source_rows": sum(rejected.values()),
250
+ "drop_by_reason_source_rows": dict(sorted(rejected.items())),
251
+ "normalized_unique_sentences": len(result),
252
+ "collapsed_accepted_rows": len(rows) - sum(rejected.values()) - len(result),
253
+ }
254
+ return result, diagnostics
255
+
256
+
257
+ def datasheet(stats: dict[str, Any]) -> str:
258
+ return f"""# Common Voice Polish text v26.0
259
+
260
+ Text-only projection of Polish sentences associated with validated recordings
261
+ in Mozilla Common Voice Scripted Speech 26.0.
262
+
263
+ ## Source and scope
264
+
265
+ - Official upstream: {UPSTREAM_URL}
266
+ - Upstream dataset ID: `{UPSTREAM_DATASET_ID}`
267
+ - Upstream release: `{UPSTREAM_VERSION}` ({UPSTREAM_RELEASE_DATE})
268
+ - Pinned access mirror: `{MIRROR_REPOSITORY}@{MIRROR_REVISION}`
269
+ - Selected split: `validated`
270
+ - Language: Polish (`pl`)
271
+ - License: `{SOURCE_LICENSE}`
272
+ - Records: {stats['kept']:,}
273
+ - Tokens: {stats['tokens']:,} (`cl100k_base` proxy)
274
+
275
+ Audio, `client_id`, age, gender, accent, file paths and other direct contributor
276
+ metadata are not selected. Repeated recordings of the same normalized sentence
277
+ are represented once; aggregate clip count and duration are retained only in the
278
+ attribution sidecar.
279
+
280
+ ## Processing
281
+
282
+ 1. Read only selected metadata columns from the pinned Parquet with DuckDB.
283
+ 2. Require the expected Polish locale, upstream dataset ID and CC0 license.
284
+ 3. Normalize Unicode and whitespace.
285
+ 4. Exclude malformed text and simple URL, email, telephone and PESEL-like matches.
286
+ 5. Collapse case/punctuation-equivalent text within this source.
287
+ 6. Compute deterministic IDs and `cl100k_base` token counts.
288
+
289
+ This source has not yet been cross-deduplicated against every released DynaWord
290
+ source. The target integration should run the corpus-wide exact and near-duplicate
291
+ protocol before a training release. Short isolated sentences should also receive
292
+ a source cap in training-mix experiments.
293
+ """
294
+
295
+
296
+ def dataset_card(stats: dict[str, Any], payload_revision: str) -> str:
297
+ return f"""---
298
+ license: cc0-1.0
299
+ language:
300
+ - pl
301
+ task_categories:
302
+ - text-generation
303
+ size_categories:
304
+ - 10K<n<100K
305
+ pretty_name: Common Voice Polish validated text v26.0
306
+ ---
307
+
308
+ # Common Voice Polish validated text v26.0
309
+
310
+ Versioned text-only research snapshot prepared for Polish DynaWord. It contains
311
+ {stats['kept']:,} unique Polish sentences associated with validated Common Voice
312
+ recordings and {stats['tokens']:,} `cl100k_base` proxy tokens.
313
+
314
+ The dataset is derived from [Mozilla Common Voice Scripted Speech 26.0]({UPSTREAM_URL})
315
+ through the pinned mirror `{MIRROR_REPOSITORY}@{MIRROR_REVISION}`. The source is
316
+ distributed under `CC0-1.0`.
317
+
318
+ ## Files
319
+
320
+ - `data/train-00000-of-00001.parquet`: DynaWord-compatible text rows.
321
+ - `data/common_voice_pl.attribution.jsonl`: non-identifying sentence lineage.
322
+ - `data/common_voice_pl.sample.jsonl`: deterministic 20-row sample.
323
+ - `artifacts/common_voice_pl.stats.json`: counts and filter diagnostics.
324
+ - `artifacts/common_voice_pl.license-evidence.json`: licensing evidence.
325
+ - `artifacts/common_voice_pl_ontology_manifest.json`: Slayer ontology graph.
326
+ - `src/fetch_common_voice_pl.py`: deterministic rebuild protocol.
327
+
328
+ The immutable payload revision recorded by the ontology manifest is
329
+ `{payload_revision}`. Corpus-wide DynaWord deduplication remains an integration
330
+ step; no claim of cross-source novelty is made here.
331
+ """
332
+
333
+
334
+ def contract_test() -> str:
335
+ return f'''"""Contract checks for the {SOURCE_NAME} contribution."""
336
+
337
+ import hashlib
338
+ import json
339
+ from pathlib import Path
340
+
341
+ import pyarrow.parquet as pq
342
+
343
+
344
+ ROOT = Path(__file__).resolve().parents[1]
345
+ DATA = ROOT / "data" / "{SOURCE_NAME}"
346
+ MANIFEST = ROOT / "artifacts" / "{SOURCE_NAME}_ontology_manifest.json"
347
+
348
+
349
+ def sha256_file(path):
350
+ digest = hashlib.sha256()
351
+ with path.open("rb") as stream:
352
+ for chunk in iter(lambda: stream.read(1024 * 1024), b""):
353
+ digest.update(chunk)
354
+ return digest.hexdigest()
355
+
356
+
357
+ def test_schema_and_counts():
358
+ parquet = DATA / "{SOURCE_NAME}.parquet"
359
+ stats = json.loads((DATA / "{SOURCE_NAME}.stats.json").read_text(encoding="utf-8"))
360
+ table = pq.read_table(parquet)
361
+ assert table.column_names == {list(EXPECTED_FIELDS)!r}
362
+ assert table.num_rows == stats["kept"]
363
+ assert len(set(table.column("id").to_pylist())) == table.num_rows
364
+ assert len(set(table.column("text").to_pylist())) == table.num_rows
365
+ assert set(table.column("source").to_pylist()) == {{"{SOURCE_NAME}"}}
366
+ assert set(table.column("license").to_pylist()) == {{"{SOURCE_LICENSE}"}}
367
+
368
+
369
+ def test_privacy_and_sidecars():
370
+ stats = json.loads((DATA / "{SOURCE_NAME}.stats.json").read_text(encoding="utf-8"))
371
+ sidecar = DATA / "{SOURCE_NAME}.attribution.jsonl"
372
+ sample = DATA / "{SOURCE_NAME}.sample.jsonl"
373
+ lines = [json.loads(line) for line in sidecar.read_text(encoding="utf-8").splitlines()]
374
+ assert len(lines) == stats["kept"]
375
+ assert len(sample.read_text(encoding="utf-8").splitlines()) == min(20, stats["kept"])
376
+ forbidden = {{"client_id", "age", "gender", "accents", "path", "audio"}}
377
+ assert all(not (forbidden & set(item)) for item in lines)
378
+
379
+
380
+ def test_manifest_and_checksums():
381
+ manifest = json.loads(MANIFEST.read_text(encoding="utf-8"))
382
+ required = {{"object", "version", "protocol", "run", "relations", "evidence", "claims", "claim_evidence", "actors", "attestations"}}
383
+ assert required <= set(manifest)
384
+ assert manifest["ontology_version"] == "slayer.ai/research-ontology/v0.1"
385
+ assert manifest["version"]["payload_uri"].startswith("hf://datasets/{OWN_REPOSITORY}@")
386
+ evidence = {{item["observation_type"]: item["payload"] for item in manifest["evidence"]}}
387
+ checksums = evidence["artifact_checksums"]
388
+ expected = {{
389
+ "parquet_sha256": DATA / "{SOURCE_NAME}.parquet",
390
+ "attribution_sha256": DATA / "{SOURCE_NAME}.attribution.jsonl",
391
+ "stats_sha256": DATA / "{SOURCE_NAME}.stats.json",
392
+ "license_evidence_sha256": DATA / "{SOURCE_NAME}.license-evidence.json",
393
+ "sample_sha256": DATA / "{SOURCE_NAME}.sample.jsonl",
394
+ }}
395
+ if "language_audit_sha256" in checksums:
396
+ expected["language_audit_sha256"] = ROOT / "artifacts" / "{SOURCE_NAME}_language_audit.json"
397
+ assert {{key: sha256_file(path) for key, path in expected.items()}} == checksums
398
+ '''
399
+
400
+
401
+ def build_manifest(
402
+ stats: dict[str, Any], artifact_digests: dict[str, str], payload_revision: str,
403
+ target_revision: str, run_id: str, run_at: str, script_sha256: str,
404
+ language_audit: dict[str, Any] | None,
405
+ ) -> dict[str, Any]:
406
+ object_id = f"slayer://object/dataset-source/{SOURCE_NAME}"
407
+ version_digest = canonical_sha256({
408
+ "source_revision": MIRROR_REVISION,
409
+ "upstream_dataset_id": UPSTREAM_DATASET_ID,
410
+ "artifacts": artifact_digests,
411
+ })
412
+ version_id = f"slayer://version/dataset-source/{SOURCE_NAME}@sha256:{version_digest}"
413
+ protocol_id = f"slayer://object/protocol/{SOURCE_NAME}-text-projection"
414
+ protocol_spec = {
415
+ "entrypoint": "python src/fetch_common_voice_pl.py",
416
+ "source_path": "src/fetch_common_voice_pl.py",
417
+ "selection": {
418
+ "locale": "pl", "language": "Polish", "split": "validated",
419
+ "columns_excluded": ["audio", "client_id", "age", "gender", "accents", "variant", "path"],
420
+ },
421
+ "normalization": "Unicode NFKC and whitespace collapse",
422
+ "deduplication": "casefolded punctuation-insensitive exact key within source",
423
+ "quality_filters": ["length", "control characters", "HTML", "URL", "email", "phone-like", "PESEL-like", "letter ratio"],
424
+ "tokenizer": "cl100k_base",
425
+ }
426
+ protocol_digest = canonical_sha256({"script_sha256": script_sha256, "spec": protocol_spec})
427
+ protocol_version_id = f"slayer://version/protocol/{SOURCE_NAME}-text-projection@sha256:{protocol_digest}"
428
+
429
+ def evidence(kind: str, payload: Any) -> dict[str, Any]:
430
+ digest = canonical_sha256({"run": run_id, "subject": version_id, "kind": kind, "payload": payload})
431
+ return {
432
+ "id": f"slayer://evidence/{SOURCE_NAME}/{kind}@sha256:{digest}",
433
+ "run_id": run_id, "subject_version": version_id,
434
+ "observation_type": kind, "payload": payload, "observed_at": run_at,
435
+ }
436
+
437
+ evidence_items = [
438
+ evidence("dataset_record_counts", stats),
439
+ evidence("artifact_checksums", artifact_digests),
440
+ evidence("license_metadata", {
441
+ "license": SOURCE_LICENSE, "official_dataset": UPSTREAM_URL,
442
+ "mirror_revision": MIRROR_REVISION,
443
+ "source_parquet_sha256": SOURCE_PARQUET_SHA256,
444
+ "source_parquet_size": SOURCE_PARQUET_SIZE,
445
+ "artifact": f"data/{SOURCE_NAME}/{SOURCE_NAME}.license-evidence.json",
446
+ }),
447
+ evidence("direct_metadata_exclusion", {
448
+ "selected_direct_identifiers": 0,
449
+ "excluded_columns": protocol_spec["selection"]["columns_excluded"],
450
+ "text_filter_drop_counts": stats["drop_by_reason_source_rows"],
451
+ }),
452
+ evidence("target_registry_check", {
453
+ "target": f"hf://datasets/{TARGET_REPOSITORY}@{target_revision}",
454
+ "source_key_absent_before_contribution": True,
455
+ "cross_source_exact_dedup_completed": False,
456
+ "cross_source_near_dedup_completed": False,
457
+ }),
458
+ evidence("schema_validation", {"schema": list(EXPECTED_FIELDS), "records": stats["kept"], "valid": True}),
459
+ ]
460
+ if language_audit is not None:
461
+ evidence_items.append(evidence("language_audit", {
462
+ "artifact": f"artifacts/{SOURCE_NAME}_language_audit.json",
463
+ "sha256": artifact_digests["language_audit_sha256"],
464
+ "sample_rows": language_audit["sample_rows"],
465
+ "polish_share": language_audit["polish_share"],
466
+ "interpretation_limit": language_audit["interpretation_limit"],
467
+ }))
468
+ by_type = {item["observation_type"]: item["id"] for item in evidence_items}
469
+
470
+ def claim(statement: str, falsification: str, supports: list[str]) -> dict[str, Any]:
471
+ digest = canonical_sha256({"scope": version_id, "statement": statement, "falsification": falsification})
472
+ return {
473
+ "id": f"slayer://claim/{SOURCE_NAME}@sha256:{digest}",
474
+ "scope": version_id, "statement": statement, "asserted_by": "hf:PiotrSty",
475
+ "supported_by": supports, "falsification_condition": falsification,
476
+ }
477
+
478
+ claims = [
479
+ claim(
480
+ "The artifact contains one retained row per within-source normalized sentence after the recorded filters.",
481
+ "A retained normalized key occurs more than once or an accepted key is absent without a recorded rejection.",
482
+ [by_type["dataset_record_counts"], by_type["schema_validation"]],
483
+ ),
484
+ claim(
485
+ "The pinned source records and official dataset page identify the selected material as CC0-1.0.",
486
+ "The pinned records or official dataset terms identify a conflicting license.",
487
+ [by_type["license_metadata"]],
488
+ ),
489
+ claim(
490
+ "No source client identifier, demographic field, path or audio payload is included in the published projection.",
491
+ "A forbidden direct-source metadata field is present in the Parquet or attribution sidecar.",
492
+ [by_type["direct_metadata_exclusion"], by_type["schema_validation"]],
493
+ ),
494
+ claim(
495
+ "The source key was absent from the pinned DynaWord registry before this contribution; corpus-wide novelty is not asserted.",
496
+ "The source key exists in the pinned pre-contribution registry or this contribution asserts completed cross-source deduplication.",
497
+ [by_type["target_registry_check"]],
498
+ ),
499
+ ]
500
+ claim_links = [
501
+ {"claim_id": item["id"], "evidence_id": evidence_id, "relation": "SUPPORTS", "introduced_by_run": run_id}
502
+ for item in claims for evidence_id in item["supported_by"]
503
+ ]
504
+ source_version = f"hf://datasets/{MIRROR_REPOSITORY}@{MIRROR_REVISION}"
505
+ upstream_version = f"mdc://dataset/{UPSTREAM_DATASET_ID}@{UPSTREAM_VERSION}"
506
+ target_version = f"hf://datasets/{TARGET_REPOSITORY}@{target_revision}"
507
+
508
+ def attestation(kind: str, value: Any, supports: list[str]) -> dict[str, Any]:
509
+ payload = {
510
+ "type": kind, "value": value, "actor_id": "hf:PiotrSty",
511
+ "subject_version": version_id, "supported_by": supports,
512
+ }
513
+ digest = canonical_sha256(payload)
514
+ return {
515
+ "id": f"slayer://attestation/{SOURCE_NAME}/{kind}@sha256:{digest}",
516
+ **payload, "created_at": run_at,
517
+ }
518
+
519
+ return {
520
+ "schema_version": "slayer.ai/dataset-source-contribution/v1",
521
+ "ontology_version": "slayer.ai/research-ontology/v0.1",
522
+ "object": {"id": object_id, "kind": "dataset_source", "name": SOURCE_NAME, "metadata": {"language": "pl", "domain": "spoken/scripted", "provider": "Mozilla Data Collective"}},
523
+ "version": {
524
+ "id": version_id, "object_id": object_id, "digest": f"sha256:{version_digest}",
525
+ "schema_version": "slayer.ai/dataset-source/v1",
526
+ "payload_uri": f"hf://datasets/{OWN_REPOSITORY}@{payload_revision}/data/train-00000-of-00001.parquet",
527
+ "created_at": run_at, "created_by": "hf:PiotrSty",
528
+ },
529
+ "protocol": {
530
+ "id": protocol_id, "kind": "dataset_filtering", "name": f"{SOURCE_NAME}-text-projection",
531
+ "version": {
532
+ "id": protocol_version_id, "object_id": protocol_id,
533
+ "digest": f"sha256:{protocol_digest}", "code_sha256": script_sha256,
534
+ "schema_version": "slayer.ai/protocol/v1",
535
+ "payload_uri": f"hf://datasets/{OWN_REPOSITORY}@{payload_revision}/src/fetch_common_voice_pl.py",
536
+ "created_at": run_at, "created_by": "hf:PiotrSty",
537
+ },
538
+ "specification": protocol_spec,
539
+ },
540
+ "run": {
541
+ "id": run_id, "protocol_version_id": protocol_version_id, "actor_id": "hf:PiotrSty",
542
+ "git_commit": payload_revision, "started_at": run_at, "finished_at": run_at,
543
+ "config": protocol_spec,
544
+ "environment": {
545
+ "python": sys.version, "platform": platform.platform(), "machine": platform.machine(),
546
+ "packages": {name: importlib.metadata.version(name) for name in ("duckdb", "pyarrow", "tiktoken")},
547
+ "determinism": {"sampling": "hash-ranked sample only", "seed": "sha256(sample:id)"},
548
+ },
549
+ "inputs": [
550
+ {"role": "official_upstream", "version_id": upstream_version},
551
+ {"role": "access_mirror", "version_id": source_version},
552
+ {"role": "target_base", "version_id": target_version},
553
+ ],
554
+ "outputs": [{"role": "dataset_source", "version_id": version_id}],
555
+ },
556
+ "relations": [
557
+ {"source_version_id": version_id, "predicate": "DERIVED_FROM", "target_version_id": source_version, "introduced_by_run": run_id},
558
+ {"source_version_id": source_version, "predicate": "MIRRORS", "target_version_id": upstream_version, "introduced_by_run": run_id},
559
+ {"source_version_id": version_id, "predicate": "FILTERED_BY", "target_version_id": protocol_version_id, "introduced_by_run": run_id},
560
+ {"source_version_id": version_id, "predicate": "COMPATIBLE_WITH", "target_version_id": target_version, "introduced_by_run": run_id},
561
+ ],
562
+ "evidence": evidence_items,
563
+ "claims": claims,
564
+ "claim_evidence": claim_links,
565
+ "actors": [
566
+ {"id": "hf:PiotrSty", "kind": "human", "identity": "Piotr Styła", "identifiers": {"hugging_face": "PiotrSty", "github": "PiotrStyla"}},
567
+ {"id": "org:mozilla-data-collective", "kind": "organization", "identity": "Mozilla Data Collective", "identifiers": {"dataset_id": UPSTREAM_DATASET_ID}},
568
+ {"id": "agent:codex", "kind": "agent", "identity": "OpenAI Codex", "identifiers": {}},
569
+ ],
570
+ "attestations": [
571
+ attestation("schema_valid", True, [by_type["schema_validation"], by_type["artifact_checksums"]]),
572
+ attestation("license_status", "documented_cc0_1_0", [by_type["license_metadata"]]),
573
+ attestation("cross_source_deduplication", "pending_target_integration", [by_type["target_registry_check"]]),
574
+ ],
575
+ }
576
+
577
+
578
+ def build(args: argparse.Namespace) -> dict[str, Any]:
579
+ if not COMMIT_PATTERN.fullmatch(args.target_revision):
580
+ raise BuildError("target revision must be a 40-character commit")
581
+ if not COMMIT_PATTERN.fullmatch(args.payload_revision):
582
+ raise BuildError("payload revision must be a 40-character commit")
583
+ if not args.target_registry.is_file():
584
+ raise BuildError("target sources.py is missing")
585
+ registry = args.target_registry.read_text(encoding="utf-8")
586
+ if re.search(rf'^\s{{4}}["\']{SOURCE_NAME}["\']\s*:', registry, re.MULTILINE):
587
+ raise BuildError(f"{SOURCE_NAME} already exists in the pinned target registry")
588
+
589
+ import pyarrow as pa
590
+ import pyarrow.parquet as pq
591
+ import tiktoken
592
+
593
+ source = source_rows()
594
+ retained, diagnostics = aggregate(source)
595
+ encoder = tiktoken.get_encoding("cl100k_base")
596
+ schema = pa.schema([
597
+ ("id", pa.string()), ("text", pa.string()), ("source", pa.string()),
598
+ ("added", pa.string()), ("created", pa.string()), ("token_count", pa.int64()),
599
+ ("license", pa.string()), ("author", pa.string()),
600
+ ])
601
+ rows: list[dict[str, Any]] = []
602
+ sidecars: list[dict[str, Any]] = []
603
+ domains: collections.Counter[str] = collections.Counter()
604
+ for item in retained:
605
+ identifier = stable_id(item["key"])
606
+ token_count = len(encoder.encode_ordinary(item["text"]))
607
+ rows.append({
608
+ "id": identifier, "text": item["text"], "source": SOURCE_NAME,
609
+ "added": args.added_date, "created": UPSTREAM_RELEASE_DATE,
610
+ "token_count": token_count, "license": SOURCE_LICENSE, "author": AUTHOR,
611
+ })
612
+ domain = item["sentence_domain"] or "unspecified"
613
+ domains[domain] += 1
614
+ sidecars.append({
615
+ "id": identifier, "sentence_id": item["sentence_id"],
616
+ "sentence_id_count": item["sentence_id_count"], "clip_count": item["clip_count"],
617
+ "total_duration_ms": item["duration_ms"], "up_votes": item["up_votes"],
618
+ "down_votes": item["down_votes"], "sentence_domain": domain,
619
+ "source_dataset_id": UPSTREAM_DATASET_ID, "upstream_version": UPSTREAM_VERSION,
620
+ "mirror_repository": MIRROR_REPOSITORY, "mirror_revision": MIRROR_REVISION,
621
+ "license": SOURCE_LICENSE,
622
+ })
623
+
624
+ if not rows:
625
+ raise BuildError("all source rows were filtered")
626
+ stats = {
627
+ **diagnostics,
628
+ "kept": len(rows), "chars": sum(len(row["text"]) for row in rows),
629
+ "whitespace_words": sum(len(row["text"].split()) for row in rows),
630
+ "tokens": sum(row["token_count"] for row in rows),
631
+ "source": SOURCE_NAME, "license": SOURCE_LICENSE,
632
+ "licenses": {SOURCE_LICENSE: len(rows)}, "authors_with_value": len(rows),
633
+ "added": args.added_date, "created_min": UPSTREAM_RELEASE_DATE,
634
+ "created_max": UPSTREAM_RELEASE_DATE, "by_sentence_domain": dict(sorted(domains.items())),
635
+ "source_repository": MIRROR_REPOSITORY, "source_revision": MIRROR_REVISION,
636
+ "source_parquet_path": SOURCE_PARQUET_PATH,
637
+ "source_parquet_sha256": SOURCE_PARQUET_SHA256,
638
+ "source_parquet_size": SOURCE_PARQUET_SIZE,
639
+ "upstream_dataset_id": UPSTREAM_DATASET_ID, "upstream_version": UPSTREAM_VERSION,
640
+ "target_base_revision": args.target_revision,
641
+ "cross_source_exact_dedup_completed": False,
642
+ "cross_source_near_dedup_completed": False,
643
+ "stats_recomputed_from_output_rows": True,
644
+ }
645
+ run_at = args.run_at
646
+ run_id = f"common-voice-pl-v26-{run_at.replace(':', '').replace('-', '')}"
647
+ script_path = pathlib.Path(__file__).resolve()
648
+ script_sha256 = sha256_file(script_path)
649
+
650
+ hf_root = args.output / "hf_repo"
651
+ pr_root = args.output / "dynaword_pr"
652
+ for directory in (hf_root / "data", hf_root / "artifacts", hf_root / "src", pr_root / "data" / SOURCE_NAME, pr_root / "artifacts", pr_root / "src"):
653
+ directory.mkdir(parents=True, exist_ok=True)
654
+
655
+ hf_parquet = hf_root / "data" / "train-00000-of-00001.parquet"
656
+ pq.write_table(pa.Table.from_pylist(rows, schema=schema), hf_parquet, compression="zstd", row_group_size=4096)
657
+ pr_parquet = pr_root / "data" / SOURCE_NAME / f"{SOURCE_NAME}.parquet"
658
+ shutil.copy2(hf_parquet, pr_parquet)
659
+
660
+ sidecar_text = "".join(json.dumps(item, ensure_ascii=False, sort_keys=True) + "\n" for item in sidecars)
661
+ sample_rows = sorted(rows, key=lambda row: hashlib.sha256(("sample:" + row["id"]).encode()).hexdigest())[:20]
662
+ sample_text = "".join(json.dumps(item, ensure_ascii=False, sort_keys=True) + "\n" for item in sample_rows)
663
+ for root, data_dir in ((hf_root, hf_root / "data"), (pr_root, pr_root / "data" / SOURCE_NAME)):
664
+ (data_dir / f"{SOURCE_NAME}.attribution.jsonl").write_text(sidecar_text, encoding="utf-8")
665
+ (data_dir / f"{SOURCE_NAME}.sample.jsonl").write_text(sample_text, encoding="utf-8")
666
+ write_json(data_dir / f"{SOURCE_NAME}.stats.json", stats)
667
+ write_json(data_dir / f"{SOURCE_NAME}.license-evidence.json", {
668
+ "status": "documented-open-cc0",
669
+ "license": SOURCE_LICENSE,
670
+ "official_dataset": UPSTREAM_URL,
671
+ "official_dataset_id": UPSTREAM_DATASET_ID,
672
+ "upstream_release": UPSTREAM_VERSION,
673
+ "upstream_release_date": UPSTREAM_RELEASE_DATE,
674
+ "pinned_access_mirror": f"hf://datasets/{MIRROR_REPOSITORY}@{MIRROR_REVISION}/{SOURCE_PARQUET_PATH}",
675
+ "source_parquet_sha256": SOURCE_PARQUET_SHA256,
676
+ "source_parquet_size": SOURCE_PARQUET_SIZE,
677
+ "spdx": "https://spdx.org/licenses/CC0-1.0.html",
678
+ "creative_commons": "https://creativecommons.org/publicdomain/zero/1.0/",
679
+ "finding": "The official dataset page and pinned mirror identify the release as CC0-1.0.",
680
+ "review_scope": "dataset-level license metadata; not independent legal advice",
681
+ })
682
+ (data_dir / f"{SOURCE_NAME}.md").write_text(datasheet(stats), encoding="utf-8")
683
+ (data_dir / "NOTICE.md").write_text(
684
+ "# Attribution and provenance\n\nSource: Mozilla Data Collective, Common Voice "
685
+ f"Scripted Speech {UPSTREAM_VERSION} - Polish (`{UPSTREAM_DATASET_ID}`). "
686
+ f"License: `{SOURCE_LICENSE}`. Text-only preparation: Piotr Styla.\n",
687
+ encoding="utf-8",
688
+ )
689
+
690
+ artifact_digests = {
691
+ "parquet_sha256": sha256_file(pr_parquet),
692
+ "attribution_sha256": sha256_file(pr_root / "data" / SOURCE_NAME / f"{SOURCE_NAME}.attribution.jsonl"),
693
+ "stats_sha256": sha256_file(pr_root / "data" / SOURCE_NAME / f"{SOURCE_NAME}.stats.json"),
694
+ "license_evidence_sha256": sha256_file(pr_root / "data" / SOURCE_NAME / f"{SOURCE_NAME}.license-evidence.json"),
695
+ "sample_sha256": sha256_file(pr_root / "data" / SOURCE_NAME / f"{SOURCE_NAME}.sample.jsonl"),
696
+ }
697
+ language_audit = None
698
+ if args.language_audit:
699
+ language_audit = json.loads(args.language_audit.read_text(encoding="utf-8"))
700
+ for root in (hf_root, pr_root):
701
+ shutil.copy2(args.language_audit, root / "artifacts" / f"{SOURCE_NAME}_language_audit.json")
702
+ artifact_digests["language_audit_sha256"] = sha256_file(args.language_audit)
703
+ manifest = build_manifest(
704
+ stats, artifact_digests, args.payload_revision, args.target_revision,
705
+ run_id, run_at, script_sha256, language_audit,
706
+ )
707
+ for root in (hf_root, pr_root):
708
+ write_json(root / "artifacts" / f"{SOURCE_NAME}_ontology_manifest.json", manifest)
709
+ shutil.copy2(script_path, root / "src" / "fetch_common_voice_pl.py")
710
+ (hf_root / "README.md").write_text(dataset_card(stats, args.payload_revision), encoding="utf-8")
711
+ (pr_root / "src" / "sources.py").write_text(update_registry(registry), encoding="utf-8")
712
+ (pr_root / "src" / "test_common_voice_pl_contract.py").write_text(contract_test(), encoding="utf-8")
713
+ write_json(args.output / "build_summary.json", {"stats": stats, "artifact_digests": artifact_digests, "payload_revision": args.payload_revision})
714
+ return stats
715
+
716
+
717
+ def main() -> int:
718
+ parser = argparse.ArgumentParser(description=__doc__)
719
+ parser.add_argument("--target-registry", type=pathlib.Path, required=True)
720
+ parser.add_argument("--target-revision", required=True)
721
+ parser.add_argument("--payload-revision", required=True)
722
+ parser.add_argument("--output", type=pathlib.Path, required=True)
723
+ parser.add_argument("--language-audit", type=pathlib.Path)
724
+ parser.add_argument("--added-date", default="2026-09-05")
725
+ parser.add_argument("--run-at", default="2026-09-05T12:00:00Z")
726
+ args = parser.parse_args()
727
+ stats = build(args)
728
+ print(json.dumps(stats, ensure_ascii=False, indent=2, sort_keys=True))
729
+ return 0
730
+
731
+
732
+ if __name__ == "__main__":
733
+ raise SystemExit(main())
src/sources.py CHANGED
@@ -462,6 +462,29 @@ SOURCES = {
462
  # so the global ADDED stamp does not overwrite the real add date.
463
  "custom_datasheet": True,
464
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
465
  "global_voices": {
466
  "added": "2026-07-15",
467
  "release": "0.2.3",
 
462
  # so the global ADDED stamp does not overwrite the real add date.
463
  "custom_datasheet": True,
464
  },
465
+ "common_voice_pl": {
466
+ "added": "2026-09-05",
467
+ "release": None,
468
+ "file_key": "common_voice_pl",
469
+ "pretty": "Mozilla Common Voice Polish validated sentences (v26.0)",
470
+ "license": "CC0-1.0",
471
+ "license_spdx": "CC0-1.0",
472
+ "traceable": "Mozilla Data Collective distributes Common Voice Scripted Speech "
473
+ "26.0 under CC0-1.0 (license field of the dataset record at the "
474
+ "origin); this text-only projection retains only sentences associated "
475
+ "with validated recordings. MDC Terms of Use prohibit re-identification "
476
+ "of contributors - carried to downstream users in the datasheet.",
477
+ "upstream": "https://mozilladatacollective.com/datasets/cmqinmu2a00winq07gyrtri0q",
478
+ "provenance": "Official Mozilla dataset cmqinmu2a00winq07gyrtri0q, accessed through "
479
+ "the pinned row-normalized HF mirror "
480
+ "Peacockery/common-voice-scripted-speech-26@b4d8b94d. Sentence-level "
481
+ "units (median 56 chars) - see the unit note in the datasheet. Pattern "
482
+ "filters only - re-run through SlayerLab/NERGAL before release.",
483
+ "domain": "spoken/scripted contemporary sentences",
484
+ "created": "2026-06-12",
485
+ "is_ocr": False,
486
+ "custom_datasheet": True,
487
+ },
488
  "global_voices": {
489
  "added": "2026-07-15",
490
  "release": "0.2.3",
src/test_common_voice_pl_contract.py ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Contract checks for the common_voice_pl contribution."""
2
+
3
+ import hashlib
4
+ import json
5
+ from pathlib import Path
6
+
7
+ import pyarrow.parquet as pq
8
+
9
+
10
+ ROOT = Path(__file__).resolve().parents[1]
11
+ DATA = ROOT / "data" / "common_voice_pl"
12
+ MANIFEST = ROOT / "artifacts" / "common_voice_pl_ontology_manifest.json"
13
+
14
+
15
+ def sha256_file(path):
16
+ digest = hashlib.sha256()
17
+ with path.open("rb") as stream:
18
+ for chunk in iter(lambda: stream.read(1024 * 1024), b""):
19
+ digest.update(chunk)
20
+ return digest.hexdigest()
21
+
22
+
23
+ def test_schema_and_counts():
24
+ parquet = DATA / "common_voice_pl.parquet"
25
+ stats = json.loads((DATA / "common_voice_pl.stats.json").read_text(encoding="utf-8"))
26
+ table = pq.read_table(parquet)
27
+ assert table.column_names == ['id', 'text', 'source', 'added', 'created', 'token_count', 'license', 'author']
28
+ assert table.num_rows == stats["kept"]
29
+ assert len(set(table.column("id").to_pylist())) == table.num_rows
30
+ assert len(set(table.column("text").to_pylist())) == table.num_rows
31
+ assert set(table.column("source").to_pylist()) == {"common_voice_pl"}
32
+ assert set(table.column("license").to_pylist()) == {"CC0-1.0"}
33
+
34
+
35
+ def test_privacy_and_sidecars():
36
+ stats = json.loads((DATA / "common_voice_pl.stats.json").read_text(encoding="utf-8"))
37
+ sidecar = DATA / "common_voice_pl.attribution.jsonl"
38
+ sample = DATA / "common_voice_pl.sample.jsonl"
39
+ lines = [json.loads(line) for line in sidecar.read_text(encoding="utf-8").splitlines()]
40
+ assert len(lines) == stats["kept"]
41
+ assert len(sample.read_text(encoding="utf-8").splitlines()) == min(20, stats["kept"])
42
+ forbidden = {"client_id", "age", "gender", "accents", "path", "audio"}
43
+ assert all(not (forbidden & set(item)) for item in lines)
44
+
45
+
46
+ def test_manifest_and_checksums():
47
+ manifest = json.loads(MANIFEST.read_text(encoding="utf-8"))
48
+ required = {"object", "version", "protocol", "run", "relations", "evidence", "claims", "claim_evidence", "actors", "attestations"}
49
+ assert required <= set(manifest)
50
+ assert manifest["ontology_version"] == "slayer.ai/research-ontology/v0.1"
51
+ assert manifest["version"]["payload_uri"].startswith("hf://datasets/PiotrSty/common-voice-pl-text@")
52
+ evidence = {item["observation_type"]: item["payload"] for item in manifest["evidence"]}
53
+ checksums = evidence["artifact_checksums"]
54
+ expected = {
55
+ "parquet_sha256": DATA / "common_voice_pl.parquet",
56
+ "attribution_sha256": DATA / "common_voice_pl.attribution.jsonl",
57
+ "stats_sha256": DATA / "common_voice_pl.stats.json",
58
+ "license_evidence_sha256": DATA / "common_voice_pl.license-evidence.json",
59
+ "sample_sha256": DATA / "common_voice_pl.sample.jsonl",
60
+ }
61
+ if "language_audit_sha256" in checksums:
62
+ expected["language_audit_sha256"] = ROOT / "artifacts" / "common_voice_pl_language_audit.json"
63
+ assert {key: sha256_file(path) for key, path in expected.items()} == checksums