Sentiment analysis or opinion mining refers to the application of natural language processing, computational linguistics, and text analytics to identify and extract subjective information in source materials, also to identify the polarity of the extracted subjective information.
More information can be found in the survey book .
Computers can perform automated sentiment analysis of digital texts, using elements from machine learning such as latent semantic analysis, support vector machines, Naive Bayes with "bag of words" and Semantic Orientation — Pointwise Mutual Information. More sophisticated methods try to detect the holder of a sentiment (i.e. the person who maintains that affective state) and the target (i.e. the named entity or target whose affective state one is interested in). To mine the opinion in context and get the feature which has been opinionated, the grammatical relationships of words are used. Grammatical dependency relations are obtained by deep parsing of the text.
Open source software tools deploy machine learning, statistics, and natural language processing techniques allowing to automate the sentiment analysis task on large collections of texts like for example web pages, online news, internet discussion groups, online reviews, web blogs, and social media like for example Twitter.
 Pang Bo and Lillian Lee. 2008. Opinion mining and sentiment analysis.