flatten_sentiment function

Flatten sentiment