Model Card for Aspect Extraction and Opinion Analysis
<!-- Provide a quick summary of what the model is/does. -->
This model card serves as a template for new models. It has been generated using this raw template.
Model Details
Model Description
<!-- Provide a longer summary of what this model is. -->
Aspect Extraction and Opinion Analysis is an academic project developed as part of the CSE6242 course offered by Dr. Polo Chau at Georgia Institute of Technology. This model performs aspect-based sentiment analysis on Amazon product reviews, extracting relevant aspects, grouping them, and determining their respective polarities.
- Developed by: Suraj Mohanrao Hulke
- Experience: 3.5 years in AI/ML
- Funded by [optional]: N/A
- Shared by [optional]: N/A
- Model type: Aspect-Based Sentiment Analysis
- Language(s) (NLP): English
- License: [More Information Needed]
- Finetuned from model [optional]: N/A
Model Sources [optional]
<!-- Provide the basic links for the model. -->
- Repository: GitHub Repository
- Paper [optional]: N/A
- Demo [optional]: N/A
Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
This model can be directly used to perform sentiment analysis on product reviews to extract aspects and determine their sentiment.
Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
The model can be fine-tuned for specific datasets or integrated into larger systems for enhanced sentiment analysis capabilities.
Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
The model should not be used for sentiment analysis in languages other than English or for analyzing non-product-related reviews.
Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
The model may exhibit biases present in the training data and may not accurately reflect the sentiment for ambiguous or context-dependent reviews.
Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users should be aware of potential biases and validate the sentiment analysis results with additional checks or human reviews.
How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
Training Details
Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
The training data consists of Amazon product reviews from 1995-2015, available on S3 buckets. The massive size of the dataset presented its own set of challenges.
Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
The training involves extracting aspect-modifier pairs using dependency parsing and clustering aspects based on word vectors to determine polarity scores.
Preprocessing [optional]
[More Information Needed]
Training Hyperparameters
- Training regime: [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
Training time is approximately 7-8 hours for 1M reviews.
Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
Testing Data, Factors & Metrics
Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
Results
[More Information Needed]
Summary
The model showed promise in extracting relevant aspects and determining sentiment but requires improvement in handling ambiguous or context-dependent reviews.
Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware Type: [More Information Needed]
- Hours used: 7-8 hours
- Cloud Provider: AWS
- Compute Region: [More Information Needed]
- Carbon Emitted: [More Information Needed]
Technical Specifications [optional]
Model Architecture and Objective
[More Information Needed]
Compute Infrastructure
[More Information Needed]
Hardware
[More Information Needed]
Software
[More Information Needed]
Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
More Information [optional]
[More Information Needed]
Model Card Authors [optional]
Suraj Mohanrao Hulke
Model Card Contact
[More Information Needed]
About the Project
Aspect Extraction and Opinion Analysis is an academic project as a part of the CSE6242 course offered by Dr. Polo Chau at Georgia Institute of Technology.
Important Links of the Project
- Repository: GitHub Repository
- Project Poster: [Link]
- Project Report: [Link]
Project Overview
Opinion mining or sentiment analysis is the computational analysis of a person’s emotion towards entities like products and services. It can be done at three levels: document, sentence, and aspect. We have implemented an aspect-based analysis system to extract various aspects of an entity from Amazon product reviews, group them, and determine their respective polarities.
Why this Project?
Consumers and sellers spend a significant amount of time reading through long reviews to find out what is perceived as good and bad about a product. Amazon's current feature that lets users filter reviews by popular keywords is still tedious and time-consuming. This project aims to simplify this process by automatically identifying opinions on different aspects of a product.
Solution Overview
We broke down the process into submodules:
- Getting the Data Ready: Amazon has made all product reviews from 1995-2015 available on S3 buckets, facilitating the data collection process but presenting challenges due to the massive size of the dataset.
- Identifying Aspects: The objective of this step was to extract instances of product aspects and modifiers expressing opinions about those aspects using dependency parser trees in Python's spaCy package.
- Grouping Aspects into Clusters and Giving Polarity Scores: The extracted aspects were grouped into clusters using word vectors, and polarity scores were assigned based on modifiers.
- Visualizing the Results: An interactive UI was developed to help users gain insights from reviews.
Our Model
Aspect Extraction
The objective of this step was to extract instances of product aspects and modifiers that express opinions about particular aspects. We used dependency parser trees in Python's spaCy package to extract pairs of words based on specific syntactic dependency paths.
Clustering and Polarity Score
Every product has multiple reviews, resulting in numerous aspect-modifier pairs. Different words may be used for similar aspects of a product. We grouped similar aspects into clusters and averaged the polarity scores of the modifiers for each cluster to provide a quantifiable explanation of the opinions.
- Word Vectors and Clustering: We used word vectors to define each word in terms of vectors, enabling us to model relationships intuitively. Clustering was performed using the K-Means algorithm in Scikit-Learn, providing optimal results with four clusters.
- Polarity Scores: Polarity scores were determined using the VADER Sentiment Analysis tool from the NLTK library. Although this metric worked well for unambiguous positive or negative words, it struggled with equivocal adjectives requiring context for interpretation.
Database and Visualization
We hosted the model results on a Microsoft SQL Server database to handle the massive amount of data and facilitate updates. The UI, built using Flask, jQuery, HTML, and D3.js, provides a detailed analysis of the aspects and polarity score results from our model.
Conclusions & Future Work
Conclusions
The model effectively groups similar aspects and determines sentiment but needs improvement in extracting aspects and handling context-dependent polarity scores.
Future Work
- Improving dependency rules.
- Incorporating contextual knowledge for polarity scores.
- Developing a web-plugin for the UI.
- Optimizing the model to reduce training time.