WEBVTT

00:01.810 --> 00:02.310
Hey, everyone.

00:02.470 --> 00:03.030
Welcome back.

00:03.480 --> 00:06.460
So we declared the tweets from the Twitter server.

00:06.900 --> 00:14.940
Now, before it read every single tweet, let us use this tax blob library and see how to use to get

00:14.940 --> 00:16.960
the sentiment out of a tax.

00:17.520 --> 00:24.420
And for the illustration, as I hope, capital, we variable like Highmore bag cricket player.

00:24.650 --> 00:27.240
I am a good cricket player and I am cricket player.

00:27.630 --> 00:29.270
So that would be one positive sign.

00:29.280 --> 00:32.130
The main one is neutral and one is a negative.

00:32.580 --> 00:39.950
And let's see how it goes with all of this text block library so we can use like a text block.

00:41.950 --> 00:43.570
Taken Boss E!

00:45.380 --> 00:47.670
We will be applying this sentiment.

00:49.620 --> 00:51.590
So if you just execute this much part.

00:53.250 --> 00:56.130
Ops is not defined being defined as ABC.

00:57.930 --> 00:58.320
All right.

00:58.800 --> 01:03.630
So it has given us the information, clarity and subjectivity.

01:04.020 --> 01:07.320
So here the polarity will be zero point sixty nine.

01:07.370 --> 01:11.070
But that is a negative because of this bad word.

01:12.350 --> 01:19.070
If you want to get, let's say, just a polarity, that will be a negative number.

01:19.860 --> 01:20.360
Same way.

01:20.540 --> 01:22.610
Let's do it for me.

01:22.610 --> 01:24.950
Variable, that will be a positive rate even.

01:26.350 --> 01:27.700
So it's said you don't point seven.

01:27.900 --> 01:29.310
That means a positive sentiment.

01:30.180 --> 01:33.880
And the last one, see, that will be a neutral.

01:35.440 --> 01:37.110
So it's a zero point zero.

01:37.800 --> 01:44.980
All right, so now we know how to get the sentiment out of the texts and we know already how to fetch

01:44.980 --> 01:45.910
this data.

01:46.270 --> 01:54.730
So let's just do it every single text or a tweet and supply to this text block to find a sentiment available

01:54.730 --> 01:56.100
in an individual tweet.

01:57.040 --> 01:59.790
So let me just make FuelCell here.

02:02.640 --> 02:10.860
Now, from this whole Twitter sentiment, we are going to get a four parameter like out of Kozin three.

02:11.070 --> 02:12.590
How many of them are positive?

02:12.660 --> 02:13.980
How many of them are negative?

02:14.460 --> 02:15.830
How many of them are neutral?

02:16.380 --> 02:17.180
And what is it?

02:17.410 --> 02:18.510
Average polarity.

02:18.780 --> 02:23.640
So polarities about zero below zero on an average.

02:23.670 --> 02:24.360
So we'll see.

02:24.780 --> 02:29.130
So I defining default radio positive, negative, neutral polarity.

02:29.220 --> 02:32.370
As of now, everything is zero for now.

02:32.520 --> 02:36.680
Let me be clear to every single Twitter tweets.

02:37.170 --> 02:40.710
So that will be tweets, radio and so forth.

02:41.550 --> 02:44.380
Each tweet in.

02:49.820 --> 02:50.180
It's.

02:51.390 --> 02:56.100
Ledger's first name putting this tweet tax.

02:58.060 --> 03:01.570
So it will just this display, the tax associated with individual.

03:03.590 --> 03:04.100
All right.

03:04.230 --> 03:10.350
So you can see all those thousand tweet it has displayed and still it's going on.

03:11.380 --> 03:13.390
So it will take good amount of pain, I guess.

03:14.020 --> 03:15.070
All right, let's finish.

03:16.730 --> 03:16.920
Right.

03:17.620 --> 03:19.660
So these are the housing tweets.

03:21.570 --> 03:24.180
Now we are going to supply this to packs.

03:25.140 --> 03:28.920
Inside this tax block function to get the polarity.

03:29.610 --> 03:34.500
So let me copy of let us use your tax block.

03:35.400 --> 03:39.540
Let me assign it to somebody who let's say analysis.

03:41.370 --> 03:45.030
And next, we'll be finding from this analysis of polarity.

03:46.580 --> 03:48.740
So let's have polarity.

03:49.660 --> 03:50.420
Who will be?

03:51.380 --> 03:53.390
So as of now, the polarity zero.

03:53.420 --> 03:55.700
So we'll just keep upending the polarity.

03:56.550 --> 03:57.980
So that will be a whole.

03:58.450 --> 03:59.720
Is equal to polarity.

03:59.960 --> 04:03.390
Plus, we'll get the polarity for current.

04:03.850 --> 04:04.060
We.

04:05.200 --> 04:12.090
We'll be analysis, not sentiment, not clarity.

04:13.050 --> 04:13.440
All right.

04:14.020 --> 04:17.680
So we grabbed the polarity inside the polarity medium.

04:18.430 --> 04:25.300
Now, based on this polarity, we want to find how many of them said negative, positive and a neutral.

04:26.260 --> 04:28.150
So that will be so simple.

04:28.330 --> 04:34.600
Like, if the polarity is equal to zero, we'll just increment a counter for this neutral.

04:35.560 --> 04:43.630
If the polarity is less than ideal, incremental counter negative, has it given for the positive.

04:44.630 --> 04:44.990
All right.

04:45.160 --> 04:49.240
So if something embedded within the indication, we can just get.

04:50.090 --> 04:50.440
All right.

04:50.500 --> 04:51.280
So let me.

04:51.630 --> 04:52.010
Ranny.

04:54.660 --> 04:56.850
All right, so you can see immediately what that is.

04:57.560 --> 05:03.240
And let me just display how many positive tweets that the pope's.

05:05.600 --> 05:07.230
So says that detail.

05:07.520 --> 05:10.910
So what if something goes wrong, if you try to.

05:11.620 --> 05:15.460
Lastly, let's see, just do it for.

05:17.870 --> 05:18.990
And let me see.

05:18.990 --> 05:20.920
More loosening in legislating.

05:22.560 --> 05:24.400
So earlier, we got those thousand into.

05:24.710 --> 05:26.940
And now you can see we got almost GDP.

05:27.080 --> 05:29.400
So what just goes wrong here?

05:30.650 --> 05:33.020
So you can see we're dealing with here.

05:33.230 --> 05:41.510
Of course, the object that meets once Lucozade reach to the end of our Triplette object.

05:42.050 --> 05:43.190
Now, that is No.

05:43.430 --> 05:49.420
Two, it exists because all those thousand three one time we have already created over.

05:50.060 --> 05:55.050
So what we have to do, we have to again fetch those result inside the coaster.

05:55.700 --> 05:57.550
Let me run this one again.

05:58.590 --> 05:59.150
In No.

06:00.790 --> 06:02.050
Let me run this quick.

06:04.100 --> 06:11.490
Oh, so now you can see it's taking a little bit more time because it is trying to get every single

06:11.500 --> 06:20.340
tweet, all those thousand tweet, finding the polarity and find a counterpart is neutral, negative

06:20.340 --> 06:20.940
and a positive.

06:21.730 --> 06:24.750
Let us display how many positive reviews.

06:25.940 --> 06:28.760
So total 247 positive reviews.

06:33.170 --> 06:34.370
How many negatives did.

06:35.880 --> 06:37.300
176 and negative.

06:38.040 --> 06:43.970
And how many nutrients, 577 nuchal.

06:44.670 --> 06:45.600
What is the polarity?

06:45.670 --> 06:48.350
So it's towards the positive order.

06:48.810 --> 06:49.350
Negative.

06:51.630 --> 06:52.070
All right.

06:52.150 --> 06:54.380
You can see twenty two point zero eight.

06:54.720 --> 06:58.650
But we have to normalize it because we'll just added all those politely.

06:58.680 --> 07:00.030
We've done Hosein scores.

07:00.030 --> 07:00.930
Or we can just simply.

07:02.310 --> 07:02.860
Normalizing.

07:04.140 --> 07:07.260
And let us define one function before Ben.

07:08.250 --> 07:09.630
Finding the percentage.

07:12.000 --> 07:12.420
All right.

07:12.460 --> 07:15.190
So you can see I only find one percentage function.

07:15.380 --> 07:17.890
We're just going to find a percentage between your.

07:19.530 --> 07:21.330
Numerator Hannah denominator.

07:22.200 --> 07:25.020
So here we are just passing the positive.

07:25.090 --> 07:27.270
Total number of use out of whole.

07:28.330 --> 07:30.580
Total number of tweets, which we are read, right?

07:30.700 --> 07:36.180
Same for positive or negative in a neutral and simply for political, Sylvia, just marginally right.

07:36.270 --> 07:39.400
They got a number of tweets, hopes.

07:40.420 --> 07:45.300
We'll go find this dysfunction first and then call this function for all four.

07:45.550 --> 07:47.280
We do it now.

07:47.310 --> 07:48.620
Ledgers format that is in.

07:50.930 --> 07:51.320
All right.

07:51.920 --> 08:00.950
So now if you just display this positive, you can see positives is twenty four point seventy.

08:01.970 --> 08:03.820
That means it is divided by thousand.

08:04.140 --> 08:04.430
Similar.

08:04.590 --> 08:06.830
You will get the result for the remaining three or so.

08:07.910 --> 08:09.860
Now, let's try to display.

08:11.010 --> 08:13.260
Our overall summary of the result.

08:14.200 --> 08:22.450
So here what we have done for reaction of people, for some particular search done by analyzing total

08:22.450 --> 08:28.750
number of priests, I just use the plain statement and displayed rather qualities, did or not.

08:28.780 --> 08:32.260
So if it is zero, we are just going to display his neutral.

08:32.980 --> 08:39.020
Otherwise, it will be a negative and positive respectively, based on polarities, negative or positive

08:39.570 --> 08:40.540
ledges and any.

08:42.660 --> 08:45.230
All right, so the reaction of people on monkey.

08:45.870 --> 08:47.340
By analyzing hosen tweet.

08:47.790 --> 08:49.440
It's a positive reviews.

08:50.220 --> 08:50.580
All right.

08:51.060 --> 08:55.320
Now, let's try to display this result in some sort of paycheck's.

08:56.730 --> 09:01.770
So to display all those results in a paycheck form, we are only just this MacCulloch live legatee and

09:01.770 --> 09:06.390
I hope created this small lutein self matplotlib call that.

09:07.640 --> 09:16.010
We are going to display a positive, negative and a neutral value in some sort of paychecks for me.

09:16.490 --> 09:23.780
And it will give us an indication that out of full paycheck check this yellow part indicates that it's

09:23.780 --> 09:30.380
kind of neutral, really indicate that this much amount of negativeness are left out of those thousand.

09:31.370 --> 09:35.030
And this green part indicates some positive reviews.

09:35.730 --> 09:36.130
All right.

09:36.170 --> 09:41.360
So that is the whole story of this Twitter sentiment analysis.
