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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- text-classification
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
- fr
|
| 8 |
+
- fi
|
| 9 |
+
- es
|
| 10 |
+
- de
|
| 11 |
+
- it
|
| 12 |
+
- nl
|
| 13 |
+
- pt
|
| 14 |
+
- hu
|
| 15 |
+
- la
|
| 16 |
+
tags:
|
| 17 |
+
- project-gutenberg
|
| 18 |
+
- text-segmentation
|
| 19 |
+
- functional-classification
|
| 20 |
+
- synthetic-labels
|
| 21 |
+
- qwen
|
| 22 |
+
size_categories:
|
| 23 |
+
- 10K<n<100K
|
| 24 |
---
|
| 25 |
+
|
| 26 |
+
# Project Gutenberg Chunk Classification
|
| 27 |
+
|
| 28 |
+
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.
|
| 29 |
+
|
| 30 |
+
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.
|
| 31 |
+
|
| 32 |
+
## Dataset Statistics
|
| 33 |
+
|
| 34 |
+
The dataset has been stratified by label and split into train and test sets:
|
| 35 |
+
|
| 36 |
+
| Label | Train | Test | Total | Percentage |
|
| 37 |
+
|-------|-------|------|-------|------------|
|
| 38 |
+
| **NARRATIVE** | 15,387 | 3,847 | 19,234 | 45.8% |
|
| 39 |
+
| **DIALOGUE** | 8,462 | 2,116 | 10,578 | 25.2% |
|
| 40 |
+
| **TITLE** | 2,578 | 645 | 3,223 | 7.7% |
|
| 41 |
+
| **VERSE** | 2,431 | 608 | 3,039 | 7.2% |
|
| 42 |
+
| **LIST** | 1,955 | 489 | 2,444 | 5.8% |
|
| 43 |
+
| **HEADING** | 1,231 | 307 | 1,538 | 3.7% |
|
| 44 |
+
| **FOOTNOTE** | 651 | 162 | 813 | 1.9% |
|
| 45 |
+
| **INSTRUCTION** | 380 | 95 | 475 | 1.1% |
|
| 46 |
+
| **CAPTION** | 375 | 94 | 469 | 1.1% |
|
| 47 |
+
| **JUNK** | 164 | 41 | 205 | 0.5% |
|
| 48 |
+
| **Total** | **33,614** | **8,404** | **42,018** | **100%** |
|
| 49 |
+
|
| 50 |
+
## Dataset Structure
|
| 51 |
+
|
| 52 |
+
### Data Fields
|
| 53 |
+
|
| 54 |
+
Each row in the dataset contains the following fields:
|
| 55 |
+
|
| 56 |
+
* `id`: Unique UUIDv4 identifier for the chunk.
|
| 57 |
+
* `text`: The raw text string (contiguous block of lines from a Gutenberg source).
|
| 58 |
+
* `label`: The functional/literary category of the text block.
|
| 59 |
+
* `language`: ISO 639-1 language code (e.g., `en`, `de`, `fr`) identified for the primary language.
|
| 60 |
+
* `text_quality`: Assessment of extraction cleanliness (`clean`, `minor_corruption`, `severe_corruption`).
|
| 61 |
+
* `completeness`: Indication of whether the chunk forms a complete unit (`complete`, `fragment`, `uncertain`).
|
| 62 |
+
|
| 63 |
+
### Example Row
|
| 64 |
+
|
| 65 |
+
```json
|
| 66 |
+
{
|
| 67 |
+
"id": "e0457c87-c127-45ea-beaf-fffe15b4f46d",
|
| 68 |
+
"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).",
|
| 69 |
+
"label": "HEADING",
|
| 70 |
+
"language": "de",
|
| 71 |
+
"text_quality": "clean",
|
| 72 |
+
"completeness": "complete"
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## Annotation Methodology
|
| 78 |
+
|
| 79 |
+
The dataset was annotated using **Qwen3.5 4B** enforcing strict JSON output constraints.
|
| 80 |
+
|
| 81 |
+
<details>
|
| 82 |
+
<summary>Click here for the complete prompt.</summary>
|
| 83 |
+
|
| 84 |
+
```text
|
| 85 |
+
Classify the supplied text into exactly ONE category.
|
| 86 |
+
|
| 87 |
+
Identify the primary function and literary form of the text. Do not classify based solely on individual words, language, formatting, or sentence length.
|
| 88 |
+
|
| 89 |
+
## CATEGORIES
|
| 90 |
+
|
| 91 |
+
- **NARRATIVE**: Ordinary prose, including narration, descriptions, exposition, essays, arguments, historical accounts, scientific writing, and reflective writing.
|
| 92 |
+
- **DIALOGUE**: Conversations, spoken exchanges, interviews, transcripts, and dramatic speech presented as spoken language.
|
| 93 |
+
- **VERSE**: Poetry and intentionally lineated literary writing, including blank verse, free verse, metrical verse, verse drama, and poetic soliloquies. Rhyme is not required.
|
| 94 |
+
- **HEADING**: Chapter, section, subsection, and internal document headings.
|
| 95 |
+
- **TITLE**: Titles of books and other complete works, author names, and publication credits.
|
| 96 |
+
- **CAPTION**: Captions and labels associated with illustrations, photographs, figures, tables, and diagrams.
|
| 97 |
+
- **LIST**: Lists, enumerations, indexes, catalogues, dictionaries, glossaries, and bibliographic entries.
|
| 98 |
+
- **FOOTNOTE**: Footnotes, endnotes, source notes, and explanatory references.
|
| 99 |
+
- **INSTRUCTION**: Recipes, procedures, operating directions, and practical step-by-step guidance.
|
| 100 |
+
- **JUNK**: Unusable OCR, meaningless fragments, and extraction artifacts that cannot reasonably be assigned another category.
|
| 101 |
+
|
| 102 |
+
## CLASSIFICATION RULES
|
| 103 |
+
|
| 104 |
+
1. Classify according to the primary function of the text.
|
| 105 |
+
2. Language does not determine category. Apply the same categories to all languages.
|
| 106 |
+
3. Use NARRATIVE for ordinary continuous prose, including literary prose.
|
| 107 |
+
4. Use DIALOGUE for text primarily representing spoken communication.
|
| 108 |
+
5. Use VERSE for poetry and intentionally lineated literary compositions, including unrhymed poetry and blank verse.
|
| 109 |
+
6. A soliloquy written in verse is VERSE. A soliloquy written as ordinary spoken prose is DIALOGUE.
|
| 110 |
+
7. Quoted speech within ordinary narration does not automatically make the passage DIALOGUE.
|
| 111 |
+
8. A narrative poem is VERSE, not NARRATIVE.
|
| 112 |
+
9. Numbered entries and enumerations are generally LIST, not FOOTNOTE.
|
| 113 |
+
10. Distinguish TITLE from HEADING:
|
| 114 |
+
- TITLE identifies a complete work or publication.
|
| 115 |
+
- HEADING identifies a section within a work.
|
| 116 |
+
11. Use INSTRUCTION only when the text directs someone to perform actions or follow a procedure. Descriptions of actions are NARRATIVE.
|
| 117 |
+
12. Do not classify text as JUNK merely because it is short, incomplete, archaic, poorly formatted, or written in unfamiliar language.
|
| 118 |
+
13. Archaic spelling, historical vocabulary, and unusual grammar are not corruption.
|
| 119 |
+
14. When a passage contains multiple features, select the category representing its dominant function.
|
| 120 |
+
15. If uncertain, choose the most plausible category. Do not default to JUNK.
|
| 121 |
+
|
| 122 |
+
## TEXT QUALITY
|
| 123 |
+
|
| 124 |
+
Select exactly ONE:
|
| 125 |
+
|
| 126 |
+
- **clean**: Readable and substantially intact.
|
| 127 |
+
- **minor_corruption**: Mostly readable, with occasional OCR errors, missing characters, incorrect spacing, or minor extraction defects.
|
| 128 |
+
- **severe_corruption**: Extensive OCR errors, missing or garbled text, or extraction defects that substantially interfere with interpretation.
|
| 129 |
+
|
| 130 |
+
Do not confuse historical spelling or typography with corruption.
|
| 131 |
+
|
| 132 |
+
## COMPLETENESS
|
| 133 |
+
|
| 134 |
+
Select exactly ONE:
|
| 135 |
+
|
| 136 |
+
- **complete**: Forms an apparently complete unit, such as a paragraph, poem, heading, list entry, dialogue exchange, or note.
|
| 137 |
+
- **fragment**: Visibly incomplete, such as a sentence cut off mid-thought or an incomplete extraction.
|
| 138 |
+
- **uncertain**: Insufficient evidence to determine completeness.
|
| 139 |
+
|
| 140 |
+
A passage does not need to be a complete chapter or document to qualify as complete.
|
| 141 |
+
|
| 142 |
+
## LANGUAGE
|
| 143 |
+
|
| 144 |
+
Return the ISO 639-1 language code of the primary language (for example, "en", "fr", "de", "es").
|
| 145 |
+
|
| 146 |
+
Use "unknown" only when the language cannot be reliably identified.
|
| 147 |
+
|
| 148 |
+
For mixed-language text, identify the predominant language.
|
| 149 |
+
|
| 150 |
+
## OUTPUT
|
| 151 |
+
|
| 152 |
+
Return ONLY valid JSON.
|
| 153 |
+
|
| 154 |
+
Use exactly these five keys and no others:
|
| 155 |
+
|
| 156 |
+
{ "label": "NARRATIVE", "language": "en", "text_quality": "clean", "completeness": "complete" }
|
| 157 |
+
|
| 158 |
+
Do not provide explanations, confidence scores, additional fields, or Markdown formatting.
|
| 159 |
+
|
| 160 |
+
TEXT:
|
| 161 |
+
|
| 162 |
+
{{TEXT}}
|
| 163 |
+
|
| 164 |
+
```
|
| 165 |
+
</details>
|
| 166 |
+
|
| 167 |
+
## Limitations & Considerations
|
| 168 |
+
|
| 169 |
+
* **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).
|
| 170 |
+
* **Weak Labels:** Labels are generated via model distillation (Qwen3.5 4B) and may contain occasional annotation artifacts or noise.
|
| 171 |
+
* **Corpus Bias:** Sourced exclusively from Project Gutenberg texts, meaning the language distribution leans heavily toward historical and classical literature.
|
| 172 |
+
|
| 173 |
+
## License
|
| 174 |
+
|
| 175 |
+
This dataset is released under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license.
|