polish-dynaword / data /nonsa /nonsa.md
ppuzio's picture
nonsa: drop namespace 100 Cytaty and <poem> pages (12,304 -> 11,692 docs, v0.2.6 rights audit) (#73)
9bdf1f9
|
Raw History Blame Contribute Delete
5.98 kB
# Nonsensopedia - Polish satirical wiki (content namespaces) - CC BY-SA 3.0
This slice is rebuilt deterministically from the pinned wikiteam3 dump
`nonsa.pl-20251009-history.xml.zst`
(https://archive.org/details/wiki-nonsa.pl-20251009, sha1-verified). Scope is the content namespaces:
0 (articles), 102 (NonNews), 104 (NonZrodla), 106 (Slownik), 108 (Gra),
110 (Forum), 114 (Poradnik); the latest revision of each page. Namespace 100 (Cytaty)
and every page whose wikitext has a `<poem>` block are dropped (see "Rights gate").
Nonsensopedia is the Polish satirical encyclopedia - informal, humorous,
creative Polish covering parody reference text, fake news, forum
discussions and interactive games - a register absent from the corpus.
- Non-redirect content pages enumerated: 26,781
- Source slice retained after QA/dedup and the rights gate: 11,692 (15,089 rejected: 14,425 too little text after stripping, 27 non-Polish, 23 low letter ratio, 1 near duplicate, 1 too little text after redaction, 287 namespace 100 Cytaty, 325 `<poem>` block)
- Proposed records: 11,692
- Proposed tokens: 15,439,683 (`cl100k_base` proxy)
- Characters: 40,567,986
- Before the rights gate the shard had 12,304 records, 16,883,883 tokens and 44,279,318 characters; the other 11,692 records are unchanged.
- Earlier upstream build (made before the rights gate, so it still contains namespace 100 and `<poem>` pages; this shard is not taken from it): https://huggingface.co/datasets/PiotrSty/nonsa-pl/tree/09f62dc3826159dbc8c0df7a95243a18ec52abda
## License
CC BY-SA 3.0 per record, the site license of nonsa.pl. Where that is stated at the origin:
- archive.org item page https://archive.org/details/wiki-nonsa.pl-20251009, "License" field
(machine-readable in https://archive.org/metadata/wiki-nonsa.pl-20251009: `licenseurl:
http://creativecommons.org/licenses/by-sa/3.0/`, `rights: Creative Commons Attribution-ShareAlike 3.0`);
- the wiki's own `rightsinfo`, captured by WikiTeam at dump time in
https://archive.org/download/wiki-nonsa.pl-20251009/nonsa.pl-20251009-dumpMeta/siteinfo.json
(`{"text": "Creative Commons Attribution-ShareAlike 3.0", "url": "http://creativecommons.org/licenses/by-sa/3.0/"}`,
MediaWiki 1.37.6, sitename Nonsensopedia).
Attribution is per record via the canonical page URL (`nonsa.attribution.jsonl`); each page's
history lists its contributors. The licence covers what the contributors wrote; it does not
extend to third-party works quoted on a page (see "Rights gate").
## Rights gate
Two rules, both in `src/build_nonsa_pl.py` (`third_party_drop`), applied after the QA and
dedup gates so that no other page's decision changes. The dropped pages are listed with their
namespace, title and reason in `nonsa.dropped.jsonl` (612 rows); the parquet carries neither.
- Namespace 100 (Cytaty): 287 pages, 440,332 tokens. These pages are collections of quotations
from third-party films, games, songs, performers and public figures. Dropped, since the site
licence does not cover the quoted works.
- `<poem>` block: 325 pages, 1,003,868 tokens. `<poem>` marks verse and lyrics, which may be
third-party works. The tag is read from the raw wikitext in `acquire` (`has_poem_block`),
because `strip_wikitext` removes it; a `<poem>` that is only mentioned inside an HTML comment,
`<nowiki>` or `<pre>` does not count (two forum pages are kept for that reason). The tag is
also used for dialogues, jokes, game logs and quoted forum posts, so the rule drops those
pages too. That over-matching is deliberate: telling third-party verse from contributor verse
and from plain formatting needs a per-page review. A page in both rules is counted under 100.
Not covered by the gate: quotations embedded in retained pages. 3,293 retained pages (28.2%)
call a `{{cytat}}`, `{{cytat2}}` or `{{cquote}}` template (the non-nested calls hold about 0.80M
wikitext characters, about 1.7% of the retained pages' wikitext), 23 use `<blockquote>`, and
lyrics typed as plain text are not detected. These have not been reviewed.
## Processing
Per-record page id, title, namespace, last-revision timestamp and canonical URL
are preserved; page history is the contributor-attribution trail. Wikitext is
stripped with mwparserfromhell (`strip_wikitext` in `src/build_nonsa_pl.py`). Before
`strip_code()`, category links (`[[Kategoria:…]]`) are removed and file links
(`[[Plik:…]]`, `Grafika:`, `File:`, `Image:`) are replaced by their caption only (the
last non-option parameter; `thumb`, `200px`, `right`, `alt=`… are dropped); inline
`[[:Kategoria:…]]` links keep their text. The same rule is re-applied to links left
verbatim in the output because malformed markup (e.g. an unclosed `''` in a caption) made
the parser read them as text. Magic words (`__NOTOC__` etc.) are removed. After this, 2 of
11,692 records still contain a `NNpx|` option string and 103 a literal `{{` (templates
with unbalanced braces in the source wikitext); both are left as-is. Lines occurring in >=1% of documents are removed
as cross-document boilerplate; emails, labelled phones, IP literals, labelled
national identifiers and 26-digit account candidates are redacted (pattern
redaction is not complete anonymization); exact and near deduplication applied
within source.
## PII
Scrubber: in-build pattern redaction only (emails, labelled phones, IPv4/IPv6 literals,
labelled PESEL/NIP/REGON, 26-digit account candidates; counts in `nonsa.qa.json`).
[SlayerLab/NERGAL](https://huggingface.co/SlayerLab/NERGAL) has **not** been run. This
source stays at `release: None` until the shard is re-run through NERGAL.
## Limitations
Deliberately non-factual register (satire, parody of real
Wikipedia/cultural material); quoted passages are not guaranteed disjoint
from other corpus shards. Embedded `{{cytat}}`/`<blockquote>` quotations and plain-text
lyrics are not screened (see "Rights gate"). Record model is a whole content page;
individual entries are not split.