Git Product home page Git Product logo

sentiment-analysis-using-r_project's Introduction

Sentiment Analysis using R: Project

Aim of Project

Building a sentiment analysis model to categorize words based on their sentiment. That is, whether the words are positive or negative and further analysis.

Developing Sentiment Analysis Model in R

Dataset/Package: janeaustenr

First, I made use of the tidytext package that consists of sentiment lexicons present in the dataset of sentiments.

Among the various lexicons, I have retrieved the bing lexicon, which classifies the sentiments into a binary category of negative or positive.

I imported the libraries janeaustenr, stringr and tidytext. The janeaustenr package which provided me with full texts for Jane Austen's 6 completed novels, ready for text analysis. These novels are "Sense and Sensibility", "Pride and Prejudice", "Mansfield Park", "Emma", "Northanger Abbey", and "Persuasion".tidytext allowed me to perform efficient text analysis on the data.

After performing the tidy operation on the text such that each row contains a single word, I used the book 'Emma' and derived its words to implement the sentiment analysis model.

I then segregated the data into separate columns of positive and negative sentiments. After that, using mutate(), I calculated the total sentiment, that is, the difference between positive and negative sentiment.

First visualisation: the words present in the book “Emma” based on their corresponding positive and negative scores. I counted the most common positive and negative words that are present in the novel.

Second visualisation: sentiment score. I plotted the scores along the axis that is labeled with both positive as well as negative words.

Final visualisation: I created a wordcloud that described the most recurring positive and negative words.

Cr:DataFlair

sentiment-analysis-using-r_project's People

Contributors

rpita623 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ssgantayat

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.