The sentiment of a piece of text is its positivity or negativity, and sentiment analysis gives an objective idea of whether the text uses mostly positive, negative, or neutral language.

In order to calculate the sentiment of a piece of text, we split it into individual words.

We have a database of words, each with a "score" to determine how positive or negative it is.

The higher the score, the more positive the word (so "woohoo" is very positive and "sunny" is only slightly positive), and similarly for negative words.

Not every word in a piece of positive text will be positive, and not every word will be negative, but by feeding the number of identified words and their scores into our algorithm, we end up with a score for the sentiment of the text.

We can produce a score for a piece of text of almost any length. However, short texts will inherently be less accurate than long.

We suggest that if sentiment scoring is important to you, you treat scores for texts below 400 words as an estimate with a wide error margin.

For longer pieces, the text is split into three to give sentiment analysis for the beginning, middle and end of the piece.

Did this answer your question?