LabMT

From Brede Wiki

Jump to: navigation, search
Dataset (help)
LabMT
Variations:
Category: LabMT
Topics:

Sentiment analysis

Databases:
Links
Search
Papers: DOAJ Google Scholar PubMed
Ontologies: MeSH NeuroLex Wikidata Wikipedia
Other: Google Twitter WolframAlpha

LabMT is a word list score for sentiment analysis. It is available as supplementary material from an article:

http://www.plosone.org/article/fetchSingleRepresentation.action?uri=info:doi/10.1371/journal.pone.0026752.s001

The text file contains happiness rank, mean and standard deviation, Twitter rank and Google rank.

The word list is distributed as supplementary material to the article:

Temporal patterns of happiness and information in a global social network: hedonometrics and Twitter

Critical remarks are available in The language-dependent relationship between word happiness and frequency.

Contents

[edit] Example application

import pandas as pd
 
url = 'http://www.plosone.org/article/fetchSingleRepresentation.action?uri=info:doi/10.1371/journal.pone.0026752.s001'
labmt = pd.read_csv(url, skiprows=2, sep='\t', index_col=0)
 
average = labmt.happiness_average.mean()
happiness = (labmt.happiness_average - average).to_dict()
 
def score(text):
    words = text.split()
    return sum([happiness.get(word.lower(), 0.0) for word in words]) / len(words)
 
>>> score('Incredibly and excellent')
1.2647603208765403
>>> score('Oh so bad should be avoided at all costs')
-0.66635079023457044

[edit] See also

[edit] Papers

  1. Temporal patterns of happiness and information in a global social network: hedonometrics and Twitter

[edit] Applications

  1. Citius: a naive-Bayes strategy for sentiment analysis on English tweets
  2. Human language reveals a universal positivity bias
  3. Quantifying the role of the opinion lexicon in sentiment analysis
Personal tools