Antik Khan
Add annotations
3d3ae36
Raw
History Blame Contribute Delete
2.8 kB
{
"task": {
"id": "case_31",
"name": "token_anagram_identifier",
"summary": "Identify if tokens in the sequence are anagrams of the word 'listen'.",
"examples": [
{
"input": [
"BOS",
"V",
"poiVg",
"LB",
"poiVg",
"b",
"LB",
"V",
"no",
"oCLrZaW"
],
"output": [
"BOS",
false,
false,
false,
false,
false,
false,
false,
false,
false
]
},
{
"input": [
"BOS",
"poiVg",
"TPSI",
"b",
"TPSI",
"no",
"b",
"poiVg",
"no",
"LB"
],
"output": [
"BOS",
false,
false,
false,
false,
false,
false,
false,
false,
false
]
},
{
"input": [
"BOS",
"no",
"V",
"oCLrZaW",
"b",
"no",
"TPSI",
"no",
"oCLrZaW",
"b"
],
"output": [
"BOS",
false,
false,
false,
false,
false,
false,
false,
false,
false
]
},
{
"input": [
"BOS",
"V",
"oCLrZaW",
"oCLrZaW",
"TPSI",
"listen",
"b",
"LB",
"oCLrZaW",
"listen"
],
"output": [
"BOS",
false,
false,
false,
false,
true,
false,
false,
false,
true
]
},
{
"input": [
"BOS",
"LB",
"b",
"J",
"listen",
"poiVg",
"J",
"TPSI",
"no",
"V"
],
"output": [
"BOS",
false,
false,
false,
true,
false,
false,
false,
false,
false
]
}
],
"is_categorical": true
},
"program": "sorted_target = sorted(target)\nanagram_identifier = rasp.Map(lambda x: sorted(x) == sorted_target, sop)\nreturn anagram_identifier",
"components": [
{
"id": "L0_MLP",
"hook": "blocks.0.mlp.hook_post",
"role": {
"tag": "INDICATOR",
"note": "Checks each token against the target anagram condition and outputs a boolean."
},
"rasp_vars": [
"anagram_identifier"
],
"labels": [
"map_1"
]
}
]
}