Calculate number of positive and negative string for each word in a list
Question: I am new in python and hope you could help me solve this problem and I am
using python 3.4.

I have a list that contain word,either positive or negative, and it's
frequency

This is the original list:

    
    
    `finalSentiment = [('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'),  ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'), ('hijacked', 'negative'),  ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('left', 'negative'), ('pay', 'negative'), ('pay', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('befo', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('radical', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('tcot', 'negative'), ('mt', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('loony', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('right', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('tanker', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('people', 'negative'), ('sadly', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('morons', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('oil', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('get', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('account', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('pirates', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('flag', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('like', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('day', 'negative'), ('malaysia', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('one', 'negative'), ('got', 'negative'), ('got', 'negative'), ('got', 'negative'), ('got', 'negative'), ('got', 'negative'), ('got', 'negative'), ('got', 'negative'), ('long', 'negative'), ('long', 'negative'), ('long', 'negative'), ('long', 'negative'), ('long', 'negative'), ('long', 'negative'), ('long', 'negative'), ('none', 'positive'), ('look', 'positive'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('time', 'negative'), ('fathers', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('terrorist', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('know', 'negative'), ('driver', 'negative'), ('driver', 'negative'), ('driver', 'negative'), ('driver', 'negative'), ('driver', 'negative'), ('driver', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('angry', 'negative'), ('live', 'negative'), ('live', 'negative'), ('live', 'negative'), ('dem', 'negative'), ('dem', 'negative'), ('dem', 'negative'), ('dem', 'negative'), ('dem', 'negative'), ('dem', 'negative'), ('dem', 'negative')]`
    

What i am trying to do is to calculate number of positive and negative for
each word from the list that I have. So that if the number of negative is
higher, the word is negative. Then I can come out with a new list like: eg:
`newList = [('hijacked','negative'),('left','negative'), . . .]`

a) I try using the `num = Count(finalSentiment).most_common()[:50]` function
and came out with the new list as below.

    
    
    num =  [(('hijacked', 'negative'), 302), (('left', 'negative'), 88), (('one', 'negative'), 79), (('befo', 'negative'), 72), (('radical', 'negative'), 70), (('tcot', 'negative'), 70), (('tanker', 'negative'), 55), (('like', 'negative'), 47), (('right', 'negative'), 36), (('oil', 'negative'), 26), (('hijacked', 'positive'), 22), (('pirates', 'negative'), 21), (('people', 'negative'), 21), (('terrorist', 'negative'), 21), (('loony', 'negative'), 18), (('morons', 'negative'), 18), (('get', 'negative'), 17), (('account', 'negative'), 12), (('flag', 'negative'), 11), (('time', 'negative'), 10), (('angry', 'negative'), 9), (('like', 'positive'), 8), (('day', 'negative'), 8), (('know', 'negative'), 8), (('dem', 'negative'), 7), (('tanker', 'positive'), 7), (('long', 'negative'), 6), (('left', 'positive'), 6), (('driver', 'negative'), 6), (('one', 'positive'), 6), (('got', 'negative'), 6), (('tcot', 'positive'), 5), (('radical', 'positive'), 5), (('befo', 'positive'), 5), (('pirates', 'positive'), 3), (('live', 'negative'), 3), (('oil', 'positive'), 2), (('time', 'positive'), 2), (('pay', 'negative'), 2), (('none', 'positive'), 1), (('people', 'positive'), 1), (('morons', 'positive'), 1), (('long', 'positive'), 1), (('account', 'positive'), 1), (('mt', 'negative'), 1), (('got', 'positive'), 1), (('day', 'positive'), 1), (('loony', 'positive'), 1), (('know', 'positive'), 1), (('fathers', 'negative'), 1)]
    

What I want to do is to compare the word frequency either positive or negative
is higher. So, if negative is higher I want to create a new list that contain
the word and negative.

eg: `[('hijacked','negative'),('left','negative'), . . .]`

Each word will only have either positive or negative in the list.

What I have try to is I try to access each of the item in the list using for
loop.

    
    
    for item in num:
    
            unique_word = item[0]
            temp = unique_word[0]
            temp1 = unique_word[1]
            frequency = item[1]
    

but I cant figure out how to manipulate the data after I access it.

b) I use counter() function and come out with this list:

    
    
    cnt = Counter()
    for word in finalSentiment:
        cnt[word] += 1
    print(cnt)
    
    Counter({('hijacked', 'negative'): 302, ('left', 'negative'): 88, ('one', 'negative'): 79, ('befo', 'negative'): 72, ('tcot', 'negative'): 70, ('radical', 'negative'): 70, ('tanker', 'negative'): 55, ('like', 'negative'): 47, ('right', 'negative'): 36, ('oil', 'negative'): 26, ('hijacked', 'positive'): 22, ('pirates', 'negative'): 21, ('terrorist', 'negative'): 21, ('people', 'negative'): 21, ('morons', 'negative'): 18, ('loony', 'negative'): 18, ('get', 'negative'): 17, ('account', 'negative'): 12, ('flag', 'negative'): 11, ('time', 'negative'): 10, ('angry', 'negative'): 9, ('like', 'positive'): 8, ('day', 'negative'): 8, ('know', 'negative'): 8, ('dem', 'negative'): 7, ('tanker', 'positive'): 7, ('got', 'negative'): 6, ('left', 'positive'): 6, ('one', 'positive'): 6, ('driver', 'negative'): 6, ('long', 'negative'): 6, ('radical', 'positive'): 5, ('befo', 'positive'): 5, ('tcot', 'positive'): 5, ('pirates', 'positive'): 3, ('live', 'negative'): 3, ('time', 'positive'): 2, ('pay', 'negative'): 2, ('oil', 'positive'): 2, ('mt', 'negative'): 1, ('loony', 'positive'): 1, ('morons', 'positive'): 1, ('long', 'positive'): 1, ('got', 'positive'): 1, ('sadly', 'negative'): 1, ('day', 'positive'): 1, ('none', 'positive'): 1, ('fathers', 'negative'): 1, ('account', 'positive'): 1, ('malaysia', 'negative'): 1, ('right', 'positive'): 1, ('people', 'positive'): 1, ('know', 'positive'): 1, ('look', 'positive'): 1})
    

The problem I have now is how to compare as example the word 'hijacked', the
number of negative is higher. So in the new list, 'hijacked' should be
'negative such that: eg: newList =
`[('hijacked','negative'),('left','negative'), . . .]`

c) OR maybe I should calculate number of positive and negative on my own
instead of using the `most_common()` function or `counter()`. My problem to
calculate the number of positive and negative is because there are multiple
word in the list. If the word is only 'hijacked' with positive and negative
attached to it I think I can solve the problem.

Any help will be much appreciated.


Answer: 
    from collections import Counter
    
    counts = Counter(finalSentiment)
    
    output = [] 
    for word in set(w for w, s in finalSentiment):
        if counts.get((word, 'positive'), 0) > counts.get((word, 'negative'), 0):
            output.append((word, 'positive'))
        else:
            output.append((word, 'negative'))
    

