File size: 327 Bytes
fab94a8
 
 
 
 
 
 
 
4436e8b
fab94a8
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import json
from datasets import load_dataset

def remove_accents(x):
    chars = list(x.encode('utf-8').replace(b'\xcc\x81', b'').decode('utf-8'))

    return ''.join(chars)

ds = load_dataset("Yehor/tts-mykyta-uk", "tetiana")

for row in ds['train']:
    row['text'] = remove_accents(row['text'])

    print(json.dumps(row))