tomekceszke/polish-punctuation-corpus
Polish Punctuation Corpus (Wolne Lektury) Word-level punctuation labels extracted from 11 Polish literary works, built to train tomekceszke/polish-punctuation-restorer. Each row is one word and the mark that followed it in the original text. Column Type Meaning word string Lower-cased token, punctuation removed label int 1 = nothing follows, 2 = comma, 3 = period from datasets import load_dataset ds = load_dataset("tomekceszke/polish-punctuation-corpus")… See the full description on the dataset page: https://huggingface.co/datasets/tomekceszke/polish-punctuation-corpus.
Polish Punctuation Corpus (Wolne Lektury)
Word-level punctuation labels extracted from 11 Polish literary works, built to train tomekceszke/polish-punctuation-restorer.
Each row is one word and the mark that followed it in the original text.
from datasets import load_dataset
ds = load_dataset("tomekceszke/polish-punctuation-corpus")
ds["train"][0] # {'word': 'chłopi', 'label': 1}Splits
The split is by document, never by sentence — no phrase can leak from training into evaluation.
Label distribution
Heavily imbalanced, which is the central difficulty of the task: four out of five words are followed by nothing at all.
Any model trained on this without class weighting will learn to predict 1 and stop there.
How it was built
Raw .txt files from Wolne Lektury go through `src/preprocess.m`:
- Lower-case the whole text.
- Strip every character except Polish letters (
a-ząćęłńóśźż), whitespace,,and.. - Split on whitespace.
- Take one trailing
,or.off each token; that mark becomes the label.
Only commas and periods are modelled. Question marks, exclamation marks and semicolons are removed in step 2 and become NONE.
Known artefact
Step 4 removes exactly one trailing mark, so an ellipsis (… written as ...) leaves a residue: "co.." labelled as PERIOD. About 2% of tokens carry such a leftover character. The corpus is published as it is, because this is the exact data the released model was trained on.
Sources and licences
Every text comes from Wolne Lektury and is either in the public domain or released under the Free Art License 1.3 — the modern translations included, which the foundation commissioned and published under that licence.
Train
Validation
Test
Chłopi and Lalka are used as excerpts; the rest are complete texts. The Wolne Lektury Foundation reserves the rights to its critical editions under art. 99(2) of the Polish Copyright Act — this corpus uses the plain text only. Terms of use: <https://wolnelektury.pl/info/zasady-wykorzystania/>
Links
- Model trained on this: tomekceszke/polish-punctuation-restorer
- Code: <https://github.com/tomekceszke/polish-punctuation-restorer>
- Project page: <https://tomek.ceszke.com/polish-punctuation-restorer/>
