modified from "pattern_emotion_position_feature.py"