Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6609 of /var/data/sites/methodi.ca-7.63/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6609 of /var/data/sites/methodi.ca-7.63/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6609 of /var/data/sites/methodi.ca-7.63/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6609 of /var/data/sites/methodi.ca-7.63/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6609 of /var/data/sites/methodi.ca-7.63/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/data/sites/methodi.ca-7.63/includes/common.inc).

General Sentiment Analysis

Introduction 

This is a recipe for analyzing the mood or opinion of a text or corpus.

Ingredients 
  • A single text or corpus to analyze
  • A Sentiment Analysis tool such as Python NLTK or the R, TM module for R
  • A tool for graphing the positive/negative scores of each text (when analyzing a corpus)
Steps 
  • Select a text or corpus to analyze, or scrape the web (e.g. Twitter) to develop a corpus
  • Manually Create a Word List and assign a positivity/negativity score to each word
  • Analyze the corpus for the listed words, creating a score for each text based on word frequency

OR

  • Use a more advanced method for creating a Word List, such as WordNet in Python NLTK
  • Identify the different degrees of positivity/negativity the word has in different situations
  • Develop methods to contextualize the word (e.g. identify it as a noun, verb, etc.) so that the most accurate synonym (and thus positivity/negativity score) can be assigned
  • Graph the results to see the positivity/negativity of the corpus as a whole
Next steps / further information 
Status