| { |
| "task": { |
| "id": "case_34", |
| "name": "vowel_consonant_ratio", |
| "summary": "Calculate the ratio of vowels to consonants in each word.", |
| "examples": [ |
| { |
| "input": [ |
| "BOS", |
| "oCLrZaW", |
| "V", |
| "b", |
| "oCLrZaW", |
| "TPSI", |
| "poiVg", |
| "b", |
| "b", |
| "oCLrZaW" |
| ], |
| "output": [ |
| "BOS", |
| 0.4, |
| 0.0, |
| 0.0, |
| 0.4, |
| 0.3333333333333333, |
| 0.6666666666666666, |
| 0.0, |
| 0.0, |
| 0.4 |
| ] |
| }, |
| { |
| "input": [ |
| "BOS", |
| "LB", |
| "TPSI", |
| "oCLrZaW", |
| "TPSI", |
| "TPSI", |
| "poiVg", |
| "b", |
| "V", |
| "poiVg" |
| ], |
| "output": [ |
| "BOS", |
| 0.0, |
| 0.3333333333333333, |
| 0.4, |
| 0.3333333333333333, |
| 0.3333333333333333, |
| 0.6666666666666666, |
| 0.0, |
| 0.0, |
| 0.6666666666666666 |
| ] |
| }, |
| { |
| "input": [ |
| "BOS", |
| "poiVg", |
| "TPSI", |
| "no", |
| "b", |
| "LB", |
| "poiVg", |
| "V", |
| "no", |
| "no" |
| ], |
| "output": [ |
| "BOS", |
| 0.6666666666666666, |
| 0.3333333333333333, |
| 1.0, |
| 0.0, |
| 0.0, |
| 0.6666666666666666, |
| 0.0, |
| 1.0, |
| 1.0 |
| ] |
| }, |
| { |
| "input": [ |
| "BOS", |
| "V", |
| "J", |
| "J", |
| "TPSI", |
| "TPSI", |
| "oCLrZaW", |
| "LB", |
| "poiVg", |
| "V" |
| ], |
| "output": [ |
| "BOS", |
| 0.0, |
| 0.0, |
| 0.0, |
| 0.3333333333333333, |
| 0.3333333333333333, |
| 0.4, |
| 0.0, |
| 0.6666666666666666, |
| 0.0 |
| ] |
| }, |
| { |
| "input": [ |
| "BOS", |
| "LB", |
| "poiVg", |
| "V", |
| "b", |
| "J", |
| "V", |
| "LB", |
| "no", |
| "b" |
| ], |
| "output": [ |
| "BOS", |
| 0.0, |
| 0.6666666666666666, |
| 0.0, |
| 0.0, |
| 0.0, |
| 0.0, |
| 0.0, |
| 1.0, |
| 0.0 |
| ] |
| } |
| ], |
| "is_categorical": true |
| }, |
| "program": "ratio_calculator = rasp.Map(calc_ratio, sop)\nreturn ratio_calculator", |
| "components": [ |
| { |
| "id": "L0_MLP", |
| "hook": "blocks.0.mlp.hook_post", |
| "role": { |
| "tag": "MAPPER", |
| "note": "Computes, for each token, the vowel-to-consonant ratio (with an infinity output when there are no consonants)." |
| }, |
| "rasp_vars": [ |
| "ratio_calculator" |
| ], |
| "labels": [ |
| "map_1" |
| ] |
| } |
| ] |
| } |
|
|