Sentiment Analysis using Classification

How to calculate sentiment score based on historical data