Twitter Sentiment Analysis by Python | best NLP model 2022

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 106

  • @aispectrum
    @aispectrum  2 ปีที่แล้ว +7

    Thanks for watching! If you want to get twitter data from the twitter API, check out this playlist th-cam.com/play/PL7Lkk4UtXtOw04G1nRapMNgd2myNJCZSJ.html

    • @trimmmm11
      @trimmmm11 ปีที่แล้ว

      Can you please how to execute twitter sentiment analysis based on ordinal regression project...

  • @RyanPu-js9gl
    @RyanPu-js9gl 2 ปีที่แล้ว +16

    Great tutorials! All your code can run successfully and they are the most up-to-date! I am liking all your videos and look forward to your future ones!

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว +2

      I'm really happy that the videos could be useful 🙂

  • @PatrickChoi
    @PatrickChoi 2 ปีที่แล้ว +3

    Your videos have rly been helping with my thesis, you're the real MVP, thanks!

  • @anthonymiguelzamoraramirez2072
    @anthonymiguelzamoraramirez2072 2 ปีที่แล้ว +1

    Hi, my friend. I'm from Peru, I'm doing my thesis in sentiment Analysis, so thank you so much for your videos. My progress exists thanks to you hahaha

  • @nahiyanalamgir7056
    @nahiyanalamgir7056 ปีที่แล้ว +4

    Almost forgot until the end that I watched the video at 2x speed and it felt natural at that speed lol

  • @MehdiMahan
    @MehdiMahan 4 หลายเดือนก่อน

    واقعا عالی بودش ؛ ممنون بابت اطلاعات مفیدتون

  • @ThisIsMyPurpose
    @ThisIsMyPurpose 2 ปีที่แล้ว

    Your tutorials are really the best fr fr

  • @manish-gupta
    @manish-gupta 2 ปีที่แล้ว

    Wow man!!! your tutorials are super easy to follow. I came across your channel searching something randomly. Wish you the best to grow this channel and bring more such videos.

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว +1

      Thanks a ton! I'm so happy that you found the videos helpful :-)

  • @mangerikcom
    @mangerikcom ปีที่แล้ว

    I just found your channel. i'm looking for this video. Thank you for sharing

  • @y.a7988
    @y.a7988 7 หลายเดือนก่อน

    the best videos ever, thanks !!!

  • @abdullahqamar4317
    @abdullahqamar4317 3 หลายเดือนก่อน

    Thanks Buddy
    I first time visited you and this video helped me alot

  • @michaelsolomon6033
    @michaelsolomon6033 ปีที่แล้ว

    This content is really educative. Learnt lots from it

  • @riccardobastianutti7720
    @riccardobastianutti7720 2 ปีที่แล้ว

    Thank you, your videos are essential and very useful for those like me who approach this type of analysis

  • @elahehgorgin6807
    @elahehgorgin6807 2 ปีที่แล้ว +1

    Great video, great content, and great lecture. I could easily understand it 🌹.

  • @annarocha9769
    @annarocha9769 2 ปีที่แล้ว

    Thank you! can't wait to start my project :)

  • @greenfutureyt
    @greenfutureyt ปีที่แล้ว

    Really useful, and easy to follow video. Thanks for sharing.

  • @AJ-yn4tj
    @AJ-yn4tj 2 ปีที่แล้ว +4

    Very very good tutorials! Both the quality of the video and the quality of how you explain the different code + a very good choice on what kind of video to make! 🙌 Keep going
    Is it possible to have a video on how to catch the number of tweets that have been posted in the past x months/years from one specific account? Thank you

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว

      Thank you very much for the nice words and the suggestion :-)

  • @CUTspncube
    @CUTspncube ปีที่แล้ว

    Great video, easy to follow. thank you

  • @soheilmohammadi7076
    @soheilmohammadi7076 ปีที่แล้ว

    dadash that was great damet gam❤❤❤

  • @LaTishaDStyles
    @LaTishaDStyles 2 ปีที่แล้ว

    You’re a great teacher!

  • @buckyducky2581
    @buckyducky2581 2 ปีที่แล้ว

    Thank you for your instruction. I followed through, made some modifications, and managed to do sentiment analysis for 5000 tweets. It took like 12 hours to do it though, with 7-8 seconds for each tweet. And for some reasons, all of the emojis were corrupted.

    • @mattjoe182
      @mattjoe182 2 ปีที่แล้ว

      Those 'corrupter emojis' you're seeing are probably just utf8 encoded

  • @aliabasnezhad7872
    @aliabasnezhad7872 2 ปีที่แล้ว

    thanks for the Video, please make more NLP videos!

  • @Juan-Hdez
    @Juan-Hdez 2 ปีที่แล้ว

    Very useful. Thank you!

  • @MiguelGuerraLeon
    @MiguelGuerraLeon 2 ปีที่แล้ว +7

    Great job. Please, what tool or process would you do to create a graphical dashboard to visualize the data?

  • @olatundeolukoya1788
    @olatundeolukoya1788 ปีที่แล้ว

    Great Knowledge !!

  • @rafikberkouk1487
    @rafikberkouk1487 2 ปีที่แล้ว +4

    hey , i have this error , do you know why please ?
    NameError: name 'AutoModelForSequenceClassification' is not defined

  • @comradeff7241
    @comradeff7241 2 ปีที่แล้ว

    Wonderful Video Thank you for uploading :)

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว

      Glad you enjoyed it!

  • @thereisnoname0859
    @thereisnoname0859 2 ปีที่แล้ว

    thanks a lot mate.

  • @mahmoodmohamadinezhad4316
    @mahmoodmohamadinezhad4316 6 หลายเดือนก่อน

    Thanks bro, that was خفن !

  • @mohameddehina6095
    @mohameddehina6095 2 ปีที่แล้ว

    Very good video thank you

  • @nastaran1010
    @nastaran1010 ปีที่แล้ว

    would you please provide video about topic modeling as well?

  • @nastaran1010
    @nastaran1010 ปีที่แล้ว

    Hi, It was helpful.

  • @artfromtheheart9545
    @artfromtheheart9545 ปีที่แล้ว

    Can You Please Make video for this? "Automated Classification of Societal Sentiments
    on Twitter With Machine Learning"

  • @DailyVibz
    @DailyVibz 6 หลายเดือนก่อน

    Ausome ! As an accountant, i am interested in getting into Python for various analysis . please which book to learn from from scratch and comprehensively.

  • @reihanar5079
    @reihanar5079 ปีที่แล้ว

    Hi, thanks for sharing your knowledge. I want to know if i can use this for other language like Persian?

  • @gadher80
    @gadher80 ปีที่แล้ว +3

    No more Free Access of Twitter API anymore, They cost you 100$ per month. I started this project and come to at the end while pulling the tweet request.

    • @siddhubhai2508
      @siddhubhai2508 6 หลายเดือนก่อน +1

      🤦 He has tutorial on getting tweets without api

  • @cillian.ccod_
    @cillian.ccod_ ปีที่แล้ว

    everything imported fine but I'm getting a "tweet.words" not defined issue

  • @mahbubsanju-yr6rn
    @mahbubsanju-yr6rn ปีที่แล้ว

    how i can use a total dataset and get a sentiment calculation instead of using individual line as data??

  • @AndreaBertini_official
    @AndreaBertini_official ปีที่แล้ว

    Good code, can i use this code to have info about a stock?

  • @aliathar891
    @aliathar891 2 ปีที่แล้ว

    Thank you bro!!
    How to search tweets from a specific area. Can you please help me this?

  • @mo-mojo3479
    @mo-mojo3479 7 หลายเดือนก่อน

    @aispectrum, can I use the same roberto model for Instagram comments? I have the comments but not sure which model I have to use for sentimental analysis. Thanks for your content.

  • @somag6810
    @somag6810 9 หลายเดือนก่อน

    How do we know the sequence of the scores is Negative, Neutral and Positive. And everytime the output is going to be 3 scores? Is the output of raw scores given by Roberta cosine similarity? Unable to follow that part? Great insights though

  • @djangoworldwide7925
    @djangoworldwide7925 10 หลายเดือนก่อน

    any thoughts on a free api for today's tweets?
    + is this model pretrained only in english? would be nice to test some other languages as well...

  • @plavali_znaem
    @plavali_znaem 2 ปีที่แล้ว

    wondering, if the model would work with another languages...

  • @keerthi2141
    @keerthi2141 2 ปีที่แล้ว +2

    Hey, ur playlist helped me alot. I'm working on twitter data related to some social issues in our society (india). But majority of tweets are in regional languages. Tried using google translator API but results are not satisfactory. Can this model analyze all languages??

  • @ddbohra8426
    @ddbohra8426 2 ปีที่แล้ว

    automodelforsequencetokenizer is not working (File not Found error.. while i have downloaded the transformer)

  • @rohitray5947
    @rohitray5947 ปีที่แล้ว

    Can you develop a hashtag recommendation system for twitter in python using twitter datasets ?

  • @ayushgajbhiye9345
    @ayushgajbhiye9345 7 หลายเดือนก่อน

    i got a erroe names scipy is not defined plz help

  • @trendytrends9998
    @trendytrends9998 ปีที่แล้ว

    i have a question that this sentiment analysis just works on comment that we put here or can we make sentiment analysis from the post of someone's comment/tweets section hope you understand

  • @sorayaanvari5906
    @sorayaanvari5906 2 ปีที่แล้ว

    great thanks

  • @rantg
    @rantg ปีที่แล้ว

    is this module accurate for less obvious twits ?

  • @henrythomas9607
    @henrythomas9607 2 ปีที่แล้ว

    is there a way to be able to do multiple tweets at once

  • @sapanadeshmukh7850
    @sapanadeshmukh7850 11 หลายเดือนก่อน

    I am working on Instagram sentiment analysis can you please suggest which dataset to use and which algorithm to use?

  • @manoelcamilodesousa
    @manoelcamilodesousa ปีที่แล้ว

    This script works for portuguese twittes: Or I must to change?

  • @henrythomas9607
    @henrythomas9607 2 ปีที่แล้ว

    Is there a way to do multiple tweets at once

  • @rehahazir5403
    @rehahazir5403 2 ปีที่แล้ว

    How can ı pass this emoji problem ? it always gives me an Unicode problem. 'charmap' codec can't encode character.
    Still dont get it. please help 👍

  • @linaal-fawzan8066
    @linaal-fawzan8066 ปีที่แล้ว

    Please, can you tell me what algorithm is used in this code? + how much accuracy is this dataset?
    🙏🏻

  • @vinsmokearifka
    @vinsmokearifka ปีที่แล้ว

    Thank you Sir, how about non english dataset Sir?

    • @redrumxisy
      @redrumxisy 10 หลายเดือนก่อน

      use language translation in python, I came across a video in my language (Indonesia) that explained about it.

  • @jesusbaug
    @jesusbaug 2 ปีที่แล้ว

    What are the consequences of using "max_length" with several tweets?
    Because it's analyzing different tweets with different lengths that I joined in one text. If I use max_length "100", it means 100 tokens, am I correct? Which can be include tokens across different tweets... so, I am really struggling to run it over a large number of tweets.

  • @limyong8823
    @limyong8823 2 ปีที่แล้ว +1

    Great video, just curious about how do I use Twitter data saved in a CSV file to make this work?

    • @ethanboucher4682
      @ethanboucher4682 2 ปีที่แล้ว

      have you figured it out?

    • @limyong8823
      @limyong8823 2 ปีที่แล้ว

      @@ethanboucher4682 not yet

    • @lidapg
      @lidapg 2 ปีที่แล้ว

      @@limyong8823 Hola, lograste hacerlo?

    • @popswav2171
      @popswav2171 2 ปีที่แล้ว

      Were you able to do this please

  • @RaoufAbdellatif
    @RaoufAbdellatif ปีที่แล้ว

    Hey, I wonder if the tweet must be in English only! can you pass the text in other language? like French or Spanish?

  • @michaelodewumi8645
    @michaelodewumi8645 ปีที่แล้ว

    Good day, lovely tutorials. If I may ask, if one wants to do something similar for Instagram comments of a profile. How does one go about this?

  • @stephenbradley445
    @stephenbradley445 2 ปีที่แล้ว

    "from transformers import AutoTokenizer [and/or] AutoModelForSequenceClassification" kills the kernel in jupyter notebook.
    I've tried uninstalling and re-installing stuff, pip and conda, etc.
    Would love a fix!

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว

      If it's fine, you can try google colab. I have tried it with colab and had no problem.

    • @stephenbradley445
      @stephenbradley445 2 ปีที่แล้ว

      @@aispectrum Your solution worked. Thank you! I know this is a very simple question, but how do I modify your code to apply to a df of tweets instead of a single tweet? Presently, I can only do it by creating new variables ('encoded_tweets'; 'scores'; etc.) as empty lists of length equal to the length of my df then iterating through those lists. In R, I would just use "mutate" and it would be incredibly simply and fast.

  • @facundovelastiqui8162
    @facundovelastiqui8162 2 ปีที่แล้ว

    FUCKING GREAT BRO!

  • @dparr7637
    @dparr7637 2 ปีที่แล้ว

    Very helpful video. How would you go about doing this for a large list of tweets?

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว

      It is possible to do the same analysis for multiple tweets. After doing the preprocessing on the text (@username to user , etc), just pass the list of the tweets to the tokenizer (just make sure to specify the max_length, and padding=True,truncation=True) and get the encoded_tweet. After geting the output, you can get the scores by writing softmax(output[0].detach().numpy(), axis=1)

    • @shawn4634
      @shawn4634 2 ปีที่แล้ว

      @Fixes and Updates [Muzaffar Seyed] Did you figure out?

    • @jesusbaug
      @jesusbaug 2 ปีที่แล้ว

      ​ @aispectrum encoded_tweet = tokenizer(tweet_proce, max_length = 100, padding = True, truncation = True, return_tensors= 'pt')

    • @omtrivedi5555
      @omtrivedi5555 ปีที่แล้ว

      @@jesusbaug hi can u send the code of how we can give multiple tweets as input...
      I have written tweet = ['Great content subscribed' , 'Hiii sir' ]
      But when i am giving this in :
      For word in tweet.spli() it is throwing error, can you help please

  • @Timoteo00
    @Timoteo00 2 ปีที่แล้ว

    Great Video. I am having an error but I don't why. The error is 'RuntimeError: Numpy is not available', I already have installed Numpy, maybe You can help me. thanks buddy

  • @CindiTeasley
    @CindiTeasley 2 ปีที่แล้ว

    why can’t I download transformers? I keep getting an error

  • @mohammadahmadi1796
    @mohammadahmadi1796 2 ปีที่แล้ว

    When I try to reproduce your results, for output = model(**econded_tweet), on a different dataset, I get this error:
    RuntimeError: The expanded size of the tensor (1114) must match the existing size (514) at non-singleton dimension 1. Target sizes: [146609, 1114]. Tensor sizes: [1, 514]
    What can I do to fix it?

  • @nicovan9551
    @nicovan9551 2 ปีที่แล้ว

    Hey ! Thanks a lot for your videos, helps so much ! I'm new in Python and I wanted to give a list of tweets (as you did in your video "How to get TWEETS by Python | Twitter API 2022") instead of a single tweet. I succeeded in getting every score for every tweet but it could be great to keep only the best score (and its corresponding label) for each. How would you do that ? Thanks a lot for your content !

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว +1

      Thanks. Maybe you can try this code to get the max and its label:
      max_value = np.amax(scores)
      max_label = labels[np.argmax(scores)]

    • @nicovan9551
      @nicovan9551 2 ปีที่แล้ว +1

      @@aispectrum Thanks for your help. Works great but if I try to add it to the dataframe (to have the label and prediction), it is the sames values for all rows. For example "Neutral" and "0,75" for the first row and same for the following ones :/ Sorry for my lack of skills

    • @tehoenkim9876
      @tehoenkim9876 ปีที่แล้ว

      Hey I'm also trying to get every score for every tweet but I just can't seem to get it, would you mind explaining it to me how you did it? :)))

  • @amenisghairabenali6812
    @amenisghairabenali6812 2 ปีที่แล้ว

    hi please have you any idea how can i collect data from facebook like post i need to collect a dataset about corona

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว

      I have never worked with facebook. But I would first see if the facebook api can help in data collection, if not, you could try with web scraping.

  • @ahmed.alnaqbi
    @ahmed.alnaqbi 2 ปีที่แล้ว +1

    Hello, would you use Sum or Mean to visualize the sentiments in presentable fashion ?

  • @socialmediaanalyticsandvisuali
    @socialmediaanalyticsandvisuali ปีที่แล้ว

    nice

  • @hemalshah1410
    @hemalshah1410 2 ปีที่แล้ว

    Hello , found your labs very interesting and well-explained . I have a query sir. Sometime while fetching real - time tweets I get 403 response. I am having essential access on my twitter dev account. What could be reason ?

    • @aispectrum
      @aispectrum  2 ปีที่แล้ว +1

      I believe because you have essential access, you cannot use the API v1.1 (tweepy.API). You could either request for an elevated access or try to use the API v2 instead (tweepy.Client).

  • @paymansalehi9942
    @paymansalehi9942 2 ปีที่แล้ว

    How to track FREE real time hashtag of twitter Mr. Mehran????

  • @ironF5
    @ironF5 ปีที่แล้ว

    should have applied to a dataframe of 10 tweets...

    • @ironF5
      @ironF5 ปีที่แล้ว

      if anyone is interested: the above query can be achieved using following code (rest of the code stays the same)
      # sentiment analysis
      def SA(tweet_proc):
      encoded_tweet= tokenizer(tweet_proc,return_tensors='pt')
      output=model(**encoded_tweet)
      scores=output[0][0].detach().numpy()
      scores=softmax(scores)
      ind=np.argmax(scores,axis=0)
      return labels[ind]
      df['SA'] = df['Text'].apply(SA)

  • @pensychan8053
    @pensychan8053 4 หลายเดือนก่อน

    Not really for begginer. You just mentioned all the steps but without explaining what they do especially for begginers🙃

  • @mohameddehina6095
    @mohameddehina6095 2 ปีที่แล้ว

    Did not like it

  • @nohaelhaddad4425
    @nohaelhaddad4425 2 ปีที่แล้ว

    100% useful

  • @will201084
    @will201084 11 หลายเดือนก่อน

    I seen way better methods...

  • @SocialPrime
    @SocialPrime ปีที่แล้ว

    Does both pytorch and tensorflow use my gpu for the sentiment analysis? I've managed to implement the code in my project, but the sentiment analysis runs very slow. Will it be faster if I switch to tensor flow and how do i do that?