Abstract: SENTIMENT ANALYSIS SYSTEM FOR SOCIAL MEDIA PLATFORM ABSTRACT A sentiment analysis system (100) for a social media platform is disclosed. The system (100) comprises a client device (102) comprising a first processor (104) and a second processor (106) located on an application server (108). The system (100) is configured to: obtain a dataset of user-generated textual content from the social media platform; generate word embeddings to capture semantic relationships within the dataset; train a set of deep learning models using the dataset; classify sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model; and compare performance of the models in the set of deep learning models to determine the most effective model for sentiment analysis of the dataset. The system (100) captures complete contextual meaning in text, resulting in more reliable sentiment detection in complex or ambiguous sentences. Claims: 10, Figures: 4 Figure 1 is selected.
Description:BACKGROUND
Field of Invention
[001] Embodiments of the present invention generally relate to an analysis system and particularly to a sentiment analysis system for social media platform.
Description of Related Art
[002] Sentiment analysis serves as a critical tool for identification of the emotional tone within text, particularly within user-generated content on digital and social media platforms. Organizations and businesses rely on accurate sentiment detection to understand customer opinions, evaluate brand reputation, and track public attitudes toward products and services. However, the large volume of unstructured textual data, complex sentence structures, sarcasm, polysemy, and contextual nuances create significant challenges for existing sentiment analysis practices.
[003] Current solutions employ a variety of natural language processing methods and deep learning models to address sentiment classification. Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM) networks, Convolutional Neural Networks (CNNs), Bidirectional Long Short-Term Memory (BiLSTM) networks, and transformer-based models such as Bidirectional Encoder Representations from Transformers (BERT) have been widely applied to improve accuracy. Studies performed on large-scale datasets, such as millions of Twitter posts, have demonstrated that these models enhance performance in sentiment detection. Patent literature and commercial systems additionally disclose the use of preprocessing techniques such as tokenization, stop word removal, and slang correction, as well as the application of context-sensitive algorithms and feature extraction methods.
[004] Despite improvements, existing solutions face several shortcomings. Sequential models struggle with long-term dependencies and do not capture global relationships across sentences efficiently. Many models fail to adequately address sarcasm, multiple meanings of words, and cultural or contextual dependencies within text. Transformer-based models, although highly accurate, demand extensive computational resources, that limits practical deployment in environments with resource constraints. Furthermore, dependence on manual feature design reduces adaptability, and many models demonstrate poor scalability when applied to real-time sentiment data streams.
[005] There is thus a need for an improved and advanced sentiment analysis system for a social media platform that can administer the aforementioned limitations in a more efficient manner.
SUMMARY
[006] Embodiments in accordance with the present invention provide a sentiment analysis system for a social media platform. The system comprising a client device comprising a first processor. The system further comprising a second processor located on an application server. The system further comprising a communication network adapted to establish a communicative link connecting the client device to the application server. The system further comprising a storage medium comprising programming instructions executable by the second processor. The second processor is configured to obtain a dataset of user-generated textual content from the social media platform; generate word embeddings to capture semantic relationships within the dataset. The word embeddings are generated using a Word2Vec semantic representation technique; train a set of deep learning models using the dataset; classify sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model; and compare performance of the models in the set of deep learning models based on accuracy, context understanding, error rate, scalability, or a combination thereof, to determine the most effective model for sentiment analysis of the dataset.
[007] Embodiments in accordance with the present invention further provide a computer-implemented method for textual sentiment analysis. The method comprising steps of obtaining a dataset of user-generated textual content from the social media platform. The dataset comprise one million datapoints; generating word embeddings to capture semantic relationships within the dataset. The word embeddings are generated using a Word2Vec semantic representation technique; training a set of deep learning models using the dataset; classifying sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model; and comparing performance of the models in the set of deep learning models based on accuracy, context understanding, error rate, scalability, or a combination thereof, to determine the most effective model for sentiment analysis of the dataset.
[008] Embodiments of the present invention may provide a number of advantages depending on their particular configuration. First, embodiments of the present application may provide a sentiment analysis system for social media platform.
[009] Next, embodiments of the present application may provide a sentiment analysis system that achieves superior accuracy in sentiment classification compared to conventional deep learning models such as Simple Recurrent Neural Networks (Simple RNN), Long Short-Term Memory (LSTM) networks, Convolutional Neural Networks (CNN), and Bidirectional Long Short-Term Memory (BiLSTM) networks, with the transformer-based Bidirectional Encoder Representations from Transformers providing up to four percent higher accuracy.
[0010] Next, embodiments of the present application may provide a sentiment analysis system that captures complete contextual meaning in text, resulting in more reliable sentiment detection in complex or ambiguous sentences.
[0011] Next, embodiments of the present application may provide a sentiment analysis system that effectively manages long-term dependencies within text, allowing the system to analyze extended sentences and conversational structures without loss of semantic information.
[0012] Next, embodiments of the present application may provide a sentiment analysis system that reduces the rate of false negatives and enhances true positive detection.
[0013] Next, embodiments of the present application may provide a sentiment analysis system that scales efficiently with large datasets and dynamic real-time data streams, enabling practical application across social media platforms and other high-volume environments where continuous sentiment monitoring is required.
[0014] These and other advantages will be apparent from the present application of the embodiments described herein.
BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and still further features and advantages of embodiments of the present invention will become apparent upon consideration of the following detailed description of embodiments thereof, especially when taken in conjunction with the accompanying drawings, and wherein:
[0016] FIG. 1 illustrates a block diagram of a sentiment analysis system for social media platform, according to an embodiment of the present invention;
[0017] FIG. 2 illustrates a data flow diagram of a sentiment analysis system for social media platform, according to an embodiment of the present invention;
[0018] FIG. 3 illustrates a comparison graph of a sentiment analysis system for social media platform, according to an embodiment of the present invention; and
[0019] FIG. 4 depicts a flowchart of a computer-implemented method for textual sentiment analysis, according to an embodiment of the present invention.
[0020] The headings used herein are for organizational purposes only and are not meant to be used to limit the scope of the description or the claims. As used throughout this application, the word "may" is used in a permissive sense (i.e., meaning having the potential to), rather than the mandatory sense (i.e., meaning must). Similarly, the words “include”, “including”, and “includes” mean including but not limited to. To facilitate understanding, like reference numerals have been used, where possible, to designate like elements common to the figures. Optional portions of the figures may be illustrated using dashed or dotted lines, unless the context of usage indicates otherwise.
DETAILED DESCRIPTION
[0021] FIG. 1 illustrates a block diagram of a sentiment analysis system 100 (hereinafter referred to as the system 100) for social media platform, according to an embodiment of the present invention. In an embodiment of the present invention, system 100 may be adapted to process a dataset of user-generated textual content obtained from a social media platform and may perform sentiment classification. The system 100 may execute a plurality of sequential operations that may include acquisition of the dataset, preprocessing of textual content, generation of word embeddings, training of models, classification of sentiments, and comparative evaluation of model performance.
[0022] In an embodiment of the present invention, the system 100 may initially acquire a dataset comprising textual data from social media sources. The system 100 may preprocess the dataset by executing tokenization, removal of stop words, correction of slang, stemming of words, and removal of punctuation. The system 100 may subsequently generate word embeddings utilizing a semantic representation technique, wherein the embeddings may capture contextual and semantic relationships within the dataset.
[0023] The system 100 may then train one or more models using the preprocessed dataset. The system 100 may perform sentiment classification of the dataset into categories such as positive, negative, or neutral, based on outputs generated by the trained models.
[0024] In an embodiment of the present invention, the system 100 may execute a comparative analysis of the trained models to determine an effective model for sentiment detection. The comparison may include evaluation of accuracy, contextual understanding, error rate, true positive rate, false negative rate, scalability, and so forth. The system 100 may thereby provide an overall framework for end-to-end textual sentiment analysis and model benchmarking in a unified environment.
[0025] In an embodiment of the present invention, the clustering system 100 may be adapted to apply adaptive local dynamic tuning for density-based clustering. The adaptive local dynamic tuning may allow parameters such as neighborhood radius and minimum cluster size to be adjusted locally based on dataset characteristics. Dense regions may be assigned smaller thresholds, while sparse regions may be assigned larger thresholds, thereby enabling accurate cluster identification in datasets with varying densities without extensive manual tuning.
[0026] In an embodiment of the present invention, the clustering system 100 may be adapted to enhance interpretability of clustering outcomes by combining autoencoders with unsupervised embeddings. The autoencoder may compress input data into a latent representation, and the unsupervised embedding may refine this latent space to a clustering-friendly representation. This combination may enable visualization of latent features and improve user understanding of cluster structures, thereby enhancing interpretability in addition to feature representation and generalization.
[0027] In an embodiment of the present invention, the clustering system 100 may be adapted to optimize self-supervised learning objectives specifically for clustering tasks. This adaptation may address a gap in current approaches, as self-supervised methods are rarely aligned directly with clustering objectives. By optimizing self-supervised tasks for clustering, the clustering system 100 may represent one of the pioneering approaches in the field and may achieve improved stability and accuracy on large unlabeled datasets.
[0028] In an embodiment of the present invention, the clustering system 100 may be adapted to ensure robust clustering performance on complex, high-dimensional datasets. By dynamically tuning parameters in density-based clustering and applying hybrid deep clustering architectures, the clustering system 100 may reduce sensitivity to noise and achieve consistent accuracy even in heterogeneous, real-world data distributions.
[0029] In an embodiment of the present invention, the clustering system 100 may be adapted to improve clustering accuracy in overlapping communities within large-scale networks. By applying hierarchical strategies with graph neural networks, the clustering system 100 may assign soft cluster memberships to data points, enabling a single point to belong to multiple communities. This adaptation may enhance accuracy in identifying overlapping structures compared to conventional graph-based clustering methods.
[0030] In an embodiment of the present invention, the clustering system 100 may be adapted to directly optimize self-supervised learning objectives for clustering tasks. The optimization may include alignment of pretext tasks such as contrastive similarity, masked feature prediction, or augmentation consistency with clustering loss functions. This direct optimization may improve feature learning in the absence of labels and enhance clustering accuracy on unlabeled datasets.
[0031] In an embodiment of the present invention, the clustering system 100 may be adapted to provide a comparative evaluation of clustering methods by mapping performance of existing algorithms against the proposed framework. The comparative evaluation may include metrics such as parameter sensitivity, interpretability, scalability, and accuracy on overlapping communities. The results may be presented in a structured manner on an evaluation dashboard.
[0032] According to the embodiments of the present invention, the system 100 may incorporate non-limiting hardware components to enhance a processing speed and an efficiency, such as the system 100 may comprise a client device 102, a first processor 104, a second processor 106, an application server 108, a secure cloud database 110, a communication network 112, and a storage medium 114. In an embodiment of the present invention, the hardware components of the system 100 may be integrated with computer-executable instructions for overcoming the challenges and the limitations of the existing systems.
[0033] In an embodiment of the present invention, the client device 102 may be an electronic device. The client device 102 may be adapted to upload a dataset of user-generated textual content to the system 100. The dataset of the user-generated textual content may be obtained from a social media platform. The social media platform may be natively installed and operated on the client device 102. The uploaded dataset may be of high dimensionality. The uploaded dataset may comprise heterogeneous distribution of datapoints. The uploaded dataset may be in an absence of labelling. The client device 102 may be, but not limited to, a personal computer, a consumer device, and alike. Embodiments of the present invention are intended to include or otherwise cover any type of the client device 102 including known, related art, and/or later developed technologies. In an embodiment of the present invention, the personal computer may be, but not limited to, a desktop, a server, a laptop, and alike. Embodiments of the present invention are intended to include or otherwise cover any type of the personal computer including known, related art, and/or later developed technologies.
[0034] Further, in an embodiment of the present invention, the consumer device may be, but not limited to, a tablet, a mobile phone, a notebook, a netbook, a smartphone, a wearable device, and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the consumer device, including known, related art, and/or later developed technologies.
[0035] In an embodiment of the present invention, the client device 102 may comprise and operatively communicate with the first processor 104. The operative communication may include, but not limited to, receiving, transmitting, processing, synchronizing, querying, updating, encrypting, decrypting, storing, retrieving, validating, logging, monitoring, alerting, authenticating, authorizing, compressing, decompressing, streaming, and rendering data or commands between the system 100 and the client computer 102.
[0036] In an embodiment of the present invention, the second processor 106 may be located on the application server 108. The second processor 106 may be configured to integrate multiple clustering techniques including density-based clustering with dynamic parameter adjustment, hybrid deep clustering with autoencoders and embeddings, graph neural network clustering with hierarchical strategies, and clustering with self-supervised learning objectives.
[0037] The second processor 106 may be configured to obtain the dataset of the user-generated textual content from the social media platform. The dataset may comprise one million datapoints. In an embodiment of the present invention, the second processor 106 may be configured to obtain the Sentiment140 dataset comprising approximately 1.6 million Twitter posts. The Sentiment140 dataset may provide labelled sentiment classes and may serve as a benchmark resource for training and evaluating sentiment analysis models.
[0038] In an embodiment of the present invention, the second processor 106 may be configured to connect to the social media platform through an application programming interface (API) or a secure data access protocol. The connection may enable automated extraction of user-generated textual content, including posts, comments, and messages, from publicly accessible or authorized data sources. The second processor 106 may be configured to manage authentication tokens, access keys, and rate-limiting constraints imposed by the social media platform to ensure compliant data retrieval. In another embodiment of the present invention, the second processor 106 may be configured to batch process the incoming dataset so that the extraction of one million datapoints may be performed in increments. The batching mechanism may prevent overloading of network bandwidth and may ensure reliability of dataset collection without interruption. The batching may further enable checkpointing such that intermediate progress may be stored, and the process may resume from the last checkpoint in case of failure.
[0039] In an embodiment of the present invention, the second processor 106 may be configured to store the acquired dataset temporarily in a cache memory before transferring it to the secure cloud database 110. This staged storage may allow validation of the dataset, including schema verification, anomaly detection, and consistency checks, prior to permanent storage. In an embodiment of the present invention, the second processor 106 may be configured to handle different data formats retrieved from the social media platform, including but not limited to JavaScript Object Notation (JSON), comma-separated values (CSV), tabular data, or unstructured text streams. The second processor 106 may normalize these data formats into a structured schema to ensure compatibility with subsequent analytical stages of the system 100. In another embodiment of the present invention, the second processor 106 may be configured to anonymize sensitive user-related fields such as usernames, email addresses, or location identifiers before further processing. This anonymization may preserve privacy of the users while retaining semantic integrity of the dataset for clustering and sentiment classification purposes.
[0040] The second processor 106 may be configured to pre-process the dataset by performing tokenization, stop word removal, slang correction, handling of social media-specific textual elements, stemming of words, removal of punctuation, and so forth. In an embodiment of the present invention, the second processor 106 may be configured to pre-process the dataset at the time of acquisition by filtering irrelevant fields, removing duplicate records, and timestamping data entries. The pre-processing at the acquisition stage may reduce redundancy and may optimize the dataset for subsequent sentiment analysis tasks.
[0041] The second processor 106 may be configured to generate word embeddings to capture semantic relationships within the dataset. The word embeddings may be generated using a Word2Vec semantic representation technique. The word embeddings may represent words as continuous vector representations in a multidimensional space, wherein words with similar meanings or contextual usage may occupy proximate positions in the space. The second processor 106 may be configured to analyse the co-occurrence patterns of words within the dataset and assign numerical vectors that preserve contextual proximity, synonymy, and analogy relationships among words. By capturing these semantic relationships, the generated embeddings may allow downstream models of the system 100 to recognize linguistic nuances, such as similarity between related terms, differences among contrasting terms, and contextual meanings of words in varied usage scenarios.
[0042] In an embodiment of the present invention, the second processor 106 may be configured to apply tokenization on the dataset prior to embedding generation. The tokenization may segment the user-generated textual content into words, sub words, or n-grams so that the semantic representation may be accurately captured during embedding. In another embodiment of the present invention, the second processor 106 may be configured to construct a vocabulary from the tokenized dataset. The vocabulary may map unique tokens to corresponding vector representations, wherein infrequent tokens may be pruned to reduce noise and computational complexity.
[0043] In an embodiment of the present invention, the second processor 106 may be configured to train a Word2Vec semantic representation technique using continuous bag-of-words or skip-gram techniques. In the continuous bag-of-words approach, the second processor 106 may be configured to predict a target word from its surrounding context, whereas in the skip-gram approach, the second processor 106 may be configured to predict the surrounding context from a target word. Both approaches may enable the embeddings to capture semantic proximity between words. In another embodiment of the present invention, the second processor 106 may be configured to adjust hyperparameters of the Word2Vec semantic representation technique, including vector dimensionality, context window size, negative sampling rate, and learning rate. Such an adjustment may allow the embeddings to balance accuracy, semantic coverage, and computational efficiency. In an embodiment of the present invention, the second processor 106 may be configured to apply dimensionality reduction techniques such as Principal Component Analysis (PCA) or t-distributed Stochastic Neighbour Embedding (t-SNE) on the generated embeddings to improve interpretability while preserving semantic relationships.
[0044] The second processor 106 may be configured to train a set of deep learning models using the dataset. The model in the set of deep learning models may be, but not limited to, a Simple Recurrent Neural Network (RNN), a Long Short-Term Memory network (LSTM), a Bidirectional Long Short-Term Memory network (BiLSTM), a Convolutional Neural Network (CNN), and a Bidirectional Encoder Representations from Transformers (BERT) model, and so forth. The second processor 106 may be configured to train model in the set of deep learning models by dividing the dataset into training and validation subsets to ensure balanced learning. The second processor 106 may be configured to optimize training by adjusting hyperparameters such as learning rate, batch size, and number of epochs. The second processor 106 may be configured to employ regularization techniques, including dropout or weight decay, to prevent overfitting during training. The second processor 106 may be configured to evaluate training progress using loss functions and accuracy metrics.
[0045] The second processor 106 may be configured to classify sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model. In an embodiment of the present invention, the second processor 106 may be configured to classify sentiments within the dataset by applying each trained deep learning model to the generated word embeddings. The classification may output probability distributions over sentiment categories, including positive, negative, and neutral. In another embodiment of the present invention, the second processor 106 may be configured to implement a SoftMax activation function at the output layer of each deep learning model. The SoftMax activation function may normalize raw scores into probability values so that the class with the highest probability may be selected as the predicted sentiment label.
[0046] In an embodiment of the present invention, the second processor 106 may be configured to process sentences, phrases, or entire documents as input sequences, wherein contextual dependencies within the word embeddings may be used to determine the final sentiment category. In another embodiment of the present invention, the second processor 106 may be configured to handle ambiguous or mixed sentiments by computing confidence thresholds. When the difference between class probabilities may fall below the threshold, the second processor 106 may flag the sentiment as uncertain for manual review or further analysis. In an embodiment of the present invention, the second processor 106 may be configured to validate classification results by comparing predicted sentiment labels with annotated ground-truth labels available in a testing subset of the dataset. Accuracy, precision, recall, and F1-score may be computed to evaluate classification reliability for each of the deep learning models.
[0047] The second processor 106 may be configured to compare performance of the models in the set of deep learning models based on accuracy, context understanding, error rate, scalability, and so forth, to determine the most effective model for sentiment analysis of the dataset. In an embodiment of the present invention, the second processor 106 may be configured to compare performance of the models in the set of deep learning models by computing evaluation metrics such as accuracy, precision, recall, and F1-score. The comparison may enable determination of the models that achieves the highest reliability in sentiment classification. In another embodiment of the present invention, the second processor 106 may be configured to assess context understanding of the models by evaluating their performance on sentences containing sarcasm, idioms, or ambiguous expressions. Improved accuracy on such subsets may indicate superior contextual comprehension.
[0048] In an embodiment of the present invention, the second processor 106 may be configured to measure error rates by tracking false positives, false negatives, and misclassification frequencies across sentiment categories. The error analysis may be used to identify weaknesses of individual models. In another embodiment of the present invention, the second processor 106 may be configured to evaluate a scalability of the models by measuring computational efficiency, memory utilization, and inference time on large datasets. The scalability assessment may ensure practical applicability of the models in real-time sentiment analysis tasks.
[0049] The second processor 106 may be configured to measure a true positive rate and a false negative rate for each of the models in the set of the deep learning model. In an embodiment of the present invention, the second processor 106 may be configured to measure a true positive rate by dividing the number of correctly predicted positive sentiments by the total number of actual positive sentiments in the dataset. This measurement may indicate the sensitivity of each deep learning model toward detecting positive sentiment cases. In an embodiment of the present invention, the second processor 106 may be configured to measure a false negative rate by dividing the number of positive sentiments incorrectly classified as neutral or negative by the total number of actual positive sentiments. This measurement may reveal the likelihood of each deep learning model to miss positive sentiment cases.
[0050] The second processor 106 may be configured to evaluate scalability of the models in the set of deep learning models for real-time sentiment analysis on high-volume social media data streams. In an embodiment of the present invention, the second processor 106 may be configured to evaluate scalability of the models by monitoring computational metrics including processing latency, throughput, and memory consumption while analysing high-volume social media data streams. The scalability evaluation may indicate whether the models can sustain real-time sentiment analysis without performance loss.
[0051] The second processor 106 may be configured to present model-wise accuracy, error distribution, sentiment distribution results, and so forth on a dashboard (not shown) installed in the client device 102. The dashboard may provide visual elements such as tables, charts, or graphs so that an operator may interpret performance metrics of each model and determine the most effective model for deployment.
[0052] In an embodiment of the present invention, the application server 108 may be a hardware on adapted to accommodate and install the second processor 106. The application server 108 may be, but not limited to, a motherboard, a wired board, a mainframe, and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the application server 108, including known, related art, and/or later developed technologies.
[0053] In an embodiment of the present invention, the second processor 106 may be located on the application server 108. The second processor 106 may be configured to execute the computer-readable instructions to generate an output relating to the system 100. The second processor 106 may be, but not limited to, a Programmable Logic Control (PLC) unit, a microprocessor, a development board, and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the second processor 106, including known, related art, and/or later developed technologies.
[0054] In an embodiment of the present invention, the secure cloud database 110 may be adapted to store the dataset received from the client device 102. The secure cloud database 110 may be for example, but not limited to, a distributed database, a personal database, an end-user database, a commercial database, a Structured Query Language (SQL) database, a non-SQL database, an operational database, a relational database, an object-oriented database, a graph database, a cloud server database, and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the secure cloud database 110, including known, related art, and/or later developed technologies.
[0055] Further, the secure cloud database 110 may be a cloud server database, in an embodiment of the present invention. In an embodiment of the present invention, the cloud server may be remotely located. In an exemplary embodiment of the present invention, the cloud server may be a public cloud server. In another exemplary embodiment of the present invention, the cloud server may be a private cloud server. In yet another embodiment of the present invention, the cloud server may be a dedicated cloud server. The cloud server may be, but not limited to, a Microsoft Azure cloud server, an Amazon AWS cloud server, a Google Compute Engine (GCE) cloud server, an Amazon Elastic Compute Cloud (EC2) cloud server, and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the cloud server, including known, related art, and/or later developed technologies.
[0056] In an embodiment of the present invention, the communication network 112 may be adapted to establish a communicative link connecting the client device 102 to the application server 108. The communication network 112 may utilize one or more protocols, including LoRa for long-range low-power data exchange, Zigbee for mesh-based short-range connectivity, Bluetooth or Bluetooth Low Energy for local communication, Wi-Fi for high-bandwidth data transfer, and cellular standards such as 4G or 5G for wide-area coverage. The communication network 112 may be configured to dynamically select or switch among these protocols based on latency requirements, bandwidth availability, and energy constraints. The communication network 112 may further implement encryption schemes and secure authentication to safeguard transmitted data. In certain cases, adaptive routing or mesh topologies may be employed so that uninterrupted connectivity may be maintained between the client device 102 and the application server 108.
[0057] In an embodiment of the present invention, the storage medium 114 comprising programming instructions executable by the second processor 106. In an embodiment of the present invention, the storage medium 114 may store the computer programmable instructions in form of programming modules. The storage medium 114 may be a non-transitory storage medium, in an embodiment of the present invention. The storage medium 114 may communicate with the second processor 106 and execute a computer-readable set of instructions present in storage medium 114, in an embodiment of the present invention.
[0058] The storage medium 114 may be, but not limited to, a Random-Access Memory (RAM), a Static Random-access Memory (SRAM), a Dynamic Random-access Memory (DRAM), a Read Only Memory (ROM), an Erasable Programmable Read-only Memory (EPROM), an Electrically Erasable Programmable Read-only Memory (EEPROM), a NAND Flash, a Secure Digital (SD) memory, a cache memory, a Hard Disk Drive (HDD), a Solid-State Drive (SSD) and so forth. Embodiments of the present invention are intended to include or otherwise cover any type of the storage medium 114, including known, related art, and/or later developed technologies.
[0059] FIG. 2 illustrates a data flow diagram 200 of the system 100, according to an embodiment of the present invention. In an embodiment of the present invention, a sequence of word embeddings (W1, W2, W3, W4, W5) may be generated from textual input, wherein the embeddings may capture semantic features of corresponding words in a multidimensional space. The sequence of word embeddings may be processed by a transformer encoder, and contextualized vectors (O1, O2, O3, O4, O5) may be produced. The contextualized vectors (O1, O2, O3, O4, O5) may preserve dependencies and semantic relationships across the sequence, enabling improved understanding of context. The contextualized vectors (O1, O2, O3, O4, O5) may be passed to a classification layer comprising a fully connected layer, Gaussian Error Linear Unit (GELU) activation, and normalization. The classification layer may map the contextualized vectors into sentiment-related probability values.
[0060] Further, predicted tokens (W’1, W’2, W’3, W’4, W’5) may be generated at the output through application of a SoftMax function. The predicted tokens (W’1, W’2, W’3, W’4, W’5) may represent normalized probabilities that correspond to sentiment categories such as positive, negative, or neutral. Additionally, a masked token (for example, W4) may be introduced during training, and the model may predict the masked token as W’4 using surrounding contextual information. This prediction task may enhance the ability of the model to capture semantic nuances and long-range dependencies. At last, the predicted tokens (W’1, W’2, W’3, W’4, W’5) may be compared against the actual tokens (W1, W2, W3, W4, W5) to compute a training loss. The training loss may be minimized iteratively, improving overall classification accuracy for sentiment analysis.
[0061] FIG. 3 illustrates a comparison graph 300 of the system 100, according to an embodiment of the present invention. The comparison graph 300 may represent the Simple Recurrent Neural Network (SimpleRNN) and the Convolutional Neural Network (CNN) exhibit lower accuracy values, the Long Short-Term Memory (LSTM) network and the Bidirectional Long Short-Term Memory (BiLSTM) network demonstrate moderate accuracy with balanced performance, and the Bidirectional Encoder Representations from Transformers (BERT) model achieves the highest accuracy. The comparative trend indicates that transformer-based architectures may provide superior performance in sentiment classification compared to recurrent or convolution-based models.
[0062] In an embodiment of the present invention, the comparison graph 300 may represent accuracy values for the Simple Recurrent Neural Network (SimpleRNN), the Convolutional Neural Network (CNN), the Long Short-Term Memory (LSTM) network, the Bidirectional Long Short-Term Memory (BiLSTM) network, and the Bidirectional Encoder Representations from Transformers (BERT) model. In an embodiment of the present invention, the comparison graph 300 may establish that the Bidirectional Encoder Representations from Transformers (BERT) model achieves an accuracy improvement of approximately four percent compared to the Simple Recurrent Neural Network (SimpleRNN), Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM) network, and Bidirectional Long Short-Term Memory (BiLSTM) network, thereby establishing its superiority for sentiment classification tasks.
[0063] In an embodiment of the present invention, the Bidirectional Encoder Representations from Transformers (BERT) model may be identified as utilizing a bidirectional transformer architecture that processes textual sequences from both left-to-right and right-to-left directions, enabling superior contextual understanding compared to unidirectional sequential models such as the Simple Recurrent Neural Network (SimpleRNN). In an embodiment of the present invention, the transformer-based design of the Bidirectional Encoder Representations from Transformers (BERT) model may be configured to handle long textual sequences by preserving dependencies across distant words, overcoming limitations of the Long Short-Term Memory (LSTM) network and Bidirectional Long Short-Term Memory (BiLSTM) network, that may lose accuracy on extended textual inputs. The Bidirectional Encoder Representations from Transformers (BERT) model may exhibit an accuracy of 87%.
[0064] In another embodiment of the present invention, it may be observed that the Bidirectional Encoder Representations from Transformers (BERT) model provides a higher true positive rate compared to other models, which enhances its effectiveness in correctly detecting positive sentiments. In an embodiment of the present invention, the Bidirectional Encoder Representations from Transformers (BERT) model may be determined to achieve a lower false negative rate than the Simple Recurrent Neural Network (SimpleRNN), Convolutional Neural Network (CNN), Long Short-Term Memory (LSTM) network, or Bidirectional Long Short-Term Memory (BiLSTM) network, thereby reducing the likelihood of misclassifying positive sentiments as neutral or negative.
[0065] In another embodiment of the present invention, the models may be applied for binary sentiment classification, wherein textual data may be classified as either positive or negative, in addition to or instead of three-class classification. The Bidirectional Encoder Representations from Transformers (BERT) model may demonstrate robust performance in both schemes. In an embodiment of the present invention, the Bidirectional Encoder Representations from Transformers (BERT) model may be recorded as requiring greater computational resources, including higher memory consumption, and longer training time, compared to the Long Short-Term Memory (LSTM) network or the Convolutional Neural Network (CNN). In another embodiment of the present invention, the Bidirectional Long Short-Term Memory (BiLSTM) network may be observed to provide balanced performance across accuracy, contextual comprehension, and computational efficiency, even though the Bidirectional Encoder Representations from Transformers (BERT) model may achieve the highest overall accuracy.
[0066] FIG. 4 depicts a flowchart of a computer-implemented method 400 for textual sentiment analysis using the system 100, according to an embodiment of the present invention.
[0067] At step 402, the system 100 may obtain the dataset of the user-generated textual content from the social media platform. The dataset may comprise one million datapoints.
[0068] At step 404, the system 100 may pre-processing the dataset by performing the tokenization, the stop word removal, the slang correction, the handling of social media-specific textual elements, the stemming of words, the removal of punctuation, and so forth.
[0069] At step 406, the system 100 may generate the word embeddings to capture the semantic relationships within the dataset. The word embeddings may be generated using the Word2Vec semantic representation technique.
[0070] At step 408, the system 100 may train the set of deep learning models using the dataset.
[0071] At step 410, the system 100 may classify the sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model.
[0072] At step 412, the system 100 may compare the performance of the models in the set of deep learning models based on the accuracy, the context understanding, the error rate, the scalability, and so forth, to determine the most effective model for sentiment analysis of the dataset.
[0073] At step 414, the system 100 may measuring the true positive rate and the false negative rate for the models in the set of deep learning model. , Claims:CLAIMS
I/We Claim:
1. A sentiment analysis system (100) for social media platform, the system (100) comprising:
a client device (102) comprising a first processor (104);
a second processor (106) located on an application server (108);
a communication network (112) adapted to establish a communicative link connecting the client device (102) to the application server (108); and
a storage medium (114) comprising programming instructions executable by the second processor (106), characterized in that the second processor (106) is configured to:
obtain a dataset of user-generated textual content from the social media platform;
generate word embeddings to capture semantic relationships within the dataset, wherein the word embeddings are generated using a Word2Vec semantic representation technique;
train a set of deep learning models using the dataset;
classify sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning model; and
compare performance of the models in the set of deep learning models based on accuracy, context understanding, error rate, scalability, or a combination thereof, to determine the most effective model for sentiment analysis of the dataset.
2. The system (100) as claimed in claim 1, wherein the second processor (106) is configured to pre-process the dataset by performing tokenization, stop word removal, slang correction, handling of social media-specific textual elements, stemming of words, removal of punctuation, or a combination thereof.
3. The system (100) as claimed in claim 1, wherein the social media platform is configured to operate on the client device (102).
4. The system (100) as claimed in claim 1, wherein models in the set of deep learning models is selected from a Simple Recurrent Neural Network (RNN), a Long Short-Term Memory network (LSTM), a Bidirectional Long Short-Term Memory network (BiLSTM), a Convolutional Neural Network (CNN), a Bidirectional Encoder Representations from Transformers (BERT) model, or a combination thereof.
5. The system (100) as claimed in claim 1, wherein the second processor (106) is configured to measure a true positive rate and a false negative rate for the models in the set of deep learning models.
6. The system (100) as claimed in claim 1, wherein the second processor (106) is configured to evaluate scalability of the models in the set of deep learning models for real-time sentiment analysis on high-volume social media data streams.
7. The system (100) as claimed in claim 1, wherein the second processor (106) is configured to present model-wise accuracy, error distribution, sentiment distribution results, or a combination thereof on the client device (102).
8. A computer-implemented method (400) for textual sentiment analysis, the method (400) is characterized by steps of:
obtaining a dataset of user-generated textual content from a social media platform, wherein the dataset comprises one million datapoints;
generating word embeddings to capture semantic relationships within the dataset, wherein the word embeddings are generated using a Word2Vec semantic representation technique;
training a set of deep learning models using the dataset;
classifying sentiments within the dataset as positive, negative, or neutral using each of the models in the set of deep learning models; and
comparing performance of the models in the set of deep learning models based on accuracy, context understanding, error rate, scalability, or a combination thereof, to determine the most effective model for sentiment analysis of the dataset.
9. The method (400) as claimed in claim 8, comprising a step of pre-processing the dataset by performing tokenization, stop word removal, slang correction, handling of social media-specific textual elements, stemming of words, removal of punctuation, or a combination thereof.
10. The method (400) as claimed in claim 8, comprising a step of measuring a true positive rate and a false negative rate for the models in the set of deep learning model.
Date: 08, 2025
Place: Noida
Nainsi Rastogi
Patent Agent (IN/PA-2372)
Agent for the Applicant
| # | Name | Date |
|---|---|---|
| 12 | 202541098313-COMPLETE SPECIFICATION [10-10-2025(online)].pdf | 2025-10-10 |