Giter Club home page Giter Club logo

identify-the-tweeter's Introduction

This is my implementation of a solution for the following challenge:

(originally featured here)

Identify the Tweeter

One day you accidentally deleted the usernames, but the not the tweets. You could retrieve the data by using a backup, but decide that would be no fun. Instead you use Machine Learning to find the owner of the tweets. Luckily you only deleted the following usernames:

@justinbieber @BillGates @KingJames @google @BarackObama

Training Data

In order to figure which tweet belongs to which owner. You pulled some of the tweets made by all five owners from the database. The file can be downloaded here, and will be included in the directory your program is run from with the name “trainingdata.txt”. The file is formatted as follows:

The first line contains an integer, n, the number of tweets that follow. The next n lines will first have the username of the owner of the tweet, followed by a space, then the tweet itself.

Input

The first line will contain an integer t, the number of tweets who have lost their owner. The next t lines will each contain a tweet (up to 140 characters)

Output

Output who you think the owner of each tweet is on its own line. Do not include the @.

Sample Input

5

Tell Congress: #NowIsTheTime to close background check loopholes for gun sales. http://t.co/PiAdjEbV, http://t.co/rmcJKN6H

Today the #BELIEVEtour hits New Jersey and I am proud that we will donate a portion of ALL tix sold to Hurricane Sandy Relief. #GIVEBACK

What does Ronald McDonald and @DwyaneWade have in common? They both 6’2 and wear size 20 shoe!!

PHOTOS: My trip to Ghana where I saw what is working & what can be shared with other countries http://t.co/qMYIMsQCYN http://t.co/eRssXUzY6r

Jewish Googlers lit up their not-so-traditional, but very googley, lava lamp menorah last night. Happy Chanukah! http://t.co/cEPwS1vo

Sample Output

BarackObama

justinbieber

KingJames

BillGates

google

Scoring

Your score for this challenge will be 60 * ( 4 * # correctly classified tweets - # of incorrectly classified tweets)/ (4 * total # of tweets)

identify-the-tweeter's People

Contributors

sumanvyj avatar

Watchers

 avatar James Cloos avatar

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.