Sign In to Follow Application
View All Documents & Correspondence

A Sentiment Classification System Using Hierarchical Attention Convolutional Network With Twitter Data

Abstract: A SENTIMENT CLASSIFICATION USING HIERARCHICAL ATTENTION CONVOLUTIONAL NETWORK WITH TWITTER DATA A system and method for sentiment classification of Twitter data are disclosed. Tweets are preprocessed and tokenised using a transformer-based encoder to generate context-aware tokens. Multiple features including hashtags, all-caps words, elongated units, emoticons, TF-IDF, Lin similarity, N-grams and Word2Vec embeddings are extracted to form a comprehensive representation. These features are processed through a Hierarchical Attention Convolutional Network (HAConv-Net) comprising a hierarchical attention encoder and a Siamese convolutional neural network to fuse hierarchical and similarity-based information. The fused embeddings are classified into sentiment categories (positive, negative, neutral), and results are output to the user. By integrating tokenisation, multi-feature extraction and hierarchical attention convolutional learning in a single pipeline, the invention achieves high precision, recall and F-measure on noisy short-text social media data, offering a robust and efficient solution for real-world sentiment analysis tasks.

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
23 September 2025
Publication Number
43/2025
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

SR UNIVERSITY
ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA

Inventors

1. SATYAM YELLA
SR UNIVERSITY, ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA
2. RAJCHANDAR K
SR UNIVERSITY, ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA

Specification

Description:FIELD OF THE INVENTION
This invention relates to natural language processing (NLP) and machine learning. More particularly, it concerns a system and method for sentiment classification using a hierarchical attention convolutional network (HAConv-Net) applied to Twitter data, integrating tokenisation, multi-feature extraction, and deep neural network components to improve accuracy on noisy and short social media texts.
BACKGROUND OF THE INVENTION
Sentiment analysis is an important component of research due to social media platforms, where users express ideas, emotions, and perspectives. Twitter data is noisy with slang, emojis, abbreviations, hashtags, and misspellings. Researchers have developed various classification methods for sentiment analysis. Conventional techniques, such as Bag-of-Words or Term Frequency-Inverse Document Frequency (TF-IDF) fail to capture these variations and understand context, leading to poor classification. Sentiment analysis on Twitter remains challenging due to slang and spelling errors in short phrases. In order to solve this, a Hierarchical Attention Convolutional Network (HAConv-Net) for sentiment analysis of Twitter data is devised in this work. Firstly, Twitter data is acquired from a specified dataset, which is subjected to the tokenization stage, where Bidirectional Encoder Representation from Transformer (BERT) is exploited for converting the input text to tokens. Afterwards, feature extraction is processed, where the features, include hashtag, all-caps, elongated units, emoticon, TF-IDF, lin similarity and N-gram features are excerpted, along with word2Vec vector encoding. Lastly, sentiment analysis of Twitter data is done by exploiting HAConv-Net, which is newly designed by incorporating Hierarchical Attention Networks (HAN) and Siamese Convolutional Neural Network (SCNN).
US20210089765: Techniques are provided for generating and applying a granular attention hierarchical neural network model to classify a document. In various embodiments, data indicative of the document may be obtained (102) and processed (104) into a first layer of two or more layers of a hierarchical network model using a dual granularity attention mechanism to generate first layer output data, wherein the dual granularity attention mechanism weighs some portions of the data indicative of the document more heavily. Some portions of the data indicative of the document are integrated into the hieratical network model during training of the dual granularity attention mechanism. The first layer output data may be processed (106) in the second of two or more layers of the hierarchical network model to generate second layer output data. A classification label can be generated (108) from the second layer output data.
US20230334254A1: The present invention relates to a method and system for verification scoring and automated fact checking. More particularly, the present invention relates to a combination of automated and assisted fact checking techniques to provide a verification score. According to a first aspect, there is a method of verifying input data, comprising the steps of: receiving one or more items of input data; determining one or more pieces of information to be verified from the or each item of input data; determining which of the one or more pieces of information are to be verified automatically and which of the one or more pieces of information require manual verification; determining an automated score indicative of the accuracy of the at least one piece of information which is to be verified automatically; and generating a combined verification score which gives a measure of confidence of the accuracy of the information which forms the or each item of input data.
Sentiment classification of Twitter data is challenging due to slang, emojis, hashtags, abbreviations, and misspellings that degrade traditional models’ performance. Existing methods based on bag-of-words or simple deep learning architectures fail to capture context, semantic relationships, and multi-level features, resulting in poor classification. Current models also lack effective tokenisation and feature fusion across different types of signals. The present invention solves these problems by providing a unified framework combining BERT tokenisation, handcrafted and learned feature extraction, and a novel HAConv-Net integrating Hierarchical Attention Networks (HAN) and Siamese Convolutional Neural Networks (SCNN), delivering higher recall, precision, and F-measure than prior art.
SUMMARY OF THE INVENTION
This summary is provided to introduce a selection of concepts, in a simplified format, that are further described in the detailed description of the invention.
This summary is neither intended to identify key or essential inventive concepts of the invention and nor is it intended for determining the scope of the invention.
The invention provides a system and method for sentiment classification using Twitter data. Input tweets are preprocessed and tokenised using a transformer-based model to convert text into context-aware tokens. Multi-type features such as hashtags, all-caps words, elongated units, emoticons, TF-IDF, Lin similarity, N-grams, and Word2Vec embeddings are extracted.
The extracted features are fed into a Hierarchical Attention Convolutional Network (HAConv-Net) comprising a Hierarchical Attention Network (HAN) and a Siamese Convolutional Neural Network (SCNN). This architecture allows multi-level attention over sequences and captures semantic similarity between different feature channels.
By fusing token-level and sentence-level attention with convolutional feature maps in a unified pipeline, the model accurately classifies tweets into sentiment categories (positive, negative, neutral) even under noise and short text constraints. This approach significantly improves classification performance over conventional and hybrid methods, achieving robust sentiment analysis suitable for real-world deployment.
To further clarify advantages and features of the present invention, a more particular description of the invention will be rendered by reference to specific embodiments thereof, which is illustrated in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail with the accompanying drawings.
With the rise of social media, sentiment analysis which intends to determine from textual data people's opinions towards a specific issue, has become one of the most interesting research subjects in NLP. Twitter is a social media platform where an extensive amount of people easily and clearly shares their thoughts and opinions. Twitter data analysis is more difficult than the data analysis from other social networks because of the frequency of slang terms and spelling errors in short phrase styles. There are still a number of drawbacks to automated feature selection, including increased computation costs that increase with the quantity of features. Hence, DL-based HAConv-Net is presented in this work for addressing these problems.
BRIEF DESCRIPTION OF THE DRAWINGS
The illustrated embodiments of the subject matter will be understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of devices, systems, and methods that are consistent with the subject matter as claimed herein, wherein:
FIGURE 1: SYSTEM ARCHITECTURE
The figures depict embodiments of the present subject matter for the purposes of illustration only. A person skilled in the art will easily recognize from the following description that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the disclosure described herein.
DETAILED DESCRIPTION OF THE INVENTION
The detailed description of various exemplary embodiments of the disclosure is described herein with reference to the accompanying drawings. It should be noted that the embodiments are described herein in such details as to clearly communicate the disclosure. However, the amount of details provided herein is not intended to limit the anticipated variations of embodiments; on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the scope of the present disclosure as defined by the appended claims.
It is also to be understood that various arrangements may be devised that, although not explicitly described or shown herein, embody the principles of the present disclosure. Moreover, all statements herein reciting principles, aspects, and embodiments of the present disclosure, as well as specific examples, are intended to encompass equivalents thereof.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a",” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes” and/or “including,” when used herein, specify the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groups thereof.
It should also be noted that in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed concurrently or may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
In addition, the descriptions of "first", "second", “third”, and the like in the present invention are used for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" and "second" may include at least one of the features, either explicitly or implicitly.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which example embodiments belong. It will be further understood that terms, e.g., those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
With the rise of social media, sentiment analysis which intends to determine from textual data people's opinions towards a specific issue, has become one of the most interesting research subjects in NLP. Twitter is a social media platform where an extensive amount of people easily and clearly shares their thoughts and opinions. Twitter data analysis is more difficult than the data analysis from other social networks because of the frequency of slang terms and spelling errors in short phrase styles. There are still a number of drawbacks to automated feature selection, including increased computation costs that increase with the quantity of features. Hence, DL-based HAConv-Net is presented in this work for addressing these problems.
NOVELTY:
Sentiment analysis specifically referred to as sentiment classification is the procedure of categorizing text into predetermined sentiment classes, including positive, negative, or neutral. Integration of HAN and SCNN in a unified architecture (HAConv-Net) appears novel for sentiment analysis on Twitter data. Firstly, the twitter data is taken from the given database and it is subjected to tokenization. In this case, the tokenization is carried out by employing BERT . Thereafter, feature extraction is processed, where the features including all-caps, emoticon, hashtag, elongated units , lin similarity , TF-IDF , N-gram features, and word2Vec are extracted. At last, the sentiment analysis of twitter data is performed by exploiting HAConv-Net. The HAConv-Net is devised by integrating HAN and SCNN.
The invention begins with data acquisition of tweets from a specified dataset or live stream.
A preprocessing and tokenisation module cleans the raw data by removing URLs, normalising text, and converting emojis into textual representations. It then tokenises the text using a transformer-based encoder to obtain context-aware embeddings.
A feature extraction module computes multiple complementary descriptors from each tweet. These include hashtags, all-caps features, elongated units, emoticon counts, TF-IDF vectors, Lin similarity metrics, N-gram counts, and Word2Vec embeddings.
The extracted features are aligned and concatenated to form a comprehensive representation of each tweet.
The unified feature representation is passed into the Hierarchical Attention Convolutional Network (HAConv-Net).
Within HAConv-Net, a Hierarchical Attention Network applies attention at both word and sentence levels to focus on important parts of the tweet text.
A Siamese Convolutional Neural Network simultaneously processes paired feature channels to learn similarity and dissimilarity patterns, enriching the feature space with structural and contextual information.
Outputs of HAN and SCNN are fused at an intermediate stage to produce a joint embedding capturing both hierarchical and similarity-based cues.
A classification layer at the output assigns sentiment labels (positive, negative, neutral) based on the fused embeddings.
Training of the model uses a supervised learning approach with cross-entropy loss, optimising weights across the combined architecture.
Regularisation techniques are applied to prevent overfitting, and hyperparameters are tuned for optimal performance.
The system records evaluation metrics such as precision, recall, and F-measure to assess model quality.
The architecture is modular and can be adapted to other short-text social media platforms by retraining on appropriate datasets.
Security and privacy measures ensure that any personally identifiable information within tweets is handled according to data protection standards.
This framework delivers higher classification accuracy by integrating tokenisation, multi-feature extraction, and hierarchical attention convolutional learning into a single pipeline.

BEST METHOD OF WORKING
The preferred embodiment deploys the model as a server-based API for social media analytics. Incoming tweets are preprocessed and tokenised with a transformer-based encoder. Multi-type features are extracted and combined. The HAConv-Net integrates HAN and SCNN components to process the combined features and outputs sentiment labels. This configuration achieves improved recall, precision, and F-measure on Twitter data while maintaining efficiency for large-scale deployment.
, Claims:1. A system for sentiment classification of Twitter data comprising: a preprocessing and tokenisation module configured to clean tweets and convert them into context-aware tokens using a transformer-based encoder; a feature extraction module configured to compute hashtags, all-caps features, elongated units, emoticons, TF-IDF vectors, Lin similarity metrics, N-gram features and Word2Vec embeddings from tokenised tweets; a hierarchical attention convolutional network comprising a hierarchical attention encoder and a Siamese convolutional neural network configured to fuse the extracted features and produce joint embeddings; a classification module configured to assign sentiment labels based on the joint embeddings; and an output module configured to present sentiment classification results and performance metrics to a user.
2. The system as claimed in claim 1, wherein the preprocessing and tokenisation module normalises tweets, removes URLs and emojis, and generates contextual embeddings.
3. The system as claimed in claim 1, wherein the feature extraction module computes both handcrafted and learned features for comprehensive representation of each tweet.
4. The system as claimed in claim 1, wherein the hierarchical attention encoder applies word-level and sentence-level attention to highlight important parts of the text.
5. The system as claimed in claim 1, wherein the Siamese convolutional neural network learns similarity and dissimilarity patterns between paired feature channels to enrich embeddings.
6. A method for sentiment classification of Twitter data comprising:
preprocessing and tokenising tweets to clean them and convert text into context-aware tokens using a transformer-based encoder;
extracting hashtags, all-caps features, elongated units, emoticons, TF-IDF vectors, Lin similarity metrics, N-gram features and Word2Vec embeddings from tokenised tweets;
processing the extracted features through a hierarchical attention convolutional network comprising a hierarchical attention encoder and a Siamese convolutional neural network to fuse features and produce joint embeddings;
classifying the joint embeddings into sentiment labels; and
outputting the sentiment classification results and performance metrics to a user.
7. The method as claimed in claim 6, wherein preprocessing includes removing URLs, normalising text, and converting emojis into textual representations.
8. The method as claimed in claim 6, wherein word-level and sentence-level attention highlight important text parts for improved classification.
9. The method as claimed in claim 6, wherein paired feature channels processed by the Siamese convolutional neural network enrich embeddings with structural and contextual cues.
10. The method as claimed in claim 6, wherein the system achieves improved recall, precision, and F-measure compared to conventional sentiment classification models.

Documents

Application Documents

# Name Date
1 202541090702-STATEMENT OF UNDERTAKING (FORM 3) [23-09-2025(online)].pdf 2025-09-23
2 202541090702-REQUEST FOR EARLY PUBLICATION(FORM-9) [23-09-2025(online)].pdf 2025-09-23
3 202541090702-POWER OF AUTHORITY [23-09-2025(online)].pdf 2025-09-23
4 202541090702-FORM-9 [23-09-2025(online)].pdf 2025-09-23
5 202541090702-FORM FOR SMALL ENTITY(FORM-28) [23-09-2025(online)].pdf 2025-09-23
6 202541090702-FORM 1 [23-09-2025(online)].pdf 2025-09-23
7 202541090702-EVIDENCE FOR REGISTRATION UNDER SSI(FORM-28) [23-09-2025(online)].pdf 2025-09-23
8 202541090702-EVIDENCE FOR REGISTRATION UNDER SSI [23-09-2025(online)].pdf 2025-09-23
9 202541090702-EDUCATIONAL INSTITUTION(S) [23-09-2025(online)].pdf 2025-09-23
10 202541090702-DRAWINGS [23-09-2025(online)].pdf 2025-09-23
11 202541090702-DECLARATION OF INVENTORSHIP (FORM 5) [23-09-2025(online)].pdf 2025-09-23
12 202541090702-COMPLETE SPECIFICATION [23-09-2025(online)].pdf 2025-09-23