title
stringlengths
12
112
published
stringlengths
19
23
url
stringlengths
28
28
video_id
stringlengths
11
11
channel_id
stringclasses
5 values
id
stringlengths
16
31
text
stringlengths
0
596
start
float64
0
37.8k
end
float64
2.18
37.8k
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t122.88000000000001
So all we need to do is pass our sentiment model to a variable.
122.88
132.96
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t131.28
Which we will call sentiment model.
131.28
141.92
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t132.96
And we just need to write Flare.models.textClassifier and load.
132.96
152.8
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t147.84
And then in here, we pass the model name that we would like to load.
147.84
159.52
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t152.8
And in our case, it will be the English sentiment model, which is en-sentiment.
152.8
161.2
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t159.52
En-sentiment.
159.52
165.12
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t164.16
Like so.
164.16
172.32
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t168.64000000000001
OK, so now we are downloading the model.
168.64
177.36
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t172.8
And in a moment that will have downloaded and we can begin using it.
172.8
180.4
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t178.32000000000002
Now, obviously, we need data.
178.32
183.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t181.12
I have downloaded some data here.
181.12
190.56
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t183.76
Which is a sentiment data set based on the IMDB Movery reviews.
183.76
194.16
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t191.51999999999998
So you can find the same data set over here.
191.52
201.2
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t198.0
OK, so sentiment analysis on Movery reviews data set.
198
202.8
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t201.2
So it's from Rotten Tomatoes.
201.2
207.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t203.35999999999999
You can just scroll down and we have the training data and test data here.
203.36
211.6
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t207.76
I'm just going to use the test data and build a test data set.
207.76
215.2
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t211.6
I'm just going to use the test data, but we can use either.
211.6
220.16
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t215.2
We're just going to be making predictions based on the phrase here.
215.2
226
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t223.68
So we need to read in our data.
223.68
231.28
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t227.2
So it's going to read it in as if it were a CSV file.
227.2
235.36
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t231.28
And we will just pass a tab as our separator,
231.28
242.08
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t235.36
because we are actually working with a tab separated file.
235.36
259.28
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t254.64000000000001
OK, so here it's actually a CSV, not CSV.
254.64
265.44
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t259.28
OK, so the first thing you'll notice is that we actually have duplicates of the same phrase.
259.28
269.84
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t265.91999999999996
That is actually just how this data set is.
265.92
274.4
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t270.55999999999995
It just contains the full phrase initially.
270.56
277.44
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t274.4
So this first entry here is the full phrase.
274.4
282
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t278.4
And then all of these following are actually parts of that phrase.
278.4
289.84
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t282.0
So what we can do, so let's change it so we can actually see the full phrase first.
282
311.92
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t304.8
OK, so we can't really see that much more anyway, but we can see that the full phrase
304.8
312.8
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t311.92
has fine.
311.92
318.96
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t314.16
So to remove this, we just want to drop all of the duplicates
314.16
322.72
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t318.96000000000004
whilst keeping the first instance of the sentence ID.
318.96
325.92
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t322.72
So you see each one of these, they all have the same sentence ID.
322.72
329.04
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t326.72
It's actually only the first one that we need.
326.72
341.84
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t329.04
So we just drop duplicates on this column, keeping the first entry.
329.04
357.44
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t352.64000000000004
OK, so we're keeping the first entry, dropping duplicates from sentence ID,
352.64
359.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t357.44
and we're just doing this operation in place.
357.44
368.8
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t363.52
OK, so now we can see each sample is now a unique entry.
363.52
373.12
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t369.84
OK, so now our data is ready.
369.84
381.52
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t373.6
So we need to actually first convert our text into a token as list using Flare.
373.6
388.24
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t381.52
So Flare does this one sentence at a time. So if we, for example, pass
381.52
398
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t392.24
Hello World into the Flare tokenizer, we will be able to see what it's actually doing.
392.24
403.84
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t398.0
OK, so here we can see that it split each one of these into tokens.
398
409.44
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t403.84
So we've got Hello is a token, World is a token, and then we have also split the
403.84
411.28
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t409.44
exclamation mark at the end there.
409.44
417.2
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t412.8
And you can see that Flare is telling us that there are a total of three tokens.
412.8
420.56
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t417.2
So we can see that Flare is telling us that there are three tokens.
417.2
424.32
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t420.56
So we can see that Flare is telling us that there are three tokens.
420.56
429.04
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t424.32
And you can see that Flare is telling us that there are a total of three tokens there.
424.32
436.32
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t429.04
So each one of our samples here will need to be processed by this Flare.data.sentence
429.04
440.96
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t436.32
method before we pass it into the actual model.
436.32
448.88
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t442.15999999999997
Once we do have this, so let's call this sample as well.
442.16
452.08
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t448.88
We will pass it to our model for prediction.
448.88
458
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t454.4
Which is really easy. All we need to do is call the predict method.
454.4
461.52
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t460.4
On the sample.
460.4
466
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t463.52
And now this doesn't output anything.
463.52
472.48
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t466.8
Instead, it actually just modifies the sentence object that we have produced.
466.8
474.4
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t472.48
So it modifies sample.
472.48
479.36
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t474.4
And we can see now that our sample, we solved the sentence and we solved the number of tokens.
474.4
484.16
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t479.35999999999996
But we also have these additional labels which are the predictions.
479.36
491.2
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t485.2
We have the label which is positive, which means it's a happy or it's a positive sentiment.
485.2
500.48
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t492.23999999999995
And then what we have here is actually the probability or the confidence in that prediction.
492.24
505.28
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t500.48
That's great, but realistically we want to be extracting these labels.
500.48
513.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t506.8
So we're actually able to extract these by accessing the labels method.
506.8
520.48
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t515.04
So you have labels here and this produces the positive and the confidence.
515.04
527.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t521.6
To access each one of these we access the positive and the confidence.
521.6
535.52
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t527.76
We access index zero followed by dot value.
527.76
540.88
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t537.92
Okay, so this will give us the positive.
537.92
549.76
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t543.28
And then we can also do the same to get the confidence called the score.
543.28
551.46
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t550.96
Like that.
550.96
559.46
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t551.46
So what we can do now is just create a simple for loop that will go through each sample in our test
551.46
564.1
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t559.46
data and assign a probability for each one.
559.46
571.7
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t564.98
So we will initially create a sentiment and confidence list.
564.98
581.3
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t571.7
And then we will just as we are looping through the data we will append our sentiment values.
571.7
602.1
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t581.3
So the positive or negative and the confidence to each one of these lists.
581.3
614.82
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t602.1
So here we are first tokenizing our sentence.
602.1
623.14
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t617.94
Then we are making a prediction using that tokenized sentence which we are calling sample.
617.94
635.86
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t623.14
And as we did before we have now got this labeled sentence and we just need to extract the two labels that we have here.
623.14
667.86
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t653.14
Okay, so we can see here that one of our sentences was just blank so we will add in some logic to avoid any errors there.
653.14
695.3
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t683.3
Okay, so looking at this it's also whenever there's a space as well.
683.3
701.86
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t696.02
So we just need to trim this which we can do easily using the strip method.
696.02
710.34
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t701.86
Okay, so it took a little bit of time but we now have our predictions.
701.86
719.86
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t710.34
So what we want to do is actually add what we have here in the sentiment and confidence list to our data frame.
710.34
728.74
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t719.86
So to do that we just add df sentiment to create a new sentiment column.
719.86
736.82
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t728.74
And we made that equal to the sentiment list that we have created.
728.74
744.18
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t736.82
And then we also do the same for confidence as well.
736.82
751.62
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t749.86
Then we can see our data frame.
749.86
758.74
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t751.62
Okay, so initially looking at this it looks pretty good.
751.62
762.98
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t758.74
So intermittently pleasing but mostly routine effort.
758.74
770.02
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t762.98
Incredibly negative but basically saying it's occasionally okay but generally nothing special.
762.98
774.9
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t770.02
So obviously it's a negative sentiment which is matched up to negative sentiment here.
770.02
780.9
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t774.9
Here we're saying okay Kidman's the only thing that's worth watching in birthday girl.
774.9
786.18
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t780.9
And it serves as another example of the sad decline of British comedies in the post full monty world.
780.9
788.98
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t786.98
Fair enough, also negative.
786.98
792.66
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t790.1
So this one is our first positive.
790.1
794.42
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t792.66
Once you get into it it's relevant.
792.66
796.66
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t794.42
The movie becomes a heady experience.
794.42
799.54
How-to do Sentiment Analysis with Flair in Python
2020-12-04 14:00:03 UTC
https://youtu.be/DFtP1THE8fE
DFtP1THE8fE
UCv83tO5cePwHMt1952IVVHw
DFtP1THE8fE-t797.4599999999999
Yeah, I mean sounds pretty positive to me.
797.46
807.06