Sentiment Analysis Python – 6 – Counting Emotions – Natural Language Processing (NLP)




[ad_1]

In this video, we will be adding the emotions to our empty emotion list and also counting emotions using the Counter from the collections package of Python

Source Code – https://github.com/attreyabhatt/Sentiment-Analysis

Next video – Emotions in a Graph using Matplotlib
https://youtu.be/t-h1BhO4V_U

Full playlist – https://www.youtube.com/playlist?list=PLhTjy8cBISEoOtB5_nwykvB9wfEDscuEo

Subscribe – https://www.youtube.com/channel/UCirPbvoHzD78Lnyll6YYUpg?sub_confirmation=1
Website – www.buildwithpython.com
Instagram – http://instagram.com/buildwithpython

#python #nltk #nlp

Source


[ad_2]

Comment List

  • buildwithpython
    December 29, 2020

    so how the code differ "happy" from "not happy" since the word "not" is in the stop_words list?

  • buildwithpython
    December 29, 2020

    word,emotion = clear_line.split(":")

    ValueError: not enough values to unpack (expected 2, got 1)
    why?

  • buildwithpython
    December 29, 2020

    Can you use the same codes for .csv file ??

  • buildwithpython
    December 29, 2020

    This works for me, but I don't get nearly as many matches as I would have liked to get. For example: I have txt files of amazon reviews for albums by genre. My rock genre file has about 70,000 words after it has been cleaned and stop words have been removed, but only 182 emotions are matched which is only 2-3 words out of 1,000. I might need a different/bigger emotion file list or maybe I should be measuring something else but I can't find a whole lot of lists online to use.

  • buildwithpython
    December 29, 2020

    How you will convert counter value into percentages?

  • buildwithpython
    December 29, 2020

    i copied data and analysis but in my text file single word not match to emotion.txt then what i do?

  • buildwithpython
    December 29, 2020

    Hii Attreya , I was facing a problem and want your help??

    Traceback (most recent call last):

    File "C:UsersabhijAnaconda3libtkinter_init__.py", line 1702, in __call_

    return self.func(*args)

    File "C:/Users/abhij/PycharmProjects/SentimentAnalyser/main.py", line 225, in Analyse

    word, emotion = clear_line.split(':')

    ValueError: not enough values to unpack (expected 2, got 1)

    The split method is not working …can you provide any contact medium ??

Write a comment