ISSA DRDO Report
ISSA DRDO Report
On
At
Bachelor of Technology
In
Electronics Engineering
Submitted By
DEEPANSH SHRIVASTAVA
0901EC211042
I further declare that the work reported in this report has not been submitted and will not be
submitted, either in part or in full, for the award of any other degree or diploma in this institute
or any other institute or university.
--------------------------------
Deepansh Shrivastava
0901EC211042
Date:
Place: Metcalfe House, Delhi
This is to certify that the above statement made by the candidates is correct to the best of my
knowledge and belief.
Guided By:
Shubhi Saini
(Scientist ‘D’)
Institute For Systems Studies & Analyses
DRDO, Delhi
i
ACKNOWLEDGEMENT
I express my sincere gratitude to Ms. Deepakshi Shah, Director, Institute for Systems Studies &
Analyses (ISSA), Defence Research and Development Organisation (DRDO), for granting me the
opportunity to undertake my project at this esteemed institution.
I extend my deepest appreciation to my mentor, Ms. Shubhi Saini, Scientist ‘D’, for her
exceptional guidance, insightful feedback, and continuous support throughout my project,
"Sentiment Analysis for Defence Intelligence (SADI)." Her expertise and mentorship have been
instrumental in enhancing my technical and analytical skills in sentiment analysis.
I am also grateful to the scientists and researchers at ISSA-DRDO for their unwavering support,
knowledge-sharing, and encouragement. Their contributions have significantly enriched my
learning experience and provided valuable insights into advanced research methodologies.
This opportunity has been an immensely enriching experience, and I sincerely appreciate the
guidance and support of everyone who contributed to my professional growth during my tenure at
ISSA-DRDO.
Deepansh Shrivastava
0901EC211042
ii
CONTENT
Table of Contents
Acknowledgement...................................................................................................................... ii
Organisation Profile................................................................................................................... iv
References ................................................................................................................................ 15
iii
ORGANISATION PROFILE
The Defence Research and Development Organisation (DRDO), under the Ministry of
Defence, Government of India, is dedicated to enhancing India's defense capabilities through
cutting-edge research and development. Established in 1958, DRDO has played a pivotal role in
strengthening national security by innovating in areas such as missile technology, radar systems,
electronic warfare, artificial intelligence, cyber defense, and advanced materials.
Vision
"Empowering the nation with cutting-edge defense technologies and systems, fostering self-
reliance, and advancing scientific research for national security."
DRDO aims to make India self-sufficient in defense technologies through indigenous research,
collaboration with academia and industries, and advancements in emerging fields such as AI,
quantum computing, and cybersecurity.
The Institute for Systems Studies & Analyses (ISSA), DRDO, is a leading research lab focused
on strategic defense analytics, operational research, and decision support systems. It enhances
military decision-making through modeling, simulation, AI-driven analytics, and cyber warfare
strategies, supporting national security and resource optimization.
ISSA collaborates with defense agencies and research institutions to integrate AI, machine
learning, and big data analytics into military applications. Its work in threat assessment, mission
planning, and sentiment analysis for defense intelligence strengthens intelligence gathering and
situational awareness, contributing to data-driven strategic decisions for the armed forces.
iv
CHAPTER 1: INTRODUCTION
Sentiment analysis is an advanced machine learning technique used to interpret textual data and
classify sentiments as positive, negative, or neutral. Analyzing sentiment in Twitter data enables
organizations to gain qualitative insights into public perception, brand reputation, and emerging
trends. With over 30 million active users generating an average of 500 million tweets daily, Twitter
has established itself as a leading social media platform for real-time news, information sharing,
and brand engagement.
Given its vast user base and dynamic content, Twitter plays a crucial role in corporate marketing
strategies and customer service operations. However, the platform also poses risks, as negative
content can quickly go viral, potentially damaging a company's reputation. This makes social
listening—a process that involves monitoring online discussions and feedback—an essential
component of social media management.
By analyzing Twitter data, businesses can better understand their audience, track brand mentions,
monitor competitors, and identify industry trends. Traditional quantitative metrics such as the
number of mentions or retweets provide only a partial view. Sentiment analysis goes further by
determining whether public discussions about a brand, product, or topic are positive, negative, or
neutral, offering deeper qualitative insights.
Beyond corporate applications, sentiment analysis has significant implications for defense
intelligence, enabling governments and security agencies to enhance national security and strategic
decision-making. By monitoring social media discussions, defense organizations can detect
potential security threats, extremist activities, and coordinated misinformation campaigns in real
time. Sentiment analysis also plays a crucial role in public perception analysis, helping authorities
assess sentiment regarding national security policies, defense initiatives, and geopolitical events.
Additionally, it supports counterterrorism efforts by identifying patterns of online radicalization
through sentiment trends in specific digital communities.
1
Aim
The aim of this project is to develop a sentiment analysis system for analyzing Twitter data, news
articles, and web page content to extract meaningful insights into public opinion, security threats,
and emerging trends. The system will utilize natural language processing (NLP) and machine
learning techniques to classify sentiments as positive, negative, or neutral, with a specific focus on
applications in defense intelligence.
Objectives
1. Data Collection – Gather real-time and historical Twitter data using APIs for sentiment analysis,
focusing on topics relevant to public discourse and security concerns.
2. Preprocessing and Feature Extraction – Clean and preprocess textual data by removing noise,
handling missing values, and extracting relevant features for sentiment classification.
3. Sentiment Classification – Implement machine learning and deep learning models, such as Naïve
Bayes, LSTM, and BERT, to classify tweets into positive, negative, or neutral sentiments.
4. Defense Intelligence Applications – Analyze sentiment trends to detect potential security threats,
track misinformation campaigns, and assess public perception regarding defense-related topics.
5. Visualization and Reporting – Develop an interactive dashboard to present sentiment analysis
results in an intuitive and actionable format for decision-makers.
6. Performance Evaluation – Assess the accuracy and efficiency of sentiment classification models
using various evaluation metrics such as precision, recall, and F1-score.
7. Ethical Considerations – Address privacy and ethical concerns associated with social media
monitoring, ensuring compliance with data protection regulations.
This project aims to enhance real-time intelligence gathering and decision-making in both corporate
and defense sectors by leveraging sentiment analysis techniques on Twitter data.
2
CHAPTER 2: LITERATURE SURVEY
Sentiment analysis, also known as opinion mining, has been extensively studied in the fields of
natural language processing (NLP), machine learning, and social media analytics. Traditional
approaches, such as lexicon-based methods and machine learning classifiers like Naïve Bayes,
Support Vector Machines (SVM), and Decision Trees, have been widely used for sentiment
classification (Pang et al., 2002). With advancements in deep learning, models like Long Short-
Term Memory (LSTM) networks and transformer-based architectures such as BERT (Devlin et
al., 2019) have significantly improved the accuracy of sentiment analysis by capturing contextual
nuances in textual data. These methods allow for more precise sentiment classification and have
enhanced the ability to analyze large-scale social media data in real time.
Social media platforms, particularly Twitter, have become valuable sources for sentiment analysis
due to their vast amount of user-generated content. Studies by Pak and Paroubek (2010)
demonstrated the effectiveness of sentiment analysis on Twitter data using supervised learning
techniques, while Bollen et al. (2011) explored the correlation between Twitter sentiment and
market trends. Additionally, Thelwall et al. (2011) highlighted the role of sentiment analysis in
tracking public emotions during crises, proving its relevance for real-time event monitoring. Such
research underlines how sentiment analysis can help governments and organizations understand
public opinion, track misinformation, and assess the impact of major events on society.
In the domain of defense intelligence, sentiment analysis has been applied to security and
geopolitical analysis. Research by Choi et al. (2016) examined the role of sentiment analysis in
predicting conflicts and political instability by analyzing online discussions. Alowibdi et al. (2018)
demonstrated how intelligence agencies could track extremist activities and radicalization patterns
through sentiment shifts in social media posts. Additionally, Gupta et al. (2020) explored
sentiment-based disinformation detection, emphasizing how governments can combat propaganda
and fake news by analyzing sentiment trends. These studies illustrate the growing importance of
sentiment analysis in national security strategies.
Despite its advantages, sentiment analysis faces several challenges, including accurately detecting
sarcasm, irony, and fake news, which can distort sentiment classification results (Rajadesingan et
al., 2015). Multilingual sentiment analysis also remains a challenge, particularly in defense
intelligence, where monitoring global discourse requires analyzing content in multiple languages
(Pérez-Rosas et al., 2013). Future research aims to enhance real- time sentiment analysis
capabilities by integrating multimodal data, such as images and videos, to provide a more
comprehensive understanding of online discussions. Addressing ethical concerns and privacy
regulations will also be crucial in ensuring the responsible and lawful implementation of sentiment
analysis for defense applications.
3
CHAPTER 3: SYSTEM DEVELOPMENT
Natural Language Processing (NLP) is a subfield of Artificial Intelligence (AI) that focuses on
enabling machines to understand, interpret, and generate human language. It plays a crucial role
in applications like chatbots, machine translation, speech recognition, and sentiment analysis. NLP
bridges the gap between human communication and machine intelligence by converting textual or
spoken language into structured data that computers can process.
NLP is built upon Machine Learning (ML) techniques, which help systems learn patterns from
large datasets without explicit programming. Traditional ML models like Naïve Bayes, Support
Vector Machines (SVM), and Logistic Regression are commonly used for text classification and
sentiment analysis. However, with the advent of Deep Learning, more advanced models such as
Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTMs), and Transformer-
based architectures like BERT and GPT have significantly improved NLP capabilities.
Deep Learning, a subset of ML, has revolutionized NLP by enabling models to grasp context,
semantics, and syntax in text. Using multi-layered neural networks, these models process complex
language relationships. As an overarching field, AI integrates NLP with other technologies to
power applications like virtual assistants (Siri, Alexa), language translation (Google Translate),
and automated content generation.
The diagram below illustrates the relationship between AI, ML, NLP, and Deep Learning,
highlighting their interconnected roles in language processing:
4
Platform Used:
Windows 11
Windows 11 is the latest operating system from Microsoft, designed for PCs, tablets, and embedded
devices. It builds on the foundation of Windows 10 while introducing a modernized user interface,
enhanced productivity features, and improved security. Microsoft officially released Windows 11
as the successor to Windows 10 on October 5, 2021. Unlike previous major releases, Windows 11
continues Microsoft's approach of offering regular updates rather than launching an entirely new
framework.
Microsoft introduced the first version of Windows, Windows 1.0, on November 20, 1985. It was a
graphical user interface (GUI) built on top of MS-DOS, allowing users to interact with a computer
using a mouse and icons instead of text-based commands. Over the years, Windows evolved through
various versions, including Windows 95, XP, 7, 8, and 10, each bringing significant advancements
in usability, security, and performance.
Windows 11 offers a seamless upgrade path from Windows 10, allowing users to transition without
losing data or applications. It includes a redesigned Start Menu, centered taskbar icons, and
enhanced virtual desktops for better multitasking. The new OS also integrates Microsoft Teams into
the taskbar, making communication more efficient. Windows 11 introduces Snap Layouts and Snap
Groups, enabling users to organize windows more effectively, enhancing productivity across
multiple screens.
For enterprise users, Windows 11 enhances device management capabilities through Mobile Device
Management (MDM) solutions. IT administrators can secure and manage devices with tools like
Microsoft Endpoint Manager. The OS also features advanced authentication methods such as
Windows Hello, which supports biometric verification through facial recognition and fingerprint
scanning. These security enhancements ensure a more secure login experience, reducing reliance on
traditional passwords.
Windows 11 improves upon Windows 10’s security framework by incorporating features like
Virtualization-Based Security (VBS), Windows Defender Application Guard, and TPM 2.0
requirements. These measures help protect user credentials, sensitive data, and critical processes
from cyber threats. Microsoft also updated BitLocker encryption, ensuring secure data storage and
transmission between devices, cloud services, and enterprise networks.
Windows 10, released in July 2015, addressed many of the shortcomings of Windows 8,
reintroducing the familiar Start Menu and improving overall usability. Over the years, Microsoft
continuously updated Windows 10, introducing features like Cortana, the Edge browser, and
improved accessibility options. Windows 11 builds upon these foundations while refining the user
experience with a sleek, modern design and improved performance optimizations.
5
Since its launch, Windows 11 has received several updates aimed at enhancing security,
performance, and usability. Microsoft introduced features such as Android app support through the
Microsoft Store, DirectStorage for faster gaming performance, and AI-powered enhancements like
live captions. The transition from Windows 10 to Windows 11 reflects Microsoft's commitment to
continuous innovation, ensuring that users benefit from the latest technological advancements while
maintaining compatibility with previous Windows versions.
Python
Python is a high-level, interpreted, object-oriented programming language known for its simplicity
and readability. It features dynamic typing and binding, making it an excellent choice for rapid
application development. Python’s easy-to-learn syntax emphasizes code readability, reducing
development costs and effort. Its extensive standard library, along with support for modules and
packages, encourages code reuse and simplifies complex programming tasks. Since Python is open-
source, developers can freely access and modify its source code, making it widely adopted in various
domains.
One of Python’s biggest advantages is its productivity. The language’s straightforward syntax
allows programmers to write clean and concise code, speeding up the development process.
Additionally, Python's interpreted nature enables quick testing and debugging, reducing the time
spent on fixing errors. When an error occurs, the interpreter raises an exception or prints a stack
trace, helping developers identify issues efficiently. Python also provides built-in debugging tools
that allow the inspection of local and global variables, setting breakpoints, and stepping through
code execution line by line.
Python is widely used in diverse fields such as web development, data science, artificial intelligence,
automation, and cybersecurity. Frameworks like Django and Flask simplify web development, while
libraries like NumPy, Pandas, and TensorFlow make it a popular choice for data science and
machine learning. Its versatility extends to scripting, where it automates repetitive tasks, and system
administration, where it integrates seamlessly with operating system functionalities.
The growing popularity of Python is due to its strong community support, extensive documentation,
and adaptability across platforms. Whether for beginners or experienced developers, Python
provides a robust and flexible environment for writing efficient programs. Its continued evolution
and integration with emerging technologies ensure its relevance in the ever- changing landscape of
software development.
6
Libraries Used in Sentiment Analysis Project
1. NumPy (numpy)
Purpose: Efficient numerical computations, especially with large datasets.
Usage in Sentiment Analysis:
o Handling arrays and matrices of text data and numerical features.
o Storing word embeddings and processing them efficiently.
o Performing mathematical operations like vectorization in machine learning models.
2. Pandas (pandas)
Purpose: Data manipulation and analysis.
Usage in Sentiment Analysis:
o Loading datasets (CSV, Excel, JSON).
o Cleaning and preprocessing text data.
o Handling missing values, token counts, and feature engineering.
4. Scikit-learn (sklearn)
Purpose: Machine learning model training, evaluation, and feature extraction.
Usage in Sentiment Analysis:
o Vectorization: TfidfVectorizer, CountVectorizer to convert text into numerical features.
o Model Training: Logistic Regression, SVM, Naïve Bayes for classification.
o Performance Evaluation: Metrics like accuracy, precision, recall, F1-score.
6. Pickle (pickle)
Purpose: Serializing and saving Python objects (models, preprocessed data).
Usage in Sentiment Analysis:
o Saving trained models for future use (pickle.dump).
o Loading models for inference (pickle.load).
o Storing vectorizers and preprocessing pipelines to avoid reprocessing.
7
CHAPTER 4: DATA & INFORMATION VISUALIZATION
Kaggle
The Sentiment140 dataset, sourced from Kaggle, consists of 1.6 million labeled tweets and serves
as a valuable resource for sentiment analysis in natural language processing (NLP). This dataset
enables the development of machine learning models to classify tweets as positive, negative, or
neutral, providing insights into public sentiment trends. By leveraging advanced techniques such as
logistic regression, support vector machines, or deep learning models like LSTMs and transformers,
Sentiment140 facilitates the extraction of meaningful patterns from social media data, making it
instrumental in sentiment analysis applications across various domains.
Streamlit
Streamlit is an open-source Python library that simplifies the creation of interactive web applications
for machine learning and data science projects. It is particularly useful in sentiment analysis projects,
allowing users to build user-friendly interfaces for analyzing and visualizing sentiment results
without requiring extensive web development knowledge.
In a sentiment analysis project, Streamlit can be used to develop a dashboard where users can input
text (tweets, reviews, or custom messages) and receive real-time sentiment predictions. The library
provides widgets such as text input fields, buttons, and sliders, making it easy to interact with the
sentiment analysis model. Additionally, Streamlit supports displaying data visualizations using
libraries like Matplotlib, Seaborn, and Plotly, allowing users to explore sentiment distributions,
word clouds, and trends effectively.
A typical sentiment analysis application built with Streamlit follows these steps:
1. User Input: The user enters a tweet or text into a text box.
2. Preprocessing: The text is cleaned and processed using NLP techniques such as tokenization
and stopword removal.
3. Model Prediction: The pre-trained sentiment analysis model (e.g., logistic regression, SVM, or
deep learning models like LSTMs) classifies the text as positive, negative, or neutral.
4. Visualization: The results are displayed with sentiment scores, bar charts, or pie charts to help
users understand the sentiment trends.
8
Code:
import streamlit as st
import pickle
import re
from sklearn.feature_extraction.text import TfidfVectorizer
from nltk.corpus import stopwords
import nltk
from ntscraper import Nitter
# Predict sentiment
sentiment = model.predict(text)
return "Negative" if sentiment == 0 else "Positive"
9
# Function to create a colored card
def create_card(tweet_text, sentiment):
color = "green" if sentiment == "Positive" else "red"
card_html = f"""
<div style="background-color: {color}; padding: 10px; border-radius: 5px; margin: 10px 0;">
<h5 style="color: white;">{sentiment} Sentiment</h5>
<p style="color: white;">{tweet_text}</p>
</div>
"""
return card_html
if __name__ == "__main__":
main()
10
CHAPTER 5: SNAPSHORT
11
User Name: @elonmusk
12
Source: The Hindu
13
CHAPTER 6: CONCLUSION
Sentiment analysis plays a crucial role in understanding public opinion by analyzing textual data
from various sources, such as social media, customer reviews, and online forums. In this project, we
leveraged the Sentiment140 dataset, which consists of 1.6 million labeled tweets, to train a machine
learning model capable of classifying sentiments as positive, negative, or neutral. By employing
natural language processing (NLP) techniques and machine learning algorithms, we were able to
extract meaningful insights from social media conversations, helping businesses and researchers
gauge public sentiment on different topics.
Throughout this project, we implemented several essential steps, including data preprocessing,
feature extraction, model training, and performance evaluation. Techniques such as tokenization,
stopword removal, and stemming were applied to clean the textual data, ensuring that the model
could learn effectively. We experimented with various machine learning models, including logistic
regression, support vector machines (SVM), and deep learning approaches like LSTMs and
transformers, to achieve high accuracy in sentiment classification. The performance of these models
was evaluated using metrics such as accuracy, precision, recall, and F1-score, ensuring reliable
sentiment predictions.
To enhance accessibility and usability, we integrated our sentiment analysis model with Streamlit,
a Python-based web application framework. This allowed users to interact with the model through
a simple and intuitive interface, enabling real-time sentiment predictions on user-inputted text.
Visualizations, including sentiment distribution charts and word clouds, further helped in
understanding sentiment trends effectively.
In conclusion, this project demonstrates the effectiveness of NLP and machine learning in sentiment
analysis, offering valuable insights into public opinion. With continuous improvements, such as
incorporating more diverse datasets and fine-tuning deep learning models, sentiment analysis can
become an even more powerful tool for social media monitoring, brand management, and decision-
making in various industries.
14
REFERENCES
1. https://www.geeksforgeeks.org/what-is-sentiment-analysis/
2. https://www.geeksforgeeks.org/twitter-sentiment-analysis-using-python/
3. https://www.analyticsvidhya.com/blog/2022/07/sentiment-analysis-using-python/
4. https://www.kaggle.com/datasets/kazanova/sentiment140
5. https://www.youtube.com/watch?v=9ZUEhIUQ_FY&t=151s
6. https://chatgpt.com/
15