{ "task": { "id": "case_36", "name": "emoji_sentiment_classifier", "summary": "Classifies each token as 'positive', 'negative', or 'neutral' based on emojis.", "examples": [ { "input": [ "BOS", "😊", "😊", "📘", "📘", "😊", "😊", "📘", "📘", "📘" ], "output": [ "BOS", "positive", "positive", "neutral", "neutral", "positive", "positive", "neutral", "neutral", "neutral" ] }, { "input": [ "BOS", "😢", "😢", "📘", "😢", "📘", "😢", "😢", "📘", "📘" ], "output": [ "BOS", "negative", "negative", "neutral", "negative", "neutral", "negative", "negative", "neutral", "neutral" ] }, { "input": [ "BOS", "😢", "📘", "😢", "😢", "📘", "📘", "😢", "😊", "😢" ], "output": [ "BOS", "negative", "neutral", "negative", "negative", "neutral", "neutral", "negative", "positive", "negative" ] }, { "input": [ "BOS", "😢", "😢", "😢", "😊", "😢", "😊", "😊", "😢", "😊" ], "output": [ "BOS", "negative", "negative", "negative", "positive", "negative", "positive", "positive", "negative", "positive" ] }, { "input": [ "BOS", "😢", "😢", "😢", "📘", "😢", "😊", "📘", "😊", "😊" ], "output": [ "BOS", "negative", "negative", "negative", "neutral", "negative", "positive", "neutral", "positive", "positive" ] } ], "is_categorical": true }, "program": "emoji_sentiments = {\"😊\": \"positive\", \"😢\": \"negative\", \"📘\": \"neutral\"}\nclassify_sentiment = rasp.Map(lambda x: emoji_sentiments.get(x, \"neutral\"), sop)\nreturn classify_sentiment", "components": [ { "id": "L0_MLP", "hook": "blocks.0.mlp.hook_post", "role": { "tag": "MAPPER", "note": "Assigns a category to each token using a fixed lookup rule." }, "rasp_vars": [ "classify_sentiment" ], "labels": [ "map_1" ] } ] }