|
13 | 13 | {
|
14 | 14 | "description": "multiple occurrences of a word",
|
15 | 15 | "input": "one fish two fish red fish blue fish",
|
16 |
| - "expected": { "one" : 1, "fish" : 4, "two" : 1, "red" : 1, "blue" : 1 } |
| 16 | + "expected": { "one": 1, "fish": 4, "two": 1, "red": 1, "blue": 1 } |
| 17 | + }, |
| 18 | + { |
| 19 | + "description": "handles cramped lists", |
| 20 | + "input": "one,two,three", |
| 21 | + "expected": { "one": 1, "two": 1, "three": 1 } |
| 22 | + }, |
| 23 | + { |
| 24 | + "description": "handles expanded lists", |
| 25 | + "input": "one,\ntwo,\nthree", |
| 26 | + "expected": { "one": 1, "two": 1, "three": 1 } |
17 | 27 | },
|
18 | 28 | {
|
19 | 29 | "description": "ignore punctuation",
|
20 |
| - "input": "car : carpet as java : javascript!!&@$%^&", |
21 |
| - "expected": { "car" : 1, "carpet" : 1, "as" : 1, "java" : 1, "javascript" : 1 } |
| 30 | + "input": "car: carpet as java: javascript!!&@$%^&", |
| 31 | + "expected": { "car": 1, "carpet": 1, "as": 1, "java": 1, "javascript": 1 } |
22 | 32 | },
|
23 | 33 | {
|
24 | 34 | "description": "include numbers",
|
25 | 35 | "input": "testing, 1, 2 testing",
|
26 |
| - "expected": { "testing" : 2, "1" : 1, "2" : 1 } |
| 36 | + "expected": { "testing": 2, "1": 1, "2": 1 } |
27 | 37 | },
|
28 | 38 | {
|
29 | 39 | "description": "normalize case",
|
30 | 40 | "input": "go Go GO Stop stop",
|
31 |
| - "expected": { "go" : 3, "stop" : 2 } |
| 41 | + "expected": { "go": 3, "stop": 2 } |
| 42 | + }, |
| 43 | + { |
| 44 | + "description": "with apostrophes", |
| 45 | + "input": "First: don't laugh. Then: don't cry.", |
| 46 | + "expected": { "first": 1, "don't": 2, "laugh": 1, "then": 1, "cry": 1 } |
| 47 | + }, |
| 48 | + { |
| 49 | + "description": "with_quotations", |
| 50 | + "input": "Joe can't tell between 'large' and large.", |
| 51 | + "expected": { "joe": 1, "can't": 1, "tell": 1, "between": 1, "large": 2, "and": 1 } |
32 | 52 | }
|
33 | 53 | ]
|
34 | 54 | }
|
0 commit comments