{ "task": { "id": "case_106", "name": "mask_sequence_index_1", "summary": "Sets all elements to zero except for the element at index 1.", "examples": [ { "input": [ "BOS", 2, 4, 2, 6, 4, 8, 6, 1, 3 ], "output": [ "BOS", 0, 4, 0, 0, 0, 0, 0, 0, 0 ] }, { "input": [ "BOS", 4, 1, 7, 5, 1, 4, 0, 9, 5 ], "output": [ "BOS", 0, 1, 0, 0, 0, 0, 0, 0, 0 ] }, { "input": [ "BOS", 10, 10, 7, 4, 3, 7, 7, 2, 5 ], "output": [ "BOS", 0, 10, 0, 0, 0, 0, 0, 0, 0 ] }, { "input": [ "BOS", 8, 0, 10, 10, 9, 2, 6, 3, 8 ], "output": [ "BOS", 0, 0, 0, 0, 0, 0, 0, 0, 0 ] }, { "input": [ "BOS", 6, 3, 10, 7, 4, 6, 9, 2, 6 ], "output": [ "BOS", 0, 3, 0, 0, 0, 0, 0, 0, 0 ] } ], "is_categorical": true }, "program": "return rasp.SequenceMap(lambda x, y: x if y == index else 0, rasp.tokens, rasp.indices)", "components": [ { "id": "L0_MLP", "hook": "blocks.0.mlp.hook_post", "role": { "tag": "COMBINER", "note": "Combines token content with position information to keep only one chosen position." }, "rasp_vars": [ "mask_sequence" ], "labels": [ "sequence_map_1" ] } ] }