Datasets:
|
Download README.md from agentlans/gutenberg-chunk-classification: direct link, hf CLI and curl.
- Browser
- Download file 6.91 kB
-
https://huggingface.co/datasets/agentlans/gutenberg-chunk-classification/resolve/main/README.md
- Command line
-
hf download hf://datasets/agentlans/gutenberg-chunk-classification/README.md
-
curl -L -o README.md https://huggingface.co/datasets/agentlans/gutenberg-chunk-classification/resolve/main/README.md
6.91 kB
| license: cc-by-4.0 | |
| task_categories: | |
| - text-classification | |
| language: | |
| - en | |
| - fr | |
| - fi | |
| - es | |
| - de | |
| - it | |
| - nl | |
| - pt | |
| - hu | |
| - la | |
| tags: | |
| - project-gutenberg | |
| - text-segmentation | |
| - functional-classification | |
| - synthetic-labels | |
| - qwen | |
| size_categories: | |
| - 10K<n<100K | |
| # Project Gutenberg Chunk Classification | |
| A curated dataset containing random text chunks (blocks of contiguous lines) sampled from diverse Project Gutenberg `*.txt` files. Each chunk is automatically annotated using **Qwen3.5 4B** to determine its functional/literary category, language, text quality, and completeness. | |
| This dataset is designed for research and training in text block segmentation, functional role classification (e.g., distinguishing narrative prose from dialogue, headings, footnotes, or poetry), and data quality filtering. | |
| ## Dataset Structure | |
| ### Data Fields | |
| Each row in the dataset contains the following fields: | |
| * `id`: Unique UUIDv4 identifier for the chunk. | |
| * `text`: The raw text string (contiguous block of lines from a Gutenberg source). | |
| * `label`: The functional/literary category of the text block. | |
| * `language`: ISO 639-1 language code (e.g., `en`, `de`, `fr`) identified for the primary language. | |
| * `text_quality`: Assessment of extraction cleanliness (`clean`, `minor_corruption`, `severe_corruption`). | |
| * `completeness`: Indication of whether the chunk forms a complete unit (`complete`, `fragment`, `uncertain`). | |
| ### Example Row | |
| ```json | |
| { | |
| "id": "e0457c87-c127-45ea-beaf-fffe15b4f46d", | |
| "text": "Dazu noch die Angaben in No. 1 (S. 67), No. 60, 62, 63, ferner No.\n66, 70, 98a, 100a und 105 (S. 130 und 132).", | |
| "label": "HEADING", | |
| "language": "de", | |
| "text_quality": "clean", | |
| "completeness": "complete" | |
| } | |
| ``` | |
| ## Annotation Methodology | |
| The dataset was annotated using **Qwen3.5 4B** enforcing strict JSON output constraints. | |
| <details> | |
| <summary>Click here for the complete prompt.</summary> | |
| ```text | |
| Classify the supplied text into exactly ONE category. | |
| Identify the primary function and literary form of the text. Do not classify based solely on individual words, language, formatting, or sentence length. | |
| ## CATEGORIES | |
| - **NARRATIVE**: Ordinary prose, including narration, descriptions, exposition, essays, arguments, historical accounts, scientific writing, and reflective writing. | |
| - **DIALOGUE**: Conversations, spoken exchanges, interviews, transcripts, and dramatic speech presented as spoken language. | |
| - **VERSE**: Poetry and intentionally lineated literary writing, including blank verse, free verse, metrical verse, verse drama, and poetic soliloquies. Rhyme is not required. | |
| - **HEADING**: Chapter, section, subsection, and internal document headings. | |
| - **TITLE**: Titles of books and other complete works, author names, and publication credits. | |
| - **CAPTION**: Captions and labels associated with illustrations, photographs, figures, tables, and diagrams. | |
| - **LIST**: Lists, enumerations, indexes, catalogues, dictionaries, glossaries, and bibliographic entries. | |
| - **FOOTNOTE**: Footnotes, endnotes, source notes, and explanatory references. | |
| - **INSTRUCTION**: Recipes, procedures, operating directions, and practical step-by-step guidance. | |
| - **JUNK**: Unusable OCR, meaningless fragments, and extraction artifacts that cannot reasonably be assigned another category. | |
| ## CLASSIFICATION RULES | |
| 1. Classify according to the primary function of the text. | |
| 2. Language does not determine category. Apply the same categories to all languages. | |
| 3. Use NARRATIVE for ordinary continuous prose, including literary prose. | |
| 4. Use DIALOGUE for text primarily representing spoken communication. | |
| 5. Use VERSE for poetry and intentionally lineated literary compositions, including unrhymed poetry and blank verse. | |
| 6. A soliloquy written in verse is VERSE. A soliloquy written as ordinary spoken prose is DIALOGUE. | |
| 7. Quoted speech within ordinary narration does not automatically make the passage DIALOGUE. | |
| 8. A narrative poem is VERSE, not NARRATIVE. | |
| 9. Numbered entries and enumerations are generally LIST, not FOOTNOTE. | |
| 10. Distinguish TITLE from HEADING: | |
| - TITLE identifies a complete work or publication. | |
| - HEADING identifies a section within a work. | |
| 11. Use INSTRUCTION only when the text directs someone to perform actions or follow a procedure. Descriptions of actions are NARRATIVE. | |
| 12. Do not classify text as JUNK merely because it is short, incomplete, archaic, poorly formatted, or written in unfamiliar language. | |
| 13. Archaic spelling, historical vocabulary, and unusual grammar are not corruption. | |
| 14. When a passage contains multiple features, select the category representing its dominant function. | |
| 15. If uncertain, choose the most plausible category. Do not default to JUNK. | |
| ## TEXT QUALITY | |
| Select exactly ONE: | |
| - **clean**: Readable and substantially intact. | |
| - **minor_corruption**: Mostly readable, with occasional OCR errors, missing characters, incorrect spacing, or minor extraction defects. | |
| - **severe_corruption**: Extensive OCR errors, missing or garbled text, or extraction defects that substantially interfere with interpretation. | |
| Do not confuse historical spelling or typography with corruption. | |
| ## COMPLETENESS | |
| Select exactly ONE: | |
| - **complete**: Forms an apparently complete unit, such as a paragraph, poem, heading, list entry, dialogue exchange, or note. | |
| - **fragment**: Visibly incomplete, such as a sentence cut off mid-thought or an incomplete extraction. | |
| - **uncertain**: Insufficient evidence to determine completeness. | |
| A passage does not need to be a complete chapter or document to qualify as complete. | |
| ## LANGUAGE | |
| Return the ISO 639-1 language code of the primary language (for example, "en", "fr", "de", "es"). | |
| Use "unknown" only when the language cannot be reliably identified. | |
| For mixed-language text, identify the predominant language. | |
| ## OUTPUT | |
| Return ONLY valid JSON. | |
| Use exactly these five keys and no others: | |
| { "label": "NARRATIVE", "language": "en", "text_quality": "clean", "completeness": "complete" } | |
| Do not provide explanations, confidence scores, additional fields, or Markdown formatting. | |
| TEXT: | |
| {{TEXT}} | |
| ``` | |
| </details> | |
| ## Limitations & Considerations | |
| * **Local Context:** Chunks are sampled independently without broader document context. Highly ambiguous passages (e.g., poetic prose or prose-like verse) can occasionally lead to classification ambiguity (such as distinguishing whether a dramatic soliloquy is classified as narrative, dialogue, or verse). | |
| * **Weak Labels:** Labels are generated via model distillation (Qwen3.5 4B) and may contain occasional annotation artifacts or noise. | |
| * **Corpus Bias:** Sourced exclusively from Project Gutenberg texts, meaning the language distribution leans heavily toward historical and classical literature. | |
| ## License | |
| This dataset is released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. | |