GithubHelp home page GithubHelp logo

twittersentimentanalysis's Introduction

Sub Task B: Message Polarity Classification Given a message, classify whether the message is of positive, negative, or neutral sentiment. For messages conveying both a positive and negative sentiment, whichever is the stronger sentiment should be chosen.

Files Info:

  1. ./dataset/<train/test>ingDatasetComplete.txt Contains complete <train/test>ing dataset in following format: "\t""\t""\t"

  2. ./dataset/<train/test>ingDatasetProcessed.txt Contains processed <train/test>ing dataset without the entries for which tweet are not available in following format: "\t""\t""\t"

  3. ./dataset/example_tweets.txt Temporary File To Hold Tweets For NLP POS Tagger in following format:

  1. ./dataset/<train/test>ingTokenised.txt File created after running NLP POS Tagger on dataset in following format "\t""\t""\t"

  2. ./dataset/final<Train/Test>ingInput.txt Combine <train/test>ingDatasetProcessed.txt <train/test>ingTokenised.txt to create dataset/final<Train/Test>ingInput.txt which contains tagged tweets with their labels in follwing format: "\t""\t""\t"

  3. ./code/taskB.gs Contains actual labels for the tweets in dataset/testingTokenised.txt

  4. ./code/taskB.pred Contains predicted labels for the tweets in dataset/testingTokenised.txt

Run Following Commands:

  1. Remove entries from tranning dataset for which tweet is not available $python ./code/extractDataset.py ./dataset/trainingDatasetComplete.txt ./dataset/trainingDatasetProcessed.txt ./dataset/example_tweets.txt

  2. POS tagging training dataset $./ark-tweet-nlp/runTagger.sh ./dataset/example_tweets.txt > ./dataset/trainingTokenised.txt

  3. Combine trainingDatasetProcessed.txt trainingTokenised.txt to create dataset/finalTrainingInput.txt which contains tagged tweets with their labels $python ./code/combine.py ./dataset/trainingDatasetProcessed.txt ./dataset/trainingTokenised.txt ./dataset/finalTrainingInput.txt

  4. Remove entries from testing dataset for which tweet is not available $python ./code/extractDataset.py ./dataset/testingDatasetComplete.txt ./dataset/testingDatasetProcessed.txt ./dataset/example_tweets.txt

  5. POS tagging testing dataset $./ark-tweet-nlp/runTagger.sh ./dataset/example_tweets.txt > ./dataset/testingTokenised.txt

6.Combine testingDatasetProcessed.txt testingTokenised.txt to create dataset/finalTestingInput.txt which contains tagged tweets with their label $python ./code/combine.py ./dataset/testingDatasetProcessed.txt ./dataset/testingTokenised.txt ./dataset/finalTestingInput.txt

  1. Train the model on ./dataset/finalTrainingInput.txt and test it on /dataset/finalTestingInput.txt, generating ./code/taskB.gs ./code/taskB.pred $python ./code/main.py ./dataset/finalTrainingInput.txt ./dataset/finalTestingInput.txt

  2. Finds precison and recall $python ./code/findf1.py ./code/taskB.gs ./code/taskB.pred

twittersentimentanalysis's People

Contributors

paraggangil avatar ranu010101 avatar

Watchers

 avatar  avatar  avatar  avatar  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.