Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
ppt for phase-1 review-2.pptx
1. SENTIMENTAL ANALYSIS ON
ONLINE PRODUCT REVIEWS
BY M. SIVANI (18691A05D1)
B.SOUGANDHIKA (18691A05D4)
P.SAI CHAITHANYA GANDHI (19695A0519)
G.JEEVITHA (19695A0504)
SUPERVISED BY DR.R.SIVAKUMAR
2. INTRODUCTION
• Simply reading a post will let you identify whether the author had a positive stance or a
negative stance on the topic – but that’s if you’re well versed in the language. However, a
computer has no concept of naturally spoken language – so, we need to break down this
problem into mathematics (the language of a computer). It cannot simply deduce whether
something contains joy, frustration, anger, or otherwise – without any context of what those
words mean.
• Sentiment analysis solves this problem by using natural language processing. Basically, it
recognizes the necessary keywords and phrases within a document, which eventually help
the algorithm to classify the emotional state of the document.
3. PROBLEM FORMULATION
• SENTIMENT ANALYSIS (ALSO KNOWN AS OPINION MINING OR EMOTION AI) REFERS TO THE
USE OF NATURAL LANGUAGE PROCESSING, TEXT ANALYSIS, COMPUTATIONAL LINGUISTICS,
AND BIOMETRICS TO SYSTEMATICALLY IDENTIFY, EXTRACT, QUANTIFY, AND STUDY
AFFECTIVE STATES AND SUBJECTIVE INFORMATION.
• SENTIMENT ANALYSIS IS WIDELY APPLIED TO VOICE OF THE CUSTOMER MATERIALS SUCH
AS REVIEWS AND SURVEY RESPONSES, ONLINE AND SOCIAL MEDIA, AND HEALTHCARE
MATERIALS FOR APPLICATIONS THAT RANGE FROM MARKETING TO CUSTOMER SERVICE TO
CLINICAL MEDICINE.
• POLARITY IS FLOAT WHICH LIES IN THE RANGE OF [-1,1] WHERE 1 MEANS POSITIVE
STATEMENT AND -1 MEANS A NEGATIVE STATEMENT.
• SUBJECTIVE SENTENCES GENERALLY REFER TO PERSONAL OPINION, EMOTION OR
JUDGMENT WHEREAS OBJECTIVE REFERS TO FACTUAL INFORMATION. SUBJECTIVITY IS ALSO
A FLOAT WHICH LIES IN THE RANGE OF [0,1].
7. DATABASE DESIGN
Bid Brand Name
1. Samsung
2. Apple
Brand Table
Bid Brand
Name
Price Rating Review Review
votes
1. samsun
g
199.9 5 Very
pleased
1
2. samsun
g
199.9 4 Nice
phone
0
3. Apple 33.00 1 Phone
was
locked-
cannot
used
0
……. ……… …….. ……. ….. ……
Brand Details
8. S.no Brand Price Rating Review Review Votes
0 Samsung 199.99 5
I feel so LUCKY to have
found this used (phone...
1
1 Samsung 199.99 4
nice phone, nice up grade
from my pantach revu...
0
2 Samsung 199.99 5 Very pleased 0
3 Samsung 199.99 4
It works good but it goes
slow sometimes but i...
0
4 Samsung 199.99 4
Great phone to replace my
lost phone. The only...
0
5 Samsung 199.99 1
I already had a phone with
problems... I know ...
1
6 Samsung 199.99 2
The charging port was
loose. I got that solder...
0
7 Samsung 199.99 2
Phone looks good but
wouldn't stay charged, ha...
0
8 Samsung 199.99 5
I originally was using the
Samsung S2 Galaxy f...
0
9 Samsung 199.99 3
It's battery life is great. It's
very responsi...
0
10 Samsung 199.99 3
My fiance had this phone
previously, but cause...
0
11 Samsung 199.99 5
This is a great product it
came after two days...
0
12 Samsung 199.99 5
These guys are the best! I
had a little situat...
2
13 Samsung 199.99 1
I'm really disappointed
about my phone and ser...
1
9. 14 Samsung 199.99 5
Ordered this phone as a
replacement for the sa...
1
15 Samsung 199.99 2
Had this phone before
and loved it but was
not...
0
16 Samsung 199.99 5
I was able to get the
phone I previously
owned...
6
17 Samsung 199.99 5
I brought this phone as
a replacement for my
d...
0
18 Samsung 199.99 4
I love the phone. It does
everything I need an...
1
19 Samsung 199.99 3
unfortunately Sprint
could not activate the
ph...
0
20 Samsung 199.99 4
The battery was old &
had been over used
becau...
0
21 Samsung 199.99 4
pros-beautiful
screen,capable of
running chrom...
0
22 Samsung 199.99 1
I purchased this phone
in December as a
christ...
19
23 Samsung 199.99 4
Phone good just a little
slow phone old but it...
0
24 Samsung 199.99 4
Phone's speaker little
low. Overall very 0
10. 26 Samsung 199.99 3
the reasons for the 3
star rating was it was
i...
0
27 Samsung 199.99 5
Phone works great. No
problems at all
0
28 Samsung 199.99 1
was not in good
condition but does
work good
0
29 Samsung 199.99 1
Just... not good. The
phone has great screen
r...
0
... ... ... ... ... ...
40 Apple 33.00 5 norm! 0
41 Apple 33.00 5
I got this for my
husband and he
absolutely lo...
1
42 Apple 33.00 1
The discription reads
that it is a Verizon
Wir...
21
43 Apple 33.00 4
Basically in the
condition described.
However,...
0
44 Apple 33.00 5
This phone is GREAT!
While I didn't hear back
...
1
45 Apple 33.00 3
By mistake, I bought a
wrong iPhone. It can
no...
0
11. 47 Apple 33.00 5 Great. 0
48 Apple 33.00 2
Although the sender
was very helpful the
produ...
0
49 Apple 33.00 5
Great phone, works
perfectly. It has a fast
op...
0
50 Apple 33.00 1
It was supposed to be
a verizon compatible
pho...
7
51 Apple 33.00 5 Great 0
52 Apple 33.00 1
phone was locked -
cannot use
0
53 Apple 33.00 5
Very satisfied with the
quality. This was the ...
0
54 Apple 33.00 1
Purchased phone SIM
card missing and there
was...
0
55 Apple 33.00 1
After reviewing the
phone and trying
everythin...
0
56 Apple 33.00 2
Home button has a
mind of its own
working spor...
0
57 Apple 33.00 5 very good 0
12. 59 Apple 33.00 5
Received iPhone in a
timely manner. The
phone ...
0
60 Apple 33.00 5 Phone was perfect! 0
61 Apple 33.00 5
Awesome exactly as
described. Works great,
no ...
0
62 Apple 33.00 5
bought it for a friend.
works great.
0
63 Apple 33.00 5
It works like new. Got
here faster than
expected
0
64 Apple 33.00 1
The first phone I
received did not work
proper...
0
65 Apple 33.00 1
Received phone on time
and it was ready to be
...
1
66 Apple 33.00 2
The home button
doesn't work and with
all the ...
1
67 Apple 33.00 5
the phone got delivered
so fast & the phone is...
0
68 Apple 33.00 5
Nice phone for the
price. Great for a kids
fir...
0
13. MODULES AND OUTPUT
• Algorithm 1: frequent words in the data to determine whether it is false review or not
• Import nltk
• From nltk import freqdist
• Def freq_words(x, terms = 30):
• All_words = ' '.Join([text for text in x])
• All_words = all_words.Split()
•
• Fdist = freqdist(all_words)
• Words_df = pd.Dataframe({'word':list(fdist.Keys()), 'count':list(fdist.Values())})
•
• # Selecting top 20 most frequent words
• D = words_df.Nlargest(columns="count", n = terms)
• plt.Figure(figsize=(20,5))
• Ax = sns.Barplot(data=d, x= "word", y = "count")
• Ax.Set(ylabel = 'count')
• Plt.Show()
15. OUTPUT
Sample input and output:
Input: Number of reviews for Samsung: 30
Number of reviews for Apple: 39
Output: Frequency of word “The”: 70
Frequency of word “Phone” : 45
Frequency of word “ not”: 20
Frequency of word “ good”: 10
16. Algorithm 2:Negation phrases identification
Require: tagged sentences, negative prefixes
Ensure: NOA phrases, NOV phrases
1: for every tagged sentences do
2: for i/i + 1 as every word/tag pair do
3: if i + 1 is a negative prefix then
4: if there is an adjective tag or a verb tag in next pair then
5: NOA phrases ← (i, i + 2)
6: NOV phrases ← (i, i + 2)
7: else
8: if there is an adjective tag or a verb tag in the pair after next then
9: NOA phrases ← (i, i + 2, i + 4)
10: NOV phrases ← (i, i + 2, i + 4)
11: end if
12: end if
13: end if
14: end for
15: end for
16: return NOA phrases, NOV phrases