Open In App

Project Idea | Personality Analysis using hashtags from tweets

Last Updated : 07 Feb, 2018
Improve
Improve
Like Article
Like
Save
Share
Report

Introduction
The project is based on the concept of analyzing the personality of an individual, and plotting the sentiments of tweets according to user/community location.Our application would consider the actual mentality of the individuals along with the situation and topic and assess their personality accordingly.

Conceptual Framework
Our approach and idea goes through with the segregation of hash-tags from the tweets. The hashtags provide us with the topic about which the user has voiced his opinion. Analysis of hashtag is conducted in a way where a set of recent tweets containing the hash-tag term are collected, and the polarity of those tweets containing the term is analysed whether people have a positive, negative or neutral opinion about it. The second part is analysis of remaining text and finding the polarity of the tweet whether it is positive, negative or neutral. Along with the text if tweet contains any emoticons, the polarity of the emoticon is calculated using non-bmp map. Users can easily analyse their personality using their Twitter handle and also on any specific topic.

Data structures and Algorithms
Polarity of hash-tag tweets and polarity of the tweet of the user along with some other parameters led to formation of 8 personality traits :

  • Agreeableness : If the sentiment of tweet is equivalent to the sentiment of the majority on that topic or hash-tag, then the personality falls into this category. The final score for the trait “Agreeableness” for a specific user is assigned as : Total number of tweets with above combination(polarity of tweet = polarity of majority) / Total number of tweets by user.
  • Social Bird : An individual is assigned a score in this category on the basis of number of tweets by user in recent times. The final score for the trait “Social Bird” for a specific user is assigned as : Total number of tweets in recent times / Total number of tweets by user.
  • Public Figure / Not a public Figure: A user is assigned a score of 1 if his profile is Verified. Otherwise the user is assigned a score of 0 for this trait.
  • Optimist : If the sentiment of tweet is positive (+) and the sentiment of the majority on that topic or hash-tag is negative (-), then the personality falls into this category. The final score for the trait “Optimist” for a specific user is assigned as : Total number of user tweets with polarity = (+) / total number of majority tweets with polarity (-).
  • Pessimist : If the sentiment of tweet is negative (-) and the sentiment of the majority on that topic or hash-tag is positive (+), then the personality falls into this category. The final score for the trait “Pessimist” for a specific user is assigned as : Total number of user tweets with polarity = (-) / total number of majority tweets with polarity (+).
  • View Holder : If the sentiment of tweet is positive (+) or negative (-) and the sentiment of the majority on that topic or hash-tag is neutral, then the personality falls into this category. The final score for the trait “View Holder” for a specific user is assigned as : Total number of user tweets with polarity = (+) + total number of user tweets with polarity = (-) / total number of majority tweets with polarity neutral.
  • Spectator : If the sentiment of tweet is neutral and the sentiment of the majority on that topic or hash-tag is positive (+) or negative(-), then the personality falls into this category. The final score for the trait “Spectator” for a specific user is assigned as : Total number of user tweets with neutral polarity / total number of majority tweets with polarity = (+) + total number of majority tweets with polarity = (-).
  • Grammar Nazi : If the tweet of the user is grammatically correct, a score of 1 is given otherwise 0. Only the tweets with no hashtags are considered. Also, people make use of message lingo while tweeting so we have given a relaxation for 2 mistakes. The final score for the trait “Grammar Nazi” for a specific user is assigned as: Total tweets that are grammatically correct/ total number of tweets with no hashtags.

The score for each of the above categories is calculated for a twitter user. The algorithm combines the polarity of topic or hash-tag with the polarity of tweet which is bound to produce better and more accurate results as the user behaviour is genuine and transparent. The first 50 tweets of the user are fetched and corresponding to each tweet a thread is created. Parallel execution of thread is implemented so as to reduce the execution time which is an important aspect of our project.

Tools Used:
1. Python
2. Django
3. Tweepy
4. TextBlob
5. GingerIt

Application:
1.The target audience varies from children to senior citizens who wish to know about people’s personality, response and review about any topic.
2. The software can be used for people working in HR department of their offices in analyzing the personality of an applicant whether the applicant’s personality is suitable or not.
3. It can also be useful for people involved in politics as it would help them keep track of what people think about their decisions and actions.
4. People in the business field could be provided with customer reviews.

This idea is contributed by Swati Chauhan and Rishabh Jain.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads