Twitter Sentiment Analysis

Mert Kahyaoğlu

Instructor: Assoc. Prof. Dr. Bekir Taner Dinçer

NLP Course Project

AIM OF THE PROJECT

The aim of the project is to determine how people are feeling when they share something on twitter.

For example; 

I'm so happy today! ”    =>    Positive

I feel bad :(                   =>    Negative

ROAD MAP

1.Collect Tweets

  • Tweets;
  • from Twitter API
  • using Tweepy Helper Library
  • Requirements
  • Twitter Developer Application for authantication

2.Clean Tweets

  • Hashtags ( # )
  • Remove;
  • Mentions ( @ )
  • Links ( http://.. )
  • Retweets ( RT .. )
  • Limit ( length(word) > 2 )

Have you heard ‘Galata’ by @cmylmz on #SoundCloud? https://soundcloud.com/cmylmz/galata

Have you heard ‘Galata’ ?

3. LABEL & ForMAT

  • Emoticons ( 😃 )
  • Label by;
  • Adjectives ( "perfect, sad, .." )
  • Textual Emoticons ( ":D" )
  • ( "Weather is perfect today 😃", "positive)
  • Format;
  • ( "Rain makes me sad 😞", "negative)

4.EXTRACT FEATURES  & TRAIN DATA

[ "feel", "amazing", "today", "the", "view", "amazing",... ]

"I feel amazing today!"

"The view is amazing!"

...

nltk.FreqDist(wordlist)

  ["love", "this", "car"] :  positive

...

nltk.NaiveBayesClassifier

.train(training_set)

Training Set;

...

classifier

NAIVE BAYES EXAMPLE

Should we play when outlook is overcast ?

5.CLASSIFY

Improvements

  • Populate more training data
  • Try other classification algorithms
  • User interface

thank you for lıstenıng

Twitter Sentiment Analysis

By Mert Kahyaoğlu

Twitter Sentiment Analysis

  • 2,905