Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,17 +1,61 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# malagasy-sentence
|
| 2 |
+
|
| 3 |
+
## Overview
|
| 4 |
+
This dataset consists of clean, structured **sentences** extracted via Optical Character Recognition (OCR) from approximately **1GB of Malagasy thesis documents**. These documents were collected based on educational, cultural, and linguistic themes using the following keywords:
|
| 5 |
+
|
| 6 |
+
**"sekoly, boky, fampianarana, fiangonana, fanabeazana, tontolo, gazety, asa, tononkalo, faritra, teny, fiteny, soratra, poeta, tantara, literatiora, fomba"**
|
| 7 |
+
|
| 8 |
+
The dataset is saved in **CSV format**, and is particularly useful for NLP tasks involving **sentence-level modeling** in Malagasy — a low-resource language.
|
| 9 |
+
|
| 10 |
+
## Dataset Details
|
| 11 |
+
- **Language**: Malagasy
|
| 12 |
+
- **Source**: OCR'd academic thesis documents in PDF form
|
| 13 |
+
- **Download URL**: [Université d’Antananarivo Thesis Library](http://www.biblio.univ-antananarivo.mg/theses2/)
|
| 14 |
+
- **Collection Keywords**: `sekoly`, `boky`, `fampianarana`, `fiangonana`, `fanabeazana`, `tontolo`, `gazety`, `asa`, `tononkalo`, `faritra`, `teny`, `fiteny`, `soratra`, `poeta`, `tantara`, `literatiora`, `fomba`
|
| 15 |
+
- **Format**: CSV
|
| 16 |
+
- **Column(s)**: `sentence`
|
| 17 |
+
- **Granularity**: Each row contains a **single sentence**.
|
| 18 |
+
|
| 19 |
+
## Preprocessing Pipeline
|
| 20 |
+
The following steps were used to clean and normalize the raw OCR text:
|
| 21 |
+
|
| 22 |
+
1. **Unicode normalization** using NFKC to standardize characters.
|
| 23 |
+
2. **URL removal** to eliminate web links from scanned content.
|
| 24 |
+
3. **Quote standardization**, converting straight quotes to typographic quotes.
|
| 25 |
+
4. **Non-alphanumeric character removal**, excluding allowed punctuation.
|
| 26 |
+
5. **Punctuation spacing**, ensuring correct spacing after commas, periods, etc.
|
| 27 |
+
6. **Removal of structured markers** such as:
|
| 28 |
+
- Numbered headings (`1.`, `1.1.1`, etc.)
|
| 29 |
+
- Lettered sections (`a.`, `b-1`, etc.)
|
| 30 |
+
- Roman numeral references (`IV-2`, etc.)
|
| 31 |
+
7. **Consecutive punctuation cleanup** to reduce noise from OCR errors.
|
| 32 |
+
8. **Paragraph structure fixes**:
|
| 33 |
+
- Merging broken paragraphs that were split across lines or pages.
|
| 34 |
+
- Removing paragraphs shorter than 10 characters.
|
| 35 |
+
9. **Sentence segmentation** to split structured paragraphs into **individual sentences**.
|
| 36 |
+
10. **Whitespace normalization** to remove extra spaces and line breaks.
|
| 37 |
+
11. ** Deduplicated and Shuffled **
|
| 38 |
+
|
| 39 |
+
These steps were applied **iteratively** for high-quality, standardized sentence-level data.
|
| 40 |
+
|
| 41 |
+
## Potential Applications
|
| 42 |
+
This dataset is well-suited for:
|
| 43 |
+
- **Sentence-level language modeling** and generation in Malagasy
|
| 44 |
+
- **Fine-tuning multilingual NLP models** on Malagasy
|
| 45 |
+
|
| 46 |
+
## Limitations
|
| 47 |
+
- Some sentences may contain **French words or phrases**, as they are sometimes used in citations or quoted material within the thesis documents.
|
| 48 |
+
- OCR errors may still be present in some complex layouts or highly degraded scans.
|
| 49 |
+
|
| 50 |
+
## Usage
|
| 51 |
+
To load this dataset using the Hugging Face `datasets` library:
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from datasets import load_dataset
|
| 55 |
+
|
| 56 |
+
dataset = load_dataset('Lo-Renz-O/malagasy-sentence')
|
| 57 |
+
print(dataset['train'][0])
|
| 58 |
+
```
|
| 59 |
+
## Contribution
|
| 60 |
+
We welcome contributions to improve this dataset! If you have suggestions or additional Malagasy text sources, feel free to open a discussion or submit data on Hugging Face.
|
| 61 |
+
|