--- language: - en license: mit size_categories: - 10K Tuple[str, List[str], int]: """Process RACE dataset example.""" context = example["article"] query = example["question"] choices = example["options"] answer_index = "ABCD".index(example["answer"]) return context, query, choices, answer_index ``` ## Overview This repository contains the processed version of the race_middle dataset. The dataset is formatted as a collection of multiple-choice questions. ## Dataset Structure Each example in the dataset contains the following fields: ```json { "id": 0, "context": "It is well-known that the \"prom\", a formal dance held at the end of high school or college, is an important date in every student's life. What is less well-known is that the word \"prom\" comes from the verb \"to promenade\", which means to walk around, beautifully dressed, in order to attract attention. The idea is that you should see and be seen by others.\nThe prom is not just an American tradition, though most people believe that it started in America. In Canada the event is called a \"formal\". In Britain and Australia the old fashioned word \"dance\" is more and more frequently being referred to as a \"prom\". Most countries have some form of celebration when students finish high school: after all, it means the end of life as a child, and the beginning of life as an adult.\nThe prom is expensive to organize and the tickets can cost students a lot of money. The tradition is that students themselves have to raise the money to pay for it. Selling the students newspapers is one way to raise money; so is taking a part-time job at the weekend.\nAlthough the prom should be the experience of a lifetime, it also worries many students. There is the problem of what to wear, who to take as your partner, who will be voted \"prom queen\", etc. And it is not only students who feel worried. What many parents find difficult is the realization that their children's school days are almost over. However, for most people at the prom, once the music starts playing, everyone relaxes and stops worrying.", "question": "In which country is the prom called a \"formal\"?", "choices": [ "America.", "Canada.", "Britain.", "Australia." ], "answerID": 1 } ``` ## Fields Description - `id`: Unique identifier for each example - `question`: The question or prompt text - `choices`: List of possible answers - `answerID`: Index of the correct answer in the choices list (0-based) ## Loading the Dataset You can load this dataset using the Hugging Face datasets library: ```python from datasets import load_dataset # Load the dataset dataset = load_dataset("DatologyAI/race_middle") # Access the data for example in dataset['train']: print(example) ``` ## Example Usage ```python # Load the dataset dataset = load_dataset("DatologyAI/race_middle") # Get a sample question sample = dataset['train'][0] # Print the question print("Question:", sample['question']) print("Choices:") for idx, choice in enumerate(sample['choices']): print(f"{idx}. {choice}") print("Correct Answer:", sample['choices'][sample['answerID']]) ```