Datasets:
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)) | |