Lexicon-based sentiment analysis
This technique uses a dictionary of words that have been assigned a sentiment score. The sentiment score of a word can be positive, negative, or neutral.
Machine learning-based sentiment analysis
This technique uses a machine learning algorithm to learn the sentiment of the text. The algorithm is trained on a dataset of text that has been labeled with its sentiment.