wiktionary_examples: drop quoted third-party lines, relabel CC BY-SA 4.0

#50
by ppuzio - opened
Fabryka AI org
•
edited 6 days ago

What changes

Rebuild of wiktionary_examples from the official dump plwiktionary-20261001-pages-articles.xml.bz2 (sha1 a097f6e2…). Usage-example lines that quote a third-party work are dropped. They are used on Wiktionary under the Art. 29 quotation right, which does not pass to a corpus, and the contributors' CC BY-SA grant does not cover them.

example line lines released
carries {{źródło}} or a <ref> 32,664 no
names its source by hand: "(z Internetu)", "(B. Prus: Lalka)", "(Wikipedia)", "(Mt 4:19)", or an excerpt "(…)" 319 no
under 10 characters 50 no
contributor's own example 45,212 yes, if its entry reaches 200 chars
  • Licence relabelled CC-BY-SA-3.0 → CC-BY-SA-4.0. Basis: Wikimedia Terms of Use and the pl.wiktionary footer (read 2026-10-05); pre-June-2023 text via 3.0 §4(b). This rests on our reading of 3.0 §4(b); it is on the lawyer's question list (E1), pending the opinion.
  • Attribution: author = Wikisłownik contributors, <page URL> (BY-SA 4.0 §3(a)(2)); id = wiktionary_examples_<page id> (preserve_id).
  • Fetcher fix: the {{przykłady}} block ended at any inline template such as {{tłum}}, hiding later lines. It is now anchored to line start.
  • Audit side-car (wiktionary_examples.citations.jsonl, not shipped) records the source of every dropped line, including <ref> bodies with {{NKJP}}, {{cytuj}} and similar. 199 lines carry a marker with no source text.
  • Files: fetcher and its unit tests, test_wiktionary_examples_contract.py (schema, ids, licence, author URL, no quotation marker in released text, quotation sample matches the release), sources.py entry, datasheet, license-evidence.json, quotation-sample.jsonl, source_findings.md entry.

Effect

v0.2.5 this PR
documents 8,639 1,818
characters 2,889,761 534,521
tokens (cl100k proxy) 1,115,820 207,181

Most of the drop is the 200-character document gate: 29,265 of 31,094 entries with a kept example fall under it once quotations are gone. The gate is kept (decided 2026-10-05; polish-dynaword-v2 issue 48 closed).

Not caught

Quotations pasted with no source marker cannot be filtered. To measure them, 100 random released lines (seed 20261005, of 7,749) were searched on the web as exact phrases:

result lines
only on Wiktionary or sites that republish it 44
not found 41
too short or common for a match to mean copying 13
copied from Wiktionary (2017 forum post; on Wiktionary since 2007) 1
paraphrase of a 2014 news quote, not verbatim 1
copied from another source 0

0 of 100 puts unmarked quotations below 3.7% of lines (95%, Wilson). Unindexed print cannot match. Results per line: wiktionary_examples.quotation-sample.jsonl. test_quotation_sample_matches_the_release redraws the sample from the parquet, so a rebuild forces a new sample. The source is kept (decided 2026-10-05).

Sample row 2 below ("biomasa") reads like encyclopedic text. Both of its lines were searched separately. The four closest pages (cdr.gov.pl 2008, Szufa 2012 PDF, ekologia.pl, reo.pl) define biomass in different words, and none has either sentence.

Sample (python3 src/render_sample.py data/wiktionary_examples/wiktionary_examples.parquet -n 3)

id: wiktionary_examples_781073
source: wiktionary_examples
added: 2026-07-19
created: 2004-03-22, 2026-10-01
token_count: 89
license: CC-BY-SA-4.0
author: Wikisłownik contributors, https://pl.wiktionary.org/wiki/%C5%9Bwisn%C4%85%C4%87

Wiatr świsnął w szczelinach okna.
Jakiś spłoszony ptak świsnął nagle w powietrzu.
W tłumie ktoś ci może świsnąć portfel lub dokumenty.
Jak cię zaraz świsnę w ucho, to będziesz widział!
Lisica świsnęła do zagajnika.
id: wiktionary_examples_189020
source: wiktionary_examples
added: 2026-07-19
created: 2004-03-22, 2026-10-01
token_count: 117
license: CC-BY-SA-4.0
author: Wikisłownik contributors, https://pl.wiktionary.org/wiki/biomasa

Tutaj także intensywnie rozwija się badanie przekształcania biomasy w alkohol i technologia całkowitego zgazowania i pirolizy biomasy, podczas których uzyskuje się olej, gaz i węgiel drzewny.
Biomasa to wspólna nazwa dla całej materii organicznej, która powstaje w procesie fotosyntezy roślin przy wykorzystaniu słońca jako źródła energii.
id: wiktionary_examples_4656
source: wiktionary_examples
added: 2026-07-19
created: 2004-03-22, 2026-10-01
token_count: 97
license: CC-BY-SA-4.0
author: Wikisłownik contributors, https://pl.wiktionary.org/wiki/tak

Nie idź tak szybko, nie mogę za tobą nadążyć!
Ach, te góry są tak piękne!
Zrób tak, jak mówię!
Zrób to tak: kup jej kwiaty, przygotuj kolację, a potem się oświadcz.
Pytasz, czy telewizor jest zepsuty? Tak, zepsuł się wczoraj.

Decision record

polish-dynaword-v2/repo_patch_suggestions/decisions/wiktionary_examples.yaml has been updated locally, uncommitted: the new evidence lines and the v0.2.6 rationale.

pytest src/: 279 passed (src/test_parlamint_contract.py ignored: it is untracked and imports a missing module).

🤖 Generated with Claude Code

ppuzio changed pull request status to open
ppuzio changed pull request title from wiktionary_examples: drop cited example lines (WIP) to wiktionary_examples: drop quoted third-party lines, relabel CC BY-SA 4.0
ppuzio changed pull request status to merged
ppuzio deleted the refs/pr/50 ref

Sign up or log in to comment