Reddit Based Product Sentiment Analysis using GAN -
VADER Hybrid Model
Jagadheeswari K 1, Sangeetha S 2, Swetha M 3, Thaiyalnayagi V 4, Vishali S5
1
Assistant Professor, Dept. of IT, Manakula Vinayagar Institute of Technology, Pondicherry, India
2
UG Scholar, Dept. of IT, Manakula Vinayagar Institute of Technology, Pondicherry, India
3
UG Scholar, Dept. of IT, Manakula Vinayagar Institute of Technology, Pondicherry, India
4
UG Scholar, Dept. of IT, Manakula Vinayagar Institute of Technology, Pondicherry, India
5
UG Scholar, Dept. of IT, Manakula Vinayagar Institute of Technology, Pondicherry, India
Email: eeswarinet13@[Link]¹, sangeethash2003@[Link]²,
swetha02072004@[Link]³, thaiyalnayagi1675@[Link]⁴,
vishalisaravanan316@[Link]⁵
ABSTRACT
Product-related discussions on Reddit serve as a rich source of genuine consumer feedback, yet
mining sentiment from such content poses considerable difficulties owing to informal writing
styles, abbreviations, emoticons, spelling mistakes, and code-mixed language patterns.
Conventional sentiment analysis frameworks are ill-equipped to handle these irregularities,
frequently producing unreliable classification outcomes. This work proposes an end-to-end Reddit
Product Sentiment Analysis framework that employs a rule-driven Generative Adversarial Network
for noise elimination, a sequential three-stage language validation module, bigram-enabled TF-IDF
feature encoding, and a probability-level weighted fusion of VADER (40%) and Logistic
Regression (60%) to determine whether a post carries positive or negative sentiment. The
framework autonomously identifies product-appropriate subreddits, excludes code-mixed Hinglish
and Tanglish posts through dictionary-based screening, and executes a six-phase denoising
sequence prior to classification. The Logistic Regression component, trained on 25,000 Amazon
product reviews sourced from the Hugging Face repository, attains 93.4% classification accuracy.
The complete weighted fusion model records 94.7% accuracy, surpassing individual baselines
including VADER alone (78.2%), standalone Logistic Regression (93.4%), Naive Bayes (88.6%),
and SVM (92.1%). A fully functional multi-page Streamlit application delivers live Reddit data
retrieval, sentiment visualizations, filtered word clouds, feedback summaries, product scoring, and
side-by-side product comparison.
Keywords: Sentiment Analysis, Reddit, VADER, Logistic Regression, TF-IDF, GAN Text Denoising, Ensemble
Learning, Streamlit, Natural Language Processing, Hinglish Filter, Product Review Analysis.
I. INTRODUCTION
Digital social platforms have fundamentally reshaped how individuals communicate their
experiences and opinions regarding consumer products. Among these platforms, Reddit stands out
with over 57 million daily active participants distributed across thousands of topic-specific
communities, collectively generating an enormous volume of candid, experience-driven product
discourse. In contrast to dedicated review portals such as Amazon or Flipkart, Reddit content is
largely unmoderated, conversational in tone, and heavily laden with linguistic irregularities —
including internet slang, emoji usage, character repetition, misspellings, and romanized mixed-
language text such as Hinglish and Tanglish, which are particularly prevalent among South Asian
user communities.
Computational sentiment analysis — the automated identification of subjective polarity within
written text — has been extensively investigated through three primary paradigms: rule-based
lexicon systems, supervised machine learning, and neural deep learning architectures. Nevertheless,
direct application of these paradigms to unprocessed Reddit content introduces substantial accuracy
degradation. Lexicon-driven tools such as VADER, though well-suited to general microblogging
text, exhibit notable weaknesses when confronted with product-specific vocabulary and heavily
abbreviated internet language. Supervised classifiers trained on formally structured corpora
similarly underperform when exposed to the orthographic irregularities characteristic of Reddit
without a dedicated preprocessing stage.
To address these shortcomings, this paper introduces a structured, multi-component Reddit Product
Sentiment Analysis System. The pipeline encompasses automated Reddit post retrieval, sequential
elimination of non-English and mixed-language content, GAN-driven informal text normalization,
TF-IDF numerical encoding, and final sentiment determination via a calibrated VADER–Logistic
Regression probability ensemble. The resulting system is packaged as a responsive Streamlit web
application, enabling non-technical users to obtain actionable product sentiment insights in real
time.
A. OBJECTIVE
The central aim of this work is to engineer a dependable, computationally efficient, and practically
deployable sentiment extraction pipeline tailored specifically to the linguistic characteristics of
Reddit product discussions. The system integrates Natural Language Processing, deterministic text
normalization rules, and ensemble-based machine learning to transcend the constraints of
conventional sentiment tools when operating on noisy, informal social media content. Targeted
objectives encompass: enforcing content quality through non-English and code-mixed language
exclusion; normalizing Reddit-specific textual noise via a six-phase GAN rule denoiser; encoding
preprocessed text as high-dimensional numerical vectors through bigram-augmented TF-IDF
transformation; producing robust sentiment predictions through weighted probability fusion of
VADER and Logistic Regression; and surfacing analytical outputs via an interactive dashboard
incorporating sentiment charts, filtered word clouds, product scoring, and multi-product
benchmarking.
B. SCOPE OF THE PROJECT
The operational scope of the proposed system encompasses dynamic Reddit post collection through
the PRAW API, with subreddit selection governed by product category inference from the search
keyword; multilayer language validation combining Unicode script identification with a curated
300-word Hinglish and Tanglish lexicon; rule-based GAN text normalization addressing slang
resolution, emoji stripping, typo rectification, character deduplication, and punctuation
standardization; binary sentiment labeling through a weighted VADER–Logistic Regression
probability ensemble; and a feature-rich Streamlit web interface supporting visualization, historical
tracking, and comparative product analysis. The system operates exclusively on English-language
Reddit content and performs binary rather than aspect-granular sentiment classification, without
support for continuous data streaming. This project constitutes a research-oriented demonstration of
integrated NLP and ensemble machine learning methodologies applied to social media sentiment
mining.
C. LITERATURE REVIEW
Hutto and Gilbert (2014) developed VADER, a lexicon and rule-based sentiment scoring instrument
engineered for social media contexts, demonstrating competitive classification on Twitter corpora
through a curated affective dictionary encompassing 7,500 entries alongside grammatical modifiers
for negation handling, typographic emphasis, and punctuation intensity. Despite its strengths, the
static nature of VADER's vocabulary constrains its adaptability to evolving product-specific
terminology. Go, Bhayani, and Huang (2009) pioneered distant supervision for microblog sentiment
classification, leveraging emoticon-annotated Twitter data to train Logistic Regression and Naive
Bayes models, simultaneously validating TF-IDF as a computationally tractable feature
representation for brief social media utterances. Pang and Lee (2008) conducted an exhaustive
survey of subjectivity and opinion analysis methodologies, systematically documenting the
inadequacies of fixed-lexicon approaches for domain-sensitive sentiment tasks and advocating for
hybrid ensemble architectures. Pak and Paroubek (2010) demonstrated that Twitter corpora require
domain-adapted preprocessing pipelines before conventional classifiers can yield reliable sentiment
predictions, a finding directly motivating the denoising architecture proposed in this work. Sharma
and Sharma (2019) evaluated machine learning approaches for product review sentiment
classification, reporting 92% accuracy with TF-IDF and SVM on structured Amazon corpora while
observing marked performance deterioration on colloquial text inputs. Goodfellow et al. (2014)
introduced the Generative Adversarial Network training paradigm, establishing the adversarial
learning foundation upon which the text denoising module of the proposed system is conceptually
grounded. Devlin et al. (2019) presented BERT, a transformer-based bidirectional language model
achieving state-of-the-art benchmarks across numerous NLP tasks including sentiment
classification, though its substantial computational footprint renders real-time inference on
commodity hardware impractical for deployment scenarios such as the one addressed in this paper.
II. ANALYSIS OF EXISTING SYSTEMS AND THEIR SYSTEMIC GAPS
A. ISSUES IN EXISTING SENTIMENT ANALYSIS SYSTEMS
Prevailing product sentiment analysis solutions predominantly adopt one of three technical
orientations: dictionary-driven lexicon systems, feature-engineered machine learning pipelines, or
end-to-end deep learning architectures. Lexicon-based instruments such as VADER and
SentiWordNet derive sentiment polarity from pre-compiled affective word inventories augmented
with syntactic modification rules. Although computationally lightweight and training-free, these
instruments are fundamentally constrained by vocabulary rigidity and an inability to generalize
beyond their fixed lexical boundaries. Feature-based machine learning systems pairing TF-IDF
representations with classifiers such as Logistic Regression, Support Vector Machines, or Naive
Bayes have demonstrated reliable performance on curated review corpora including Amazon and
Yelp, yet their effectiveness is contingent upon clean, well-normalized input and the availability of
sufficiently large annotated training collections. Deep learning architectures encompassing
convolutional networks, recurrent models, and attention-based transformers such as BERT and
RoBERTa deliver superior accuracy on benchmark tasks but impose prohibitive computational
demands that preclude real-time deployment on standard consumer hardware. Critically, none of the
aforementioned approaches provide an integrated solution addressing the compound challenges
specific to Reddit text — informal orthography, mixed-script content, internet slang, and
community-specific linguistic conventions — within a unified preprocessing and classification
framework.
B. CRITICAL LIMITATIONS WHEN APPLIED TO REDDIT PRODUCT SENTIMENT
Noise Sensitivity: Existing systems do not handle Reddit-specific noise such as emojis,
slang abbreviations, repeated characters, and typos, significantly reducing classification
accuracy on raw social media text.
Mixed Language Content: No existing lightweight system addresses Hinglish and Tanglish
content prevalent in Indian Reddit communities, introducing false sentiment signals that
corrupt classification results.
Fixed Data Sources: Most systems search fixed, predefined data sources rather than
dynamically selecting the most relevant communities for a given product query, reducing
data relevance.
Single Model Dependency: Using only VADER or only a trained ML model creates single
points of failure — VADER misses domain context while ML models miss tone signals from
punctuation and capitalization that TF-IDF discards.
No Probability-Level Ensemble: Existing hybrid systems typically use majority voting
rather than weighted probability combination, losing confidence information and producing
overconfident predictions on borderline cases.
III. PROPOSED MODEL
A. ARCHITECTURAL PHILOSOPHY AND DESIGN
The proposed system provides an accurate and deployable solution for Reddit product sentiment
analysis through a six-stage pipeline. Unlike conventional sentiment systems that apply a single
classifier to raw text, the proposed system uses a structured preprocessing chain — language
filtering, GAN denoising, and TF-IDF vectorization — before applying a weighted probability
ensemble of VADER and Logistic Regression. This hybrid approach leverages the complementary
strengths of lexicon-based tone detection and trained domain classification, producing more reliable
sentiment predictions on informal Reddit text than either method alone.
B. SYSTEM PIPELINE OVERVIEW
The proposed system follows a six-stage pipeline. Input product queries first pass through a
Dynamic Subreddit Selection Module that identifies product-relevant Reddit communities based on
keyword category matching. The Reddit Data Collection Module fetches posts using a two-pass
search strategy via the PRAW API. The Language Filter Module applies three sequential checks to
remove non-English and mixed-language content. The GAN Text Denoiser Module applies six rule-
based cleaning steps to normalize informal text. The Sentiment Analysis Module converts cleaned
text to TF-IDF features and applies the weighted VADER–Logistic Regression ensemble. The
Streamlit Visualization Module presents results through interactive charts, word clouds, and insight
summaries.
C. WORKING OF THE PROPOSED SYSTEM
Reddit posts are collected using the PRAW API with a two-pass search strategy. Pass 1 searches
each subreddit using an exact phrase query (e.g., "iPhone 15") to retrieve highly relevant posts. Pass
2 applies a keyword fallback search if the exact phrase returns insufficient results. Posts are filtered
for relevance by checking that all query words appear in the post text. Subreddits are selected
dynamically based on product category — searching "iPhone 15" adds r/iphone, r/apple, r/Android,
and r/GooglePixel to the base subreddit pool of r/reviews, r/BuyItForLife, r/gadgets, r/technology,
and r/all. Language filtering applies three sequential checks: non-Latin script detection using
Unicode range regex blocks Devanagari, Tamil, Arabic, Chinese, Japanese, Korean, Cyrillic, and
five other scripts; ASCII ratio check rejects posts where less than 80% of alphabetic characters are
ASCII; Hinglish/Tanglish word ratio check rejects posts where more than 10% of words match a
300+ word dictionary of romanized Hindi, Urdu, and Tamil terms.
The GAN text denoiser applies six rule-based steps in sequence: emoji removal using Unicode
range regex; slang expansion using an 80+ term dictionary (u→you, gr8→great, lol→laughing,
tbh→to be honest); repeated character normalization using regex (.)\1{2,} reducing sooooo→so;
repeated word removal by sequential scan; typo correction using a 40+ term dictionary (teh→the,
definately→definitely); and punctuation normalization reducing !!! to ! and removing standalone
numbers. TF-IDF vectorization converts cleaned text to a 5000-dimensional numerical feature
vector using sublinear TF scaling, bigram support (ngram_range=(1,2)), and minimum document
frequency of 2. VADER analysis runs on the original uncleaned text to preserve tone signals from
capitalization and punctuation. Both models produce class probabilities that are combined using the
weighted ensemble formula.
Figure 3.1: Architecture Diagram for Sentiment Analysis System
D. COMPARISON BETWEEN STANDALONE MODELS AND PROPOSED ENSEMBLE
Feature VADER Only Logistic Regression Only Proposed Ensemble
Weighted probability
Working Principle Lexicon + Rules TF-IDF + trained weights
combination
Preprocessed TF-IDF Both raw and preprocessed
Input Raw text
vector
Training Required No Yes (25,000 reviews) Yes (for ML component)
Handles Slang Partially Yes (after denoising) Yes
Handles Tone Yes (caps,
No (TF-IDF discards)
Signals punctuation) Yes
Accuracy 78.2 % 93.4 % 94.7 %
IV. IMPLEMENTATION AND ALGORITHMIC DESIGN
A. DATASET HANDLING AND PREPROCESSING
The machine learning model is trained on the amazon_polarity dataset from the Hugging Face
Datasets library. The dataset contains 3.6 million Amazon product reviews labeled as Positive or
Negative. A balanced sample of 25,000 reviews is used for training — 12,500 Positive and 12,500
Negative — to prevent class imbalance bias. Each review is truncated to 300 characters to match
the typical length of Reddit posts. The dataset is shuffled with a fixed random seed (42) for
reproducibility and split 80/20 into training (20,000 samples) and test (5,000 samples) sets.
Each review text is passed through the full preprocessing pipeline: GAN rule-based denoising
followed by traditional cleaning (lowercase conversion, URL removal, email removal, special
character removal, stopword removal using NLTK English stopwords, and filtering of words with 2
or fewer characters). The preprocessed text is then vectorized using TF-IDF.
Dataset Source :
The dataset used in this project was collected from the Hugging Face Datasets — amazon_polarity
Dataset Link : [Link]
Figure 4.1: Dataset Description — Amazon Polarity (25,000 samples)
B. THE STREAMLIT-BASED WEB APPLICATION
This system is deployed as a multi-page Streamlit web application providing real-time product
sentiment analysis through a user-friendly interface. The application features real-time Reddit data
collection via PRAW API with dynamic subreddit selection; binary sentiment classification
(Positive/Negative) using the hybrid VADER–Logistic Regression ensemble; sentiment distribution
pie and bar charts using Plotly; sentiment-filtered word clouds using the WordCloud library where
positive clouds show only positive-signal words and negative clouds show only negative-signal
words; Reddit Insights section with Positive and Negative summaries extracted from sentiment-
matching sentences; Quick Improvement Suggestions generated from keyword pattern analysis of
negative comments; ensemble score breakdown for each Reddit post showing ML label, VADER
score, and visual probability bar; product scoring on a 0–5 scale; multi-product comparison page for
side-by-side analysis of 2–3 products; and a performance metrics page tracking search history,
model accuracy, and system health.
Figure 4.2: Streamlit Web Interface - Home Page
C. MODEL DEVELOPMENT AND TRAINING
The sentiment classification model uses Logistic Regression with TF-IDF feature representation.
The TF-IDF vectorizer is configured with max_features=5000, ngram_range=(1,2), min_df=2, and
sublinear_tf=True. The sublinear TF scaling formula is:
If count > 0
TF ( w , d )=1+log ( count ( w , d ) ) , else 0
The IDF formula is:
IDF ( w )=log
( 1+1+dfN( w ) )+1
Where N is total documents and df(w) is the number of documents containing word w. This
produces a 5000-dimensional sparse feature matrix where each dimension represents the TF-IDF
score of one of the top 5000 words.
The Logistic Regression model predicts sentiment using the sigmoid function:
P(Positive)=1/(1+ e(−z )) , where z=w·f + b
Where w is the learned weight vector, f is the TF-IDF feature vector, and b is the bias term. Training
minimizes binary cross-entropy loss using the L-BFGS optimizer with L2 regularization parameter
C=1.0 and maximum 1000 iterations.
VADER computes a compound score using:
compound=(Σ valence)/ √ ((Σ valence)2 +15)
The compound score is converted to probability using:
PVADER (Positive)=(compound+1)/2
The weighted ensemble combines both models at the probability level:
P_ensemble(Positive) = 0.6 × P_ML(Positive) + 0.4 × P_VADER(Positive)
P_ensemble(Negative) = 0.6 × P_ML(Negative) + 0.4 × P_VADER(Negative)
Final Label = Positive, if P_ensemble(Positive) ≥ P_ensemble(Negative), else Negative
Logistic Regression receives 60% weight as it is trained on labeled domain data. VADER receives
40% weight as a rule-based complement capturing tone signals that TF-IDF discards.
Figure 4.3: Sentiment Distribution Charts for Analyzed Product
Figure 4.4: Sentiment-Filtered Word Clouds — Positive (Green) and Negative (Red)
Figure 4.5: Reddit Insights — Positive and Negative Feedback Summary
D. INFERENCE AND PREDICTION MODULE
During inference, each Reddit post text is passed through two parallel paths. Path 1: the text is
denoised using the GAN rule-based pipeline, cleaned using traditional preprocessing, and
vectorized using the saved TF-IDF vectorizer. The saved Logistic Regression model produces class
probabilities P_ML(Positive) and P_ML(Negative). Path 2: the original raw text is passed directly
to VADER, which produces a compound score converted to P_VADER(Positive) and
P_VADER(Negative). Both probability pairs are combined using the weighted ensemble formula to
produce the final label and confidence score. The result is stored in a results DataFrame along with
VADER score, ML label, ensemble probabilities, upvotes, and comment count for display in the
Streamlit interface
E. CONFUSION MATRIX ANALYSIS
The Logistic Regression model evaluated on the 5,000-sample test set produces the following
confusion matrix:
Key Observations:
• Positive reviews were classified with high recall, minimizing missed positive detections
• Negative reviews were classified with high precision, reducing false positive misclassifications
• The model effectively distinguishes sentiment in product-specific language learned from
Amazon reviews
• The weighted ensemble further reduces borderline misclassifications by incorporating VADER
tone signals
This demonstrates that the proposed hybrid system is reliable for real-world Reddit product
sentiment classification.
Figure 4.6: Confusion Matrix for Product Sentiment Analysis
F. RESULT ANALYSIS
This paper presented a Reddit-based Product Sentiment Analysis System integrating GAN-based
text denoising, language filtering, TF-IDF vectorization, and a weighted VADER–Logistic
Regression ensemble. The system achieved 93.4% accuracy with the standalone Logistic
Regression model and 94.7% accuracy with the weighted ensemble, substantially outperforming all
baselines. The confusion matrix analysis on the 5,000-sample test set confirmed high precision and
recall for both Positive and Negative classes, demonstrating reliable sentiment classification on
product review text. The deployed Streamlit web application enables users to search any product,
collect real-time Reddit data, and receive instant sentiment analysis with visual insights, supporting
Algorithm / Model Accuracy Precision Recall F1-Score
VADER Only 78.2% 77.8% 78.2% 78%
Naive Bayes + TF-IDF 88.6% 88.1% 88.6% 88.3%
SVM + TF-IDF 92.1% 91.8% 92.1% 91.9%
Logistic Regression + TF-IDF 93.4% 93.1% 93.4% 93.2%
Proposed Ensemble (VADER 94.7% 94.3% 94.7% 94.5%
40% + LR 60%)
informed product decision-making.
Table 4.1: Comparison Table of Sentiment Analysis models
Figure 4.7: Performance Comparison of models using Accuracy, Precision, Recall and F1
Score
Figure 4.8: Multi-Product Sentiment Comparison
[Link]
The proposed Reddit Product Sentiment Analysis System provides an efficient and deployable
solution for extracting meaningful sentiment from informal Reddit product discussions. Existing
sentiment analysis systems faced limitations including noise sensitivity, mixed-language content,
fixed data sources, and single model dependency. To overcome these issues, the proposed system
combines GAN-based rule denoising, three-check language filtering, TF-IDF vectorization with
bigram support, and a weighted probability ensemble of VADER and Logistic Regression. The
hybrid ensemble achieves 94.7% accuracy, outperforming all classical baselines, by leveraging the
complementary strengths of lexicon-based tone detection and trained domain classification. The
implemented Streamlit web application provides real-time product sentiment analysis with
sentiment distribution charts, sentiment-filtered word clouds, Reddit Insights summaries, product
scoring, and multi-product comparison. Future work includes aspect-level sentiment analysis,
integration of transformer-based models such as BERT, and extension to additional social media
platforms including Twitter and YouTube.
REFERENCES
[1] B. Hutto and E. Gilbert, "VADER: A Parsimonious Rule-Based Model for Sentiment Analysis of
Social Media Text," Proceedings of the International AAAI Conference on Web and Social Media,
vol. 8, no. 1, 2014.
[2] A. Go, R. Bhayani, and L. Huang, "Twitter Sentiment Classification using Distant Supervision,"
Stanford University Technical Report, 2009.
[3] F. Pedregosa et al., "Scikit-learn: Machine Learning in Python," Journal of Machine Learning
Research, vol. 12, pp. 2825–2830, 2011.
[4] J. Devlin, M. Chang, K. Lee, and K. Toutanova, "BERT: Pre-training of Deep Bidirectional
Transformers for Language Understanding," Proceedings of NAACL-HLT, pp. 4171–4186, 2019.
[5] I. Goodfellow et al., "Generative Adversarial Networks," Advances in Neural Information
Processing Systems, vol. 27, 2014.
[6] B. Pang and L. Lee, "Opinion Mining and Sentiment Analysis," Foundations and Trends in
Information Retrieval, vol. 2, no. 1–2, pp. 1–135, 2008.
[7] A. Pak and P. Paroubek, "Twitter as a Corpus for Sentiment Analysis and Opinion Mining,"
Proceedings of LREC, vol. 10, pp. 1320–1326, 2010.
[8] M. Hu and B. Liu, "Mining and Summarizing Customer Reviews," Proceedings of ACM KDD,
pp. 168–177, 2004.
[9] N. Sharma and A. Sharma, "Sentiment Analysis of Product Reviews Using Machine Learning
Techniques," International Journal of Computer Applications, vol. 177, no. 32, pp. 6–11, 2019.
[10] S. Baccianella, A. Esuli, and F. Sebastiani, "SentiWordNet 3.0: An Enhanced Lexical Resource
for Sentiment Analysis and Opinion Mining," Proceedings of LREC, vol. 10, pp. 2200–2204, 2010.
[11] R. Socher et al., "Recursive Deep Models for Semantic Compositionality Over a Sentiment
Treebank," Proceedings of EMNLP, pp. 1631–1642, 2013.
[12] V. Vapnik, The Nature of Statistical Learning Theory, Springer, New York, 1995.
[13] T. Joachims, "Text Categorization with Support Vector Machines: Learning with Many
Relevant Features," Proceedings of ECML, pp. 137–142, 1998.
[14] M. Maas et al., "Learning Word Vectors for Sentiment Analysis," Proceedings of ACL, pp.
142–150, 2011.