I need to create a function in R language, which gonna be able to cut sentence into words and then these words match with words in pos and neg dictionaries. This may resulted into Sentiment Score - for possitive words in sentence is equal to 1 and for negative words in sentence is equal to -1.
Product_ID Sentence Attribute SentimentScore
1111111 1 graphics 1
1111111 1 windows 1
1111111 2 loads -1
2222222 1 laptops -1
2222222 2 design 1
First sentence for product 1111111 may seems like: ... this product... great graphics... works good on my windows.
Eg. Dictionary with possitive words (pos.txt) looks like: a+ abound abounds abundance abundant accessable accessible acclaim acclaimed ... and so forth
and dictionary with negative words (neg.txt) looks like: 2-faced 2-faces abnormal abolish abominable abominably abominate abomination abort aborted aborts ... and so forth
I saw a function called score.sentiment at: gitHub, but it evaluating all the sentence using of difference between pos and neg words in each sentence. I need something very similar, but for individual words.
I really very appreciate any of your help. Thanks a lot in forward.