Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-7400

New Map Reduce Example - Simple Sentiment Analysis

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • 3.4.0
    • None
    • examples
    • mapreduce example
    • Patch

    Description

      I am looking to add a new map reduce example, i.e, sentiment analysis. Sentiment analysis map reduce job helps in determining the sentiment score for a user. It takes each tweet made by an user and assigns a sentiment score for that tweet/sentence for a particular user and then aggregates the sentiment scores for all tweets made by all users.

      This example takes the twitter dataset which contains users and the tweets made by users and gives the output as <username, sentiment score>. For each user, the sentiment score is calculated for all the tweets made by that particular user.

      This mapreduce examples takes in two input files - input twitter dataset and a file containing list of words.
      The word list file contains positive, negative and negation words which are used to give a sentiment score to the words in tweets.

      You can use command:
      bin/hadoop jar /HADOOP_PATH/share/hadoop/mapreduce/mapreduce-examples.jar sentimentanalysis <input file/dir path> <output dir path> <word list file path/dir path>

      For example, you can use the sample files and run the above command as:
      bin/hadoop jar /HADOOP_PATH/share/hadoop/mapreduce/mapreduce-examples.jar sentimentanalysis sample_data.txt <output dir path> sample_words.txt

      Attachments

        1. MAPREDUCE-7400.patch
          11 kB
          Meetu Patel
        2. sample_words.txt
          2 kB
          Meetu Patel
        3. sample_data.txt
          34 kB
          Meetu Patel

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            Meetu Meetu Patel

            Dates

              Created:
              Updated:

              Slack

                Issue deployment