Giter VIP home page Giter VIP logo

moody-trudes's Introduction

MoodY! Trudes

The basic purpose of this application is to analyse the moods of a person over a certain period of time based on his updates on any social media platform. Based on this, it will plot a graph of the person’s mood swings against time (the graph was made using YUI). It was also used to suggest music and images to a person according to his/her mood in the Yahoo HackU competition. What differentiates this app from the standard sentiment analysis based applications is the fact that it is individual centric instead of being used for determination of the general sentiment towards a particular product, movie, etc. And it is also more subjective in predicting the mood.

For mood prediction in the hack, we extracted the social networking data of a person (like Facebook posts) using a pthon script [fb.py]. This data which is stored in update.txt is then run through the already trained LibSVM algorithm on the terminal which predicts the mood of a person (happy, sad, excited and angry were the four broad categories that we used). For training the LibSVM algorithm, we had to created a training corpus since we couldn’t have a ready-made dataset for such a purpose[The data was available but it was not classifierd into four categories as reqired]. we used Twitter tweets, which we categorized into the above four categories. Thereafter we parsed the complete training data to identify and segregate all the words present in it. We reduces the feature vector size by using nltk’s pos tagging to identify the parts of speech that may be useful in determinig the emotion of the person[Things like conjunctions, prepositions etc. that are not useful were removed]. We also removed the words whose count were very less or very much to reduce the vecor size. The final vector size came out to be around 500. Now we made the training vectors by converting each tweet in a vector. The code for this is available in extract.py.

We ran a crontab on terminal which calls the sheell script [automate.sh] every five minutes. Once the fb.py updates the status in update.txt, the trained SVM classifie it into one of the four categories. Then it passes on this data to a web app which was temporarily hosted on hackyourworld.org during the event. This web app then suggests a music for the person based on the mood and changes the background image. It also plots a graph of the mood of the person over a period of time.

PS : The codes written here are not commented since they were written during a 24 hour hack-a-thon.

moody-trudes's People

Contributors

apeeyush avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

evelaguti

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.