Create a dataset for translation

Hello, I need to create a translation dataset based on my text corpus. It looks like I need to use a DatasetDict but I don’t know how to create one on my data

It would be very convenient to turn the dictionary into a dataset like {word1: translation1, word2: translation2}

Given that you already have a dictionary of key value pairs, you can use the Dataset.from_dict method to create an object of the Dataset class.

Take a look at this link in the ‘from_local_files’ section on how to do it.