*3.5.1. No-retweets*

Tweets posted by authors were of mixed emotions, varying from joy to surprise to fear.

**Figure 14.** Sentiment emotion of no-retweets obtained on Barack Obama's visit to Jamaica.

#### *3.5.2. Retweets*

The tweets that were retweeted by Twitter users for Barack Obama's visit to Jamaica were of joy and surprise.

Sample tweets: This section shows samples of tweets and their sentiment classification for each of the four topical issues (**Tables 1**–**4**).

**4. Conclusion**

man bash government"

**Riverton Landfill fire**

acter long expressions.

**4.1. Significance of the research**

This chapter presented information on how sentiment analysis can be used to extract subjective information from a social media website such as Twitter. It provides researchers with an opportunity to collect deep, rich, readily available qualitative information from a large group of participants in an unobstructed real world environment. Despite several potential uses of sentiment analysis, the literature highlights some general challenges that can be faced when using it with Twitter, such as the noisy nature of Twitter's one hundred and forty (140) char-

**Table 4.** Examples of Twitter posts with expressed opinions on President Barack Obama's visit to Jamaica.

Neutral

http://dx.doi.org/10.5772/intechopen.72521

79

Using Sentiment Analysis and Machine Learning Algorithms to Determine Citizens' Perceptions

Negative

Negative

**Tweet Polarity** "said fire would be out by weekend it's not yet Friday" Positive

**Table 3.** Examples of sample Twitter posts with expressed opinions on the Riverton Landfill fire.

**Tweet Polarity** "that moment after barack obama said wah gwaan jamaica" Positive "barack obama is in jamaica hes just said this" Neutral

"adding to the confusion gleaner when will riverton dump fire be

"chronixx upset at barack obamas jamaica visit calls him a waste

"a number of schools closed early again today because of rivertondump

extinguished odpem heads give conflicting deadlines"

smoke incl hydel schools amp st patricks primary"

**Barack Obama's visit to Jamaica**

Many organizations have taken the initiative to use the tools available through sentiment analysis because of the benefits. The sentiment analysis approach presented in this chapter can be very useful for entities and organizations interested in gathering and understanding the opinions of stakeholders who are Twitter users. This is further facilitated by the availability of Twitter data and posts through Twitter's privacy policy. This study is significant as it

This method can be used by companies for marketing research, to aid campaigns and allow stakeholders to understand customer perceptions and thus improve service delivery. Sentiments derived from citizens tweets has even used in forecasting stocks. In Ref. [7], the sentiments marijuana tweets were used to predict stock prices of pharmaceutical companies.

presents the results of topical issues being discussed in the country to the public.


**Table 1.** Examples of Twitter posts with expressed opinions on the decriminalization of marijuana in Jamaica.


**Table 2.** Examples of Twitter posts with expressed opinions on Kaci Fennell's placing in Miss Universe.


**Table 3.** Examples of sample Twitter posts with expressed opinions on the Riverton Landfill fire.


**Table 4.** Examples of Twitter posts with expressed opinions on President Barack Obama's visit to Jamaica.
