Git Product home page Git Product logo

rohanaru53 / sentimental_analysis_using_opinion_target_and_opinion_words Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vaibhavabhimanyoohiwase/sentimental_analysis_using_opinion_target_and_opinion_words

0.0 2.0 0.0 12.82 MB

This project performed sentimental analysis based on opinion words (like good, bad, beautiful, wrong, best, awesome, etc) of selected opinion target ( like product name for amazon product reviews).

Python 100.00%

sentimental_analysis_using_opinion_target_and_opinion_words's Introduction

Sentimental Analysis using Opinion Target and Opinion Words.

This project performed sentimental analysis based on opinion words (like good, bad, beautiful, wrong, best, awesome, etc) of selected opinion target ( like product name for amazon product reviews). Project code provides steps of pre-processing like stopword removal, removal of duplicates in the review, spelling correction, etc.

From the review biwords and triwords are generated for each reviewed text and use it to generate 8 patterns from rule-based method (by POS tagging). Opinion target and their opinion words are extracted using these 8 patterns.

The extracted opinion words gets polarity directly from TextBlob library using polarity function of sentiment class. This polarity is generated for every opinion word in every reviewed text, and the highest magnitude polarity word is selected from every reviewed text.

These highest magnitude polarity word along with its polarity is selected in a list named tuple_word_score. These list is used for searching focused opinion words and eliminate noise within the data. Afterward the average of all the polarity of opinion word obtained from the search is taken and decide a threshold to categories positive and negative semantics.

For 300 reviews our threshold value came out to be 0.125. In the dataset "overall" represents reviewer rating ranging from 1 to 5. I considered "overall" rating of 1, 2 and 3 as negative semantic rating and "overall" rating of 4 and 5 as the positive semantic rating for testing of proposed method. The average score value of polarity of all the reviewed text is partitioned in to five parts in their ascending order of the polarity. The first 3 parts are assigned negative semantic name and the last 2 parts are assigned positive name. This way the model is trained to generate a positive and negative polarity. It is tested with the positive and negative semantic "overall" rating explained previously. The accuracy obtained was 71% for only first 300 reviews. It can be increase further for more reviews. Dataset is provided with 33620 review text this for analysis.

Whole project used semi-supervised approach wherein predefined list of opinion target was provided in a variable named stuff. The synonyms of these opinion targets are used to figure out many similar words within the pattern. In addition, synonyms of opinion words are also included in the opinion word set to the generated similar opinion words of the pattern.

Also I validated the obtained result with Logistic Regression, Decision Tree, Gaussian Naive Bayes, Bernoulli Naive Bayes, Multinomial Naive Bayes, Random Forest, K-Nearest Neighbour, SVM(Linear and Non-linear kernel) using bag of word model with the accuracy of 58.31%, 82.26%, 73.75%, 76.42%, 81.80%, 82.15%, 78.67%, 79.15% respectively.

sentimental_analysis_using_opinion_target_and_opinion_words's People

Contributors

vaibhavabhimanyoohiwase avatar

Watchers

James Cloos avatar Rohan 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.