Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

INTERNSHIP PROJECT

ON PYTHON
TWITTER SENTIMENT
CLASSIFIER
INTERNSHIP PROJECT
CONTENTS

1. Introduction
2. Problem Statement
3. Objective
4. Methodology
5. Proposed System
6. Code Snippets
7. Graphical Representation
8. Requirement Specification
INTRODUCTION

 Twitter.com is a popular microblogging website.

 Each Tweet is 140 characters in length.

 Tweets are frequently used to express a tweeter’s emotion on a particular


subject.

 There are firms which poll twitter for analyzing sentiment on a particular topic

 The challenge is to gather all such relevant data , detect and summarize the
overall sentiment on a topic.
PROBLEM STATEMENT
 The problem in statement analysis is classifying the polarity of a given text at
the document, sentence, or feature/aspect level.

 Whether the expressed opinion in a document, a sentence or an entity


feature/aspect is positive, negative or neutral.

 Sentiment analysis (also known as opinion mining) refers to the use of natural
language processing, text analysis and computational linguistics to identify
and extract subjective information in source materials.

 Consumers can use sentiment analysis to research products and services before
a purchase. Production companies can use the public opinion to determine
acceptance of their products and the public demand. Movie-goers can decide
whether to watch a movie or not after going through other people’s reviews.
OBJECTIVE

 We have provided some synthetic (fake, semi-randomly generated) twitter


data in a csv file named project_twitter_data.csv which has the text of a
tweet, the number of retweets of that tweet, and the number of replies to
that tweet. We have also words that express positive sentiment and negative
sentiment, in the files positive_words.txt and negative_words.txt.
 Your task is to build a sentiment classifier, which will detect how positive or
negative each tweet is. You will create a csv file, which contains columns for
the Number of Retweets, Number of Replies, Positive Score (which is how
many happy words are in the tweet), Negative Score (which is how many
angry words are in the tweet), and the Net Score for each tweet. At the end,
you upload the csv file to Excel or Google Sheets, and produce a graph of the
Net Score vs Number of Retweets.
METHODOLOGY
1. def strip_punctuation(strWord):
 which takes one parameter, a string which represents a word, and removes characters considered punctuation from
everywhere in the word.
2. def get_pos(strSentences):
 which takes one parameter, a string which represents a one or more sentences, and calculates how many words in
the string are considered positive words. Use the list, positive_words to determine what words will count as
positive. The function should return a positive integer - how many occurances there are of positive words in the
text.
3. def get_neg(strSentences):
 which takes one parameter, a string which represents a one or more sentences, and calculates how many words in
the string are considered negative words. Use the list, negative_words to determine what words will count as
negative. The function should return a positive integer - how many occurances there are of negative words in the
text.
4. def writeInDataFile(resultingDataFile):
 which takes one parameter, a string which represents all data in project_twitter_data.csv, and write a csv file
called resulting_data.csv, which contains the Number of Retweets, Number of Replies, Positive Score (which is how
many happy words are in the tweet), Negative Score (which is how many angry words are in the tweet), and the
Net Score (how positive or negative the text is overall) for each tweet. The file have its headers in that order.
PROPOSED SYSTEM
CODE SNIPPETS
GRAPHICAL REPRESENTATION
REQUIREMENT SPECIFICATION :

 HARDWARE SPECIFICATION :
 Processor: Intel core i3 
 RAM : 4GB
 Hard disk: 1TB (Minimum 80GB)

 SOFTWARE SPECIFICATION :
 Operating system : Windows 7, 10 
 Programming Language : Python 3 
 Development environment/tools: Python IDE 3.9
THANK YOU

You might also like