-
-
Notifications
You must be signed in to change notification settings - Fork 546
/
Copy pathcanonical-data.json
105 lines (105 loc) · 2.35 KB
/
canonical-data.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"exercise": "etl",
"comments": [
"Transforms a set of legacy Lexiconia data stored as letters per score",
"to a set of data stored score per letter.",
"Note: The expected input data for these tests should have",
"integer keys (not stringified numbers as shown in the JSON below",
"Unless the language prohibits that, please implement these tests",
"such that keys are integers. e.g. in JavaScript, it might look ",
"like `transform( { 1: ['A'] } );`"
],
"cases": [
{
"uuid": "78a7a9f9-4490-4a47-8ee9-5a38bb47d28f",
"description": "single letter",
"property": "transform",
"input": {
"legacy": {
"1": ["A"]
}
},
"expected": {
"a": 1
}
},
{
"uuid": "60dbd000-451d-44c7-bdbb-97c73ac1f497",
"description": "single score with multiple letters",
"property": "transform",
"input": {
"legacy": {
"1": ["A", "E", "I", "O", "U"]
}
},
"expected": {
"a": 1,
"e": 1,
"i": 1,
"o": 1,
"u": 1
}
},
{
"uuid": "f5c5de0c-301f-4fdd-a0e5-df97d4214f54",
"description": "multiple scores with multiple letters",
"property": "transform",
"input": {
"legacy": {
"1": ["A", "E"],
"2": ["D", "G"]
}
},
"expected": {
"a": 1,
"d": 2,
"e": 1,
"g": 2
}
},
{
"uuid": "5db8ea89-ecb4-4dcd-902f-2b418cc87b9d",
"description": "multiple scores with differing numbers of letters",
"property": "transform",
"input": {
"legacy": {
"1": ["A", "E", "I", "O", "U", "L", "N", "R", "S", "T"],
"2": ["D", "G"],
"3": ["B", "C", "M", "P"],
"4": ["F", "H", "V", "W", "Y"],
"5": ["K"],
"8": ["J", "X"],
"10": ["Q", "Z"]
}
},
"expected": {
"a": 1,
"b": 3,
"c": 3,
"d": 2,
"e": 1,
"f": 4,
"g": 2,
"h": 4,
"i": 1,
"j": 8,
"k": 5,
"l": 1,
"m": 3,
"n": 1,
"o": 1,
"p": 3,
"q": 10,
"r": 1,
"s": 1,
"t": 1,
"u": 1,
"v": 4,
"w": 4,
"x": 8,
"y": 4,
"z": 10
}
}
]
}