Sentiment analysis for social networks