feat(data): add wiktionary_examples (8.6k docs / 1.12M tok)

#14
Slayer Labs org

New source: wiktionary_examples — usage examples from Polish Wiktionary

Adds a new source: sentences illustrating word senses in Polish-language
entries of pl.wiktionary.org.

8,639 documents / 1,115,820 tokens / 2,889,761 characters. CC-BY-SA-3.0.

Modest in volume, but it supplies a register the corpus needs: contemporary,
hand-written Polish sentences with a clear licence and a public edit history.

What is included

One document per headword; all examples for that headword are concatenated,
newline-separated, in source order. Definitions, inflection tables,
etymologies, translations and non-Polish entries are excluded.

stage documents
Polish entries in the dump 115,359
entries with at least one example 51,578
after the 200-character threshold 9,120
after exact-duplicate removal 8,639

Reproducible via src/fetch_wiktionary_examples.py, which parses the official
Wikimedia dump directly. Re-running it reproduces exactly the same build input.

Departure from registry convention — decision requested

This is the first source not obtained through SpeakLeash's redistribution.
It is parsed directly from dumps.wikimedia.org. The per-source provenance
field, already supported by make_docs.py, handles this correctly — the
datasheet states the real origin.

The general prose in README.md, however, still attributes all underlying
material to SpeakLeash as intermediate aggregator (the docstring in
sources.py says the same). That is no longer strictly accurate. Not changed
in this PR — raised for a maintainer decision.

Known limitations (documented, not defects)

  • Documents are bundles of unrelated sentences. Examples within a single
    document illustrate different senses of the same headword and have no
    discourse continuity — the document for czytać moves from reading a
    newspaper, through reading a map, to reading a floppy disk. The individual
    sentences are well-formed; the document as a whole is not coherent prose.
  • Documents are short by nature. Mean length 334 characters. 82% of
    entries with examples fall below the 200-character threshold and are dropped.
  • Short literary quotations are embedded in the text. 3,630 entries carry
    a {{źródło}} attribution template; the fetch script strips it from the text
    and writes it to a separate audit file. The quotations are single sentences,
    contributed under CC-BY-SA-3.0 and within quotation rights — but this source
    is not entirely original composition by editors.
  • Cross-source dedup will not detect those quotations. The build hashes the
    full document; because documents concatenate several sentences, a quotation
    also present in wolne_lektury or wikisource produces no hash collision.
  • The reported 481 refers to intra-source duplicates, not cross-source
    ones.
    Wiktionary repeats the same example across related headwords —
    aspectual pairs, spelling variants, close synonyms. The datasheet label reads
    "exact cross-source dedup", which is misleading in this case.
  • Square brackets are preserved deliberately. […] marks an omission and
    [= gloss] an editorial insertion within a quotation — philological
    convention, not leftover wiki markup.
  • Sense numbering has been dropped, since definitions are not part of the
    source.

Files

  • src/fetch_wiktionary_examples.py
  • src/sources.py
  • data/wiktionary_examples/wiktionary_examples.parquet
  • data/wiktionary_examples/wiktionary_examples.stats.json
  • data/wiktionary_examples/wiktionary_examples.md
kacperwikiel changed pull request status to merged

Sign up or log in to comment