kth8 commited on
Commit
0cf41bb
·
verified ·
1 Parent(s): 950db99

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +83 -24
README.md CHANGED
@@ -1,24 +1,83 @@
1
- ---
2
- license: cc-by-4.0
3
- configs:
4
- - config_name: default
5
- data_files:
6
- - split: train
7
- path: data/train-*
8
- dataset_info:
9
- features:
10
- - name: category
11
- dtype: string
12
- - name: question
13
- dtype: string
14
- - name: choices
15
- list: string
16
- - name: answer
17
- dtype: string
18
- splits:
19
- - name: train
20
- num_bytes: 9883240
21
- num_examples: 49599
22
- download_size: 5546262
23
- dataset_size: 9883240
24
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ configs:
4
+ - config_name: default
5
+ data_files:
6
+ - split: train
7
+ path: data/train-*
8
+ dataset_info:
9
+ features:
10
+ - name: category
11
+ dtype: string
12
+ - name: question
13
+ dtype: string
14
+ - name: choices
15
+ list: string
16
+ - name: answer
17
+ dtype: string
18
+ splits:
19
+ - name: train
20
+ num_bytes: 9883240
21
+ num_examples: 49599
22
+ download_size: 5546262
23
+ dataset_size: 9883240
24
+ ---
25
+ This dataset contains a collection of multiple-choice trivia questions and answers.
26
+
27
+ Source: [https://github.com/uberspot/OpenTriviaQA](https://github.com/uberspot/OpenTriviaQA).
28
+
29
+ Available categories:
30
+ ```
31
+ animals (1368 items)
32
+ brain-teasers (214 items)
33
+ celebrities (3202 items)
34
+ entertainment (280 items)
35
+ for-kids (762 items)
36
+ general (3293 items)
37
+ geography (842 items)
38
+ history (1645 items)
39
+ hobbies (1242 items)
40
+ humanities (1098 items)
41
+ literature (1294 items)
42
+ movies (4315 items)
43
+ music (5633 items)
44
+ newest (3016 items)
45
+ people (2746 items)
46
+ rated (2199 items)
47
+ religion-faith (639 items)
48
+ science-technology (2487 items)
49
+ sports (2840 items)
50
+ television (5232 items)
51
+ video-games (600 items)
52
+ world (4890 items)
53
+ ```
54
+
55
+ ### Example Data Instance
56
+
57
+ ```json
58
+ {
59
+ "category": "brain-teasers",
60
+ "question": "Which of these is true about the sleep of zebras?",
61
+ "choices": [
62
+ "All of these",
63
+ "They sleep standing up.",
64
+ "They would fall asleep every 5 to 6 hours.",
65
+ "They need more than 12 hours of sleep a day."
66
+ ],
67
+ "answer": "They sleep standing up."
68
+ }
69
+ ```
70
+
71
+ ```python
72
+ import json
73
+ from datasets import load_dataset
74
+ dataset = load_dataset("kth8/OpenTriviaQA")
75
+
76
+ for index, row in enumerate(dataset["train"], start=1):
77
+ category = row['category']
78
+ question = row['question']
79
+ choices = row['choices']
80
+ answer = row['answer']
81
+ row_dict = {"index": index, "question": question, "choices": choices, "answer": answer}
82
+ print(json.dumps(row_dict))
83
+ ```