R doubt and sentiment analysis

r
sentiment_analysis

#1

hi i have datasets like films effecting youth.from that dataset how to define positive negative neutral and how to get similar meaning text in R and how to apply ranking on that


#2

please reply answer


#3

First of all, you should clarify a few things before you expect answers from the community,

  • How does your data look like? If possible you should print out first few lines of the data.
  • If your dataset doesn’t have classes predefined (a few sentences defined as positive, negative etc), you should find a dataset similar to yours to train a machine learning model on, and then train on the new data first and predict on your data
  • You have three different problems to solve,
    1. Sentiment analysis
    2. Finding text similarity
    3. Ranking
      Now you have to think here how much time you are giving to each problem, because each of them require a longer time. And on the top of that, you say you want to work only in R, so you would have to think accordingly which libraries you want to work with, how much granular you want to do, etc

You should first think on the things I mentioned above, and write the answer in brief, so that the community would help you better.


#4

Hi Jal,
Can you give me any useful links, articles or libraries on how to perform sentiment analysis?

Thanks!
Hatem


#5

this is my sample dataset

According to my point of view, Indian cinema are not corrupting the youth because it totally depends on us that what learned from the cinema.1. There are many good things we can take from cinema like dancing, acting etc.2. We can learn a English language by watching English movies.3. We learn about the better lifestyle, education, behavior etc. By the cinema.Cinema can motivate the people & give a new hope to them.Cinema does have a strong impact on the brain, it improves the decision-making capability of a person.
No, films are not corrupting youth. More peoples learned a lot from movies. So we should take only good message only then avoiding the bad messages. Because it totally depends on the peoples point of view.
No, films are not corrupting the Indian youth because it depends on us a person with bad mindset always finds bad in everything. Bad attracts bad. It totally depends on us that what learned from the movies. There are many good things we can take from movies like dancing, acting etc we can gain knowledge from movies. We can learn English language by watching English movies. Every movie has different type of message. Its our responsibility which we accept in our life it may good message or bad message. The sensible person does not take wrong message.
No, films are not corrupting the Indian youth because it depends on us a person with bad mind set always finds bad in everything. Bad attracts bad.
According to my point of view, film are not corrupting the youth because everything can’t learn from book by watching movie everyone learn something good or something bad it depends on the person. Movie is also a source of inspiration for many people and many of them select their goal by watching movie so we can’t say only one stuff.
Actually, from my point of view, movies are not corrupting youth. We itself are responsible for this. Most of the movies are imagination of writers. But how they able imagine all that things. Either from the society, they are living or the world wide. Just think practically. How can we say that you can imagine that about which we don’t have an idea? As I think, it is not possible. For every imagination, there is a source. Film makers shows that which we want to see. Movies are not reflecting any thing new. What our society reflects, is get visualised in movies.
So, here we come to a conclusion that it totally depends on the perception of the person on what aspects he see the movie.
It’s our thinking what we learn from the movie. If we learn bad things from the movie like smoking. Drinking. Etc so it’s spoiling for us. And if we learn good things from the movie like acting. Dancing. Help to others and also help the needy. So it’s good for us. It depends on only us what we learn.
Yes, it is very important to know how films can effect on youth, the coin has two sides and films also has two sides one is good films and one is bad film, so that totally depend on us what we take there are lots of films that depending on motivational spirit so these films are beneficial for youth learning lessons from that film, but other films that seen drama, sexual content that are not good for youth they not controlled their minds and they addicted, so I think it totally depends on us what we take it’s right or wrong it’s up to you.
Hi everyone,In my point of view, the film’s are one part of the entertainment. It totally depends on us that what we learned from the movies. There are many good things we can take from movies like acting, dancing etc.We can gain the knowledge from the movies also we can learn the English language by watching English movies.

It totally depends on our thinking that we think positive than we adopt positive thinks and we think negative than we adopt negativity.

from this dataset .I classified positive negative neutral opinions.

i need from positive opinions similar meaning of text.document contains different texts.in document i need to find similarity and similat text i need to extract


#6

Hi @hatemgkotb

The package sentiment in R could help.
Best regards
Alain


#7

library(sentiment)
library(dplyr)
library(plyr)
library(plotly)
library(ggplot2)
library(readr)
library™
library(Matrix)

moviedata=read.csv(‘C:/Users/Sudeer/Desktop/movies1.csv’,stringsAsFactors = FALSE)

df<-data.frame(moviedata)

sf<-mutate(sentiment=get_sentiment(moviedata$text))
moviedata=read.csv(‘C:/Users/Sudeer/Desktop/movies1.csv’,stringsAsFactors = FALSE)

class_pol = classify_polarity(moviedata, algorithm=“bayes”)

get polarity best fit

polarity = class_pol[,4]

Create data frame with the results and obtain some general statistics

data frame with results

sent_df = data.frame(text= moviedata,polarity=polarity,stringsAsFactors=FALSE)

View(sent_df)


#8

from csv file i need similar meaning of text in R