Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -9,35 +9,18 @@ tags:
|
|
| 9 |
- phonemization
|
| 10 |
- IPA
|
| 11 |
- wikipedia
|
| 12 |
-
pretty_name: Basque Wikipedia Phonemized Corpus (IPA)
|
| 13 |
size_categories:
|
| 14 |
- 1M<n<10M
|
| 15 |
-
dataset_info:
|
| 16 |
-
features:
|
| 17 |
-
- name: text
|
| 18 |
-
dtype: string
|
| 19 |
-
- name: phonemes
|
| 20 |
-
dtype: string
|
| 21 |
-
splits:
|
| 22 |
-
- name: train
|
| 23 |
-
num_bytes: 653374158
|
| 24 |
-
num_examples: 1672981
|
| 25 |
-
download_size: 300920769
|
| 26 |
-
dataset_size: 653374158
|
| 27 |
-
configs:
|
| 28 |
-
- config_name: default
|
| 29 |
-
data_files:
|
| 30 |
-
- split: train
|
| 31 |
-
path: data/train-*
|
| 32 |
---
|
| 33 |
|
| 34 |
-
# Basque Wikipedia Phonemized Corpus (IPA)
|
| 35 |
|
| 36 |
## Dataset Description
|
| 37 |
|
| 38 |
-
A large-scale
|
| 39 |
|
| 40 |
-
This dataset is intended for training
|
| 41 |
|
| 42 |
---
|
| 43 |
|
|
@@ -45,7 +28,7 @@ This dataset is intended for training phonetic encoders (PL-BERT), text-to-speec
|
|
| 45 |
|
| 46 |
| Split | Rows |
|
| 47 |
|-------|------|
|
| 48 |
-
|
|
| 49 |
|
| 50 |
---
|
| 51 |
|
|
@@ -53,25 +36,19 @@ This dataset is intended for training phonetic encoders (PL-BERT), text-to-speec
|
|
| 53 |
|
| 54 |
### Fields
|
| 55 |
|
| 56 |
-
- `
|
|
|
|
| 57 |
|
| 58 |
### Example
|
| 59 |
|
| 60 |
```python
|
| 61 |
from datasets import load_dataset
|
| 62 |
|
| 63 |
-
ds = load_dataset("
|
|
|
|
|
|
|
| 64 |
print(ds[0]["phonemes"])
|
| 65 |
-
# → "istoɾiako le'enenɡo ʂi'entʂia iʂ'an da astr'onomia. ʂiβ'iliʂaʂio eta kult'uɾa
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
**Split into individual phoneme tokens:**
|
| 69 |
-
|
| 70 |
-
```python
|
| 71 |
-
for example in ds.select(range(5)):
|
| 72 |
-
tokens = example["phonemes"].split()
|
| 73 |
-
print(tokens)
|
| 74 |
-
# e.g. ["istoɾiako", "le'enenɡo", "ʂi'entʂia", "iʂ'an", "da", "astr'onomia.", ...]
|
| 75 |
```
|
| 76 |
|
| 77 |
---
|
|
@@ -82,12 +59,13 @@ This dataset uses **standard IPA** symbols.
|
|
| 82 |
|
| 83 |
---
|
| 84 |
|
| 85 |
-
## Data Pipeline
|
| 86 |
|
| 87 |
-
|
| 88 |
|
| 89 |
-
|
| 90 |
|
|
|
|
| 91 |
- Strips MediaWiki markup (templates, tables, infoboxes)
|
| 92 |
- Expands wiki links to their anchor text
|
| 93 |
- Removes HTML tags, comments, and special elements (`<ref>`, `<math>`, etc.)
|
|
@@ -99,7 +77,6 @@ Raw text was extracted from the Basque Wikipedia XML dump using a customized ver
|
|
| 99 |
The extracted text was further cleaned with the following filters and transformations:
|
| 100 |
|
| 101 |
**Sentence-level filters (removal):**
|
| 102 |
-
|
| 103 |
- Sentences shorter than **100 characters**
|
| 104 |
- Sentences containing **double quotes** (`"`)
|
| 105 |
- Sentences containing **chess notation** (`e4`, `c4`)
|
|
@@ -110,7 +87,6 @@ The extracted text was further cleaned with the following filters and transforma
|
|
| 110 |
- Sentences consisting **only of digits and punctuation**
|
| 111 |
|
| 112 |
**Text normalization transformations:**
|
| 113 |
-
|
| 114 |
- `"K. a."` → `"K.a."` and `"K. o."` → `"K.o."` (Basque grammatical abbreviations)
|
| 115 |
- Dots after single uppercase initials removed (e.g. `A.` → `A`)
|
| 116 |
- Content inside parentheses/brackets removed
|
|
@@ -139,6 +115,7 @@ Each cleaned sentence was first **normalized** and then **phonemized** using **[
|
|
| 139 |
- Outputs IPA symbols with stress markers and multicharacter affricates preserved
|
| 140 |
- Attaches punctuation marks to the preceding word
|
| 141 |
|
|
|
|
| 142 |
---
|
| 143 |
|
| 144 |
## Usage
|
|
@@ -146,10 +123,31 @@ Each cleaned sentence was first **normalized** and then **phonemized** using **[
|
|
| 146 |
```python
|
| 147 |
from datasets import load_dataset
|
| 148 |
|
| 149 |
-
ds = load_dataset("
|
| 150 |
|
| 151 |
for example in ds.select(range(5)):
|
|
|
|
| 152 |
print(example["phonemes"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
```
|
| 154 |
|
| 155 |
---
|
|
@@ -162,10 +160,9 @@ The dataset is derived from Basque Wikipedia, which is released under the [Creat
|
|
| 162 |
|
| 163 |
## Citation
|
| 164 |
|
| 165 |
-
If you use this dataset, please cite the Basque Wikipedia and acknowledge the phonemization pipeline developed at
|
| 166 |
-
|
| 167 |
-
---
|
| 168 |
|
| 169 |
## Related Resources
|
| 170 |
|
| 171 |
- **[ahoNT](https://github.com/hitz-zentroa/ahoNT)** — Basque text normalization and phonemization tool
|
|
|
|
|
|
| 9 |
- phonemization
|
| 10 |
- IPA
|
| 11 |
- wikipedia
|
| 12 |
+
pretty_name: Basque Wikipedia Phonemized Corpus (Text + IPA phonemes)
|
| 13 |
size_categories:
|
| 14 |
- 1M<n<10M
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Basque Wikipedia Phonemized Corpus (Text + IPA phonemes)
|
| 18 |
|
| 19 |
## Dataset Description
|
| 20 |
|
| 21 |
+
A large-scale paired corpus derived from the Basque Wikipedia dump. Each row contains both the **original plain text** and its **IPA phoneme transcription**, at paragraph level. Stressed vowels use the apostrophe convention (e.g. `'a`, `'e`, `'i`, `'o`, `'u`) and affricates are kept as multicharacter sequences (e.g. `tʃ`, `tʂ`, `ts`).
|
| 22 |
|
| 23 |
+
This dataset is intended for training text-to-speech (TTS) and grapheme-to-phoneme (G2P) models for Basque.
|
| 24 |
|
| 25 |
---
|
| 26 |
|
|
|
|
| 28 |
|
| 29 |
| Split | Rows |
|
| 30 |
|-------|------|
|
| 31 |
+
| samples | 1,672,981 |
|
| 32 |
|
| 33 |
---
|
| 34 |
|
|
|
|
| 36 |
|
| 37 |
### Fields
|
| 38 |
|
| 39 |
+
- `text` (`string`): The Basque Wikipedia plain text, at paragraph level.
|
| 40 |
+
- `phonemes` (`string`): The corresponding IPA phoneme transcription. Words are space-separated; punctuation is attached directly to the preceding word (e.g. `astr'onomia.` not `astr'onomia .`).
|
| 41 |
|
| 42 |
### Example
|
| 43 |
|
| 44 |
```python
|
| 45 |
from datasets import load_dataset
|
| 46 |
|
| 47 |
+
ds = load_dataset("HiTZ/wikipedia_basque_ipa", split="train")
|
| 48 |
+
print(ds[0]["text"])
|
| 49 |
+
# → "Historiako lehenengo zientzia izan da astronomia. Zibilizazio eta kultura guztiek..."
|
| 50 |
print(ds[0]["phonemes"])
|
| 51 |
+
# → "'istoɾiako le'enenɡo ʂi'entʂia iʂ'an da astr'onomia. ʂiβ'iliʂaʂio eta kult'uɾa..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
```
|
| 53 |
|
| 54 |
---
|
|
|
|
| 59 |
|
| 60 |
---
|
| 61 |
|
| 62 |
+
## Data Processing Pipeline
|
| 63 |
|
| 64 |
+
Data processing steps from raw data extracted from Wikipedia to the phonemized utterances.
|
| 65 |
|
| 66 |
+
### Step 1 — Wikipedia Extraction (`WikiExtractor.py`)
|
| 67 |
|
| 68 |
+
Raw text was extracted from the Basque Wikipedia XML dump using a customized version of [WikiExtractor](https://github.com/attardi/wikiextractor). The extractor:
|
| 69 |
- Strips MediaWiki markup (templates, tables, infoboxes)
|
| 70 |
- Expands wiki links to their anchor text
|
| 71 |
- Removes HTML tags, comments, and special elements (`<ref>`, `<math>`, etc.)
|
|
|
|
| 77 |
The extracted text was further cleaned with the following filters and transformations:
|
| 78 |
|
| 79 |
**Sentence-level filters (removal):**
|
|
|
|
| 80 |
- Sentences shorter than **100 characters**
|
| 81 |
- Sentences containing **double quotes** (`"`)
|
| 82 |
- Sentences containing **chess notation** (`e4`, `c4`)
|
|
|
|
| 87 |
- Sentences consisting **only of digits and punctuation**
|
| 88 |
|
| 89 |
**Text normalization transformations:**
|
|
|
|
| 90 |
- `"K. a."` → `"K.a."` and `"K. o."` → `"K.o."` (Basque grammatical abbreviations)
|
| 91 |
- Dots after single uppercase initials removed (e.g. `A.` → `A`)
|
| 92 |
- Content inside parentheses/brackets removed
|
|
|
|
| 115 |
- Outputs IPA symbols with stress markers and multicharacter affricates preserved
|
| 116 |
- Attaches punctuation marks to the preceding word
|
| 117 |
|
| 118 |
+
|
| 119 |
---
|
| 120 |
|
| 121 |
## Usage
|
|
|
|
| 123 |
```python
|
| 124 |
from datasets import load_dataset
|
| 125 |
|
| 126 |
+
ds = load_dataset("HiTZ/wikipedia_basque_ipa", split="train")
|
| 127 |
|
| 128 |
for example in ds.select(range(5)):
|
| 129 |
+
print(example["text"])
|
| 130 |
print(example["phonemes"])
|
| 131 |
+
print()
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
**Split phonemes into individual word tokens:**
|
| 135 |
+
|
| 136 |
+
```python
|
| 137 |
+
for example in ds.select(range(5)):
|
| 138 |
+
tokens = example["phonemes"].split()
|
| 139 |
+
print(tokens)
|
| 140 |
+
# e.g. ["'istoɾiako", "le'enenɡo", "ʂi'entʂia", "iʂ'an", "da", "astr'onomia.", ...]
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
**Use as a G2P training corpus:**
|
| 144 |
+
|
| 145 |
+
```python
|
| 146 |
+
for example in ds.select(range(5)):
|
| 147 |
+
words = example["text"].split()
|
| 148 |
+
phonemes = example["phonemes"].split()
|
| 149 |
+
# Note: words and phoneme tokens are aligned one-to-one
|
| 150 |
+
# (punctuation is attached to the preceding phoneme token)
|
| 151 |
```
|
| 152 |
|
| 153 |
---
|
|
|
|
| 160 |
|
| 161 |
## Citation
|
| 162 |
|
| 163 |
+
If you use this dataset, please cite the Basque Wikipedia and acknowledge the phonemization pipeline developed at AhoLab (University of the Basque Country).
|
|
|
|
|
|
|
| 164 |
|
| 165 |
## Related Resources
|
| 166 |
|
| 167 |
- **[ahoNT](https://github.com/hitz-zentroa/ahoNT)** — Basque text normalization and phonemization tool
|
| 168 |
+
- **[WikiExtractor](https://github.com/attardi/wikiextractor)** - Python script that extracts and cleans text from a Wikipedia database backup dump
|