/StackEmo

Primary LanguageJavaScript

StackEmo

risha iittp

What is StackEmo?

  1. StackEmo is a Google Chrome plug-in, that augments posts on Stack Overflow platform with Emojis, based on the emotions being conveyed by the posts.
  2. The current version augments only comments on Stack Overflow.
  3. Questions and Answers can also be augmented in future versions.

Features of StackEmo:

  1. Identifies emotions of posts on Stack Overflow
  2. Classifies each post(comment) into one of the nine emotion categories
  3. Appends emoji to comments based on the emotion category into which they fall.

Uses of StackEmo:

Stack Overflow is frequently visited by developers and novice programmers to view solutions to multiple issues faced during development.
Many questions on the platform have more than one accepted answers, which are correct.
The answers are accompanied by comments that help users in deciding on choosing the best suited answer for their problem.
With the help of StackEmo, users can visually see the emotion being expressed in the comment and choose the answer(possibly the answer having more positive comments).
Appending emojis could act as the motivating factor towards reading the comments and also for contributing towards the post.

Working of StackEmo:

StackEmo has been developed in Javascript, following the approach below:

approach

  1. DataSet Extraction: We have downloaded the file - Comments.xml.7z from SOTorrent to analyse comments on Stack Overflow. We randomly selected about 50K comments from the dataset for tool development.
  2. DataSet Preprocessing: We have preprocessed the resulting dataset of 50K comment posts for stopword removal and lemmatized the document using spaCy.
  3. Latent Dirichlet Allocation Model: We applied LDA model on the processed dataset. We specified the number of classes parameter value to be 9. The number of classes parameter was based on manual inspection of 200 comments on SO, and the categorization was based on card sorting approach.
  4. Emoji Assignment for Classes: Based on the resulting output categories of LDA, we prepared keyword sets for each class and labelled the classes with relevant emojis, resulting in emojified classes.
  5. Build Rule Based Classifier Model: We then defined a Rule Based Classifier (RBC) that takes into consideration results generated by difference calculator and NLTK sentiment predictor to classify the text passed based on predefined classification rules.
  6. Once the text is classified, the emoji of the corresponding class is fetched from the predefined class-emoji table and is appended to the text.

Classes-Emoji Table:

classes

What's inside StackEmo Repository:

In the StackEmo folder,
"stackemo.js" file contains all the source code related to preprocessing text, applying LDA and sentiment analysis, identifying emotion category of the text and finally appending emoji corresponding to the emotion category to the text. "manifest.json" file includes the url that triggers start of StackEmo and other application related data.

Steps to install StackEmo:

  1. Download the repository on your local machine.
  2. Unzip the folder and extract it to a location of your choice on your PC.
  3. Now, open Google Chrome and Go to Settings
  4. Select Extensions or navigate to chrome://extensions
  5. Turn on Developer Mode at the right side top corner of chrome://extensions
  6. Click on “Load unpacked”
  7. A popup appears to select folder
  8. Select StackEmo folder from the location you previously extracted to, and click on OK.
  9. StackEmo Plugin gets installed on Chrome.

Steps to use StackEmo:

  1. Navigate to Stack Overflow (https://stackoverflow.com/)
  2. Navigate to any queries of your choice.
  3. You will see that comments on Stack Overflow are accompanied by Emojis.

How to contribute to StackEmo

We will be very happy to receive any kind of contributions. Incase of a bug or an enhancement idea or a feature improvement idea, please open an issue or a pull request. Incase of any queries or if you would like to give any suggestions, please feel free to contact Akhila Sri Manasa Venigalla (cs19d504@iittp.ac.in) or Sridhar Chimalakonda (ch@iittp.ac.in) of RISHA Lab, IIT Tirupati, India.