Two methods to analyze the sentiment of a sentence are using a lexicon-based approach and using a machine learning approach. For lexicon-based sentiment analysis, words in the sentence are manually assigned sentiment scores and understanding of sentiment is determined by summing the sentiment scores of all words in the sentence. For a machine learning approach, models are trained on sentiment-annotated corpora to understand sentiment of sentences and extract sentiment decisions from them.
Provide two methods to analyze the sentiment of a sentence.