Machine learning methods expect a training dataset. We need a set of tuples, where our x is the text and y is a label indicating if the sentiment of the tweet is positive or negative. We build features from these texts and train one of the existing classification algorithms, such as naive-bayes or SVM. This model can be used when new text arrives to classify it as either a positive or negative sentiment text.