Sentiment Analysis on ED / Dieting posts

Does a post submitted to eating disorders forums have higher likelihood of containing negative feelings or attitudes from the writer? How about dieting forums? How are these attitudes different from other irrelevant topic forums? We can find answers by sentiment analysis on posts from all four forums.

Sentiment analysis is the process using machine learning models to classify opinions expressed in text, especially to determine whether the writer’s attitude towards a particular topic is positive, negative, or neutral. The good news is, we can use some pre-trained sentiment analysis tools available in various Python NLP libraries, such as NLTK, Textblob, and Flair.


NLTK’s Vader sentiment analysis takes advantage of the ‘bag of words’ approach, combining a dictionary of positive and negative words with higher score of intensity if some words like “really”, “so” or “not” are present. The advantage of this tool is that negated positive expressions (like ‘not happy’, ‘not good’) will still receive higher scores in negative sentiment.

Here are the results of NLTK Vader sentiment analysis on Eating Disorder / Dieting / general health / other irrelevant forum posts.

NLTK sentiment results in Eating Disorders forums
NLTK sentiment results in Dieting forums
NLTK sentiment results in General Health forums
NLTK sentiment results in Control Group forums

It’s not surprising that posts in eating disorders forums contains significantly higher intensity of negative sentiments and lower intensity of positive ones, than those in control group and general health forums. From clinical research, patients consider eating disorders to be unavoidably painful. No wonder the discussions in online forums reveals more negative attitudes.

Sentiment results in dieting forums are close to general health forums according to NLTK Vader model, while both of them have higher intensity of positive attitudes and lower intensity of negative attitudes than other irrelevant topic forums in control group.

The opposite results of sentiment analysis on eating disorders forums and dieting forums given by NLTK indicates the ‘tricky’ relationship between dieting and eating disorders.

At the beginning of diet, people only intend to gain better health results by changing lifestyle, losing weight, regularly exercising, etc. At this early stage, few of them are aware of the risk of developing eating disorders, and the expression in posts submitted to dieting forums could contain more optimistic attitudes. While people who struggle with eating disorders are usually suffering depression, anxiety and other negative mental disorders at the same time.


Sentiment analysis in Textblob also uses a bag of word classifier, but it includes ‘subjectivity analysis’ as well. The average polarity and subjectivity with one standard deviation confidence intervals in all four forum groups are given below.

Negative sentiment and higher degree of subjectivity are shown eating disorders forums.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: