Fyp Mid Defense Report
Fyp Mid Defense Report
A Project Report On
“Janta ko Aawaj - A C2G2C-Based E-Governance Complaint
System”
7th semester Project Proposal Report submitted for the partial fulfillment
of the requirement for the degree of Bachelor of Science in Computer
Science and Information Technology.
Submitted By:
Bipasna Dulal
Submitted To:
National College of Computer Studies
Department of Computer Science
Affiliated to Tribhuvan University
Submission Date:
June 27, 2025
SUPERVISOR’S RECOMMENDATION
………………………………
Supervisor
i
CERTIFICATE OF APPROVAL
This is to certify that this report has been read and recommended to the Department of
Computer Science and Information Technology for acceptance of the report entitled
submitted by Bipasna Dulal in partial fulfillment of the requirements for the degree of
Bachelor of Science in Computer Science and Information Technology (BSc.CSIT),
Institute of Science and Technology, Tribhuvan University.
In our opinion, this report is satisfactory in scope and quality as a project for the required
degree and is recommended for further evaluation.
……………………………………
Project Supervisor
…………………………………..
Program Director
ii
ACKNOWLEDGEMENT
I also extend my appreciation to National College of Computer Studies and all the faculty
members for providing the necessary resources, knowledge, and an inspiring academic
environment that made the completion of this project possible.
A special thanks goes to my friends and family for their constant motivation and assistance
during the development phase. Their unwavering support helped me overcome challenges
and stay dedicated to this project.
Lastly, I acknowledge the contributions of the communities and the developers behind the
tools and technologies that facilitated the development of this system.
Sincerely,
Bipasna Dulal
iii
ABSTRACT
This project presents the development of “Janta ko Aawaj” (Voice of the People), an
interactive e-governance platform based on the Citizen-to-Government-to-Citizen
(C2G2C) model. The platform enables citizens to post genuine complaints as public polls
and allows other users to vote to agree or disagree, fostering collective validation of issues.
To ensure only valid complaints are published, spam detection and filtering algorithms,
including Multinomial Naive Bayes and Logistic Regression, are employed. When
complaints reach specific public agreement thresholds (25%, 50%, and 75%), the system
automatically alerts relevant government authorities and notifies media outlets to amplify
public attention. Complaints are tracked and ranked based on urgency and public support
to enhance transparency and accountability.
Despite existing digital grievance redressal platforms in Nepal, challenges such as weak
government response, lack of follow-up, and limited transparency persist. This project
addresses these gaps by providing a structured, automated, and transparent grievance
redressal system that encourages citizen engagement and improves government
responsiveness. The Waterfall Model has been adopted for development due to its linear,
phase-based approach, which suits the clearly defined requirements and solo development
context.
iv
TABLE OF CONTENTS
SUPERVISOR’S RECOMMENDATION ........................................................................ i
CERTIFICATE OF APPROVAL .....................................................................................ii
ACKNOWLEDGEMENT ............................................................................................... iii
ABSTRACT ....................................................................................................................... iv
CHAPTER 1: INTRODUCTION ..................................................................................... 1
1.1. Introduction ........................................................................................................... 1
1.2. Problem Statement ................................................................................................ 2
1.3. Objectives .............................................................................................................. 2
1.4. Scope and Limitation ............................................................................................ 3
1.5. Development Methodology ................................................................................... 4
1.6. Report Organization .............................................................................................. 5
CHAPTER 2: BACKGROUND STUDY AND LITERATURE REVIEW ................... 6
2.1. Background Study ..................................................................................................... 6
2.2. Literature Review...................................................................................................... 7
CHAPTER 3: SYSTEM ANALYSIS.............................................................................. 10
3.1. System Analysis ...................................................................................................... 10
3.1.1. Requirement Analysis ...................................................................................................... 10
3.1.2. Feasibility Analysis ....................................................................................................... 15
3.1.3. Analysis.......................................................................................................................... 17
CHAPTER 4: SYSTEM DESIGN .................................................................................. 23
4.1. Design.................................................................................................................. 23
4.2. Algorithm Details ................................................................................................ 29
CHAPTER 5: IMPLEMENTATION ............................................................................. 35
5.1. Implementation.................................................................................................... 35
5.1.1. Tools Used ..................................................................................................................... 35
5.1.2 Implementation Details of Modules ................................................................................. 36
Machine Learning Module ........................................................................................................ 36
CHAPTER 6: CONCLUSION AND RECOMMENDATION ..................................... 43
6.1. Conclusion .............................................................................................................. 43
6.2. Recommendation .................................................................................................... 43
References ......................................................................................................................... 45
APPENDICES .................................................................................................................. 46
LIST OF FIGURES
Figure 1 Waterfall Model .................................................................................................. 4
Figure 2 Use Case Diagram for Users ............................................................................ 11
Figure 3 Use Case Diagram for Concerned Authority ................................................. 13
Figure 4 Gantt Chart - Janta ko Awaj Project (May 13 - June 25) ............................. 16
Figure 5 Class Diagram ................................................................................................... 17
Figure 6 Complaint State Diagram ................................................................................ 18
Figure 7 Submit Complaint Sequence Diagram ........................................................... 19
Figure 8 Voting on Complaint Sequence Diagram........................................................ 20
Figure 9 Activity Diagram - Complaint Lifecycle ......................................................... 21
Figure 10 Flowchart of System's Workflow .................................................................. 23
Figure 11 ML Implementation for Complaint Classification....................................... 26
Figure 12 Component Diagram for Janta ko Awaj ....................................................... 26
Figure 13 Deployment Diagram for Janta ko Awaj ...................................................... 27
Figure 14 Naïve Bayes Model Architecture ................................................................... 30
Figure 15 Logistic Regression and Sigmoid Function .................................................. 34
Figure 16 Handling Missing Values ................................................................................ 37
Figure 17 Lowercasing text ............................................................................................. 37
Figure 18 Removing punctuation and numbers using regEx ...................................... 38
Figure 19 Tokenization using nltk.word_tokenize() ..................................................... 38
Figure 20 Stop words removal ........................................................................................ 38
Figure 21 Feature Extraction usin TF-IDF Vectorizer ................................................. 39
Figure 22 Model training using Multinomial Naive Bayes .......................................... 39
Figure 23 Model Training used Linear SVM ................................................................ 40
Figure 24 Logistic Regression model training ............................................................... 40
Figure 25 Evaluating model ............................................................................................ 41
Figure 26 Ensemble learning for evaluating the performance. ................................... 41
Figure 27 Landing Page................................................................................................... 46
Figure 28 Key Features.................................................................................................... 46
Figure 29 Top Few Complaints Featured Along with Complaints Summary ............ 47
Figure 30 About Us Section ............................................................................................. 47
Figure 31 Login Page ....................................................................................................... 48
Figure 32 Register Page ................................................................................................... 48
Figure 33 Submit Complaint Form ................................................................................ 49
CHAPTER 1: INTRODUCTION
1.1. Introduction
E-Governance refers to the use of information and communication technology (ICT) to
enhance the access and delivery of government services to benefit citizens, businesses, and
government employees. The World Bank defines e-governance as a way to improve
transparency, efficiency, and citizen participation in governance processes by leveraging
digital tools and platforms. [1] The UN E-Government Survey 2022 shows that over 80%
of countries now offer key public services online, using digital platforms to promote
accessibility, responsiveness, and inclusive citizen engagement—especially during crises
and in underserved areas. [2]
In Nepal, the government of Nepal has achieved great progress in e-governance through
programs like the National e-governance Master Plan (NeGMP), online passport, and
licensing services, and platform likes Nagrik App, and Hello Sarkar. Still, there are also
issues with digital infrastructure, implementation at the local level, and public awareness,
digital divide particularly in rural areas, political instability. [3]
1
• When a complaint receives 25%, 50%, and 75%+ agreement, the system
automatically:
1.3. Objectives
The objectives of this project are as follows:
2
1.4. Scope and Limitation
1.4.1. Scope
• Development of an interactive citizen-to-government-to-citizen (C2G2C) e-
governance platform enabling citizens to post genuine complaints as public polls.
• Implementation of voting mechanisms allowing users to agree or disagree on
complaints to prioritize public issues.
• Integration of spam detection and filtering algorithms (e.g., Naive Bayes, Logistic
Regression) to ensure only valid complaints are published.
• Automated alert system that notifies relevant government authorities and media
based on complaint agreement thresholds (25%, 50%, 75%+).
• Tracking and ranking complaints based on urgency and public support to improve
transparency and accountability.
1.4.2. Limitations
• Government Responsiveness: The system's ultimate success depends on the
willingness and capacity of government bodies to respond to and act upon
prioritized complaints, which can be influenced by bureaucratic and political
factors.
• Accessibility: The system may face limitations in fully accommodating Nepal's
diverse linguistic landscape and ensuring accessibility for all citizens, including
those with disabilities.
• Integration with Existing Systems: The platform does not currently integrate with
existing government databases or legacy grievance redressal systems, potentially
limiting seamless information flow and holistic problem-solving.
• Scope as an Academic Project: As a single-person academic project, its scope is
focused on core functionalities, meaning it may not include advanced features,
extensive scalability, or complex enterprise-level integrations that a fully deployed
system might require.
3
1.5. Development Methodology
For the development of the “Janta ko Aawaj” e-governance platform, the Waterfall Model
has been adopted due to its structured and linear approach, which is well-suited for projects
with clearly defined requirements and a step-by-step development process.
• As a solo developer, a structured, phase-based plan helps maintain focus and stay
on track.
• The project requirements are well defined in advance, making a linear approach
feasible.
• It allows for clear, documented, and systematic progress, facilitating evaluation and
feedback.
• The model aligns well with academic requirements that emphasize phased
documentation and delivery.
4
1.6. Report Organization
This project report is organized into the following chapters:
Chapter 1: Introduction
This chapter provides an overview of the “Janta ko Aawaj” platform, including the
problem statement, project objectives, scope and limitations, and the development
methodology adopted. It sets the foundation and context for the entire project.
This chapter details the analysis of the proposed system, including requirement analysis
(functional and non-functional), feasibility analysis (technical, operational, economic, and
schedule), and system modeling using appropriate diagrams.
This chapter explains the design of the system, including database design, user interface
considerations, and detailed descriptions of the machine learning algorithms (such as Naive
Bayes and Logistic Regression) used for complaint filtering. It also includes UML diagrams
illustrating system components and workflows.
Chapter 5: Implementation
This chapter describes the tools and technologies used in the project development,
implementation details of various modules.
This final chapter summarizes the project outcomes and reflects on the achievements. It
also provides recommendations for future enhancements and potential directions for further
development of the platform.
5
CHAPTER 2: BACKGROUND STUDY AND LITERATURE
REVIEW
In recent years, e-governance has transformed how citizens interact with government
institutions, offering new channels for communication and service delivery. In Nepal, the
Hello Sarkar system represents a significant step toward digital grievance redressal by
allowing users to report complaints directly to government authorities through a form-based
interface. The system assigns ticket numbers for tracking grievances and employs supervised
machine learning techniques, such as Naïve Bayes and Support Vector Machines (SVM), to
classify complaints. [5] [6]
Despite these advancements, Hello Sarkar faces criticism for its limited transparency and
responsiveness. Users often report inadequate feedback and lack of meaningful updates on
complaint status, which can lead to frustration and a perception that their grievances are
unheard. Moreover, the platform lacks interactive or democratic features, such as user
voting, that would enable collective prioritization of issues based on public consensus.
To ensure the quality and authenticity of complaints, the system integrates machine learning-
based filtering models. Algorithms such as Logistic Regression, Random Forest, SVM, and
Naïve Bayes are considered, with selection based on training data performance and accuracy.
Validated complaints are tracked and ranked according to urgency and public support, with
automated alerts sent to relevant government bodies and media outlets as complaints gain
traction.
This interactive and automated grievance redressal approach aims to enhance transparency,
accountability, and citizen engagement in Nepal’s e-governance landscape, addressing
critical gaps identified in existing mechanisms.
6
2.2. Literature Review
The development of Grievance Redress Mechanisms (GRMs), which enable citizens to
file grievances and request a response from public bodies, is a crucial area of e-governance.
This review extracts lessons from well-known GRMs, including a model Grievance Redress
Mechanism framework, Nepal government’s Hello Sarkar, Kenya's Majivoice, and India's
CPGRAMS, their approaches, impact, and challenges in addressing citizen grievances.
According to Pande and Hossain's (2022) literature assessment, GRMs are formal
mechanisms that provide individuals with a forum to express their issues, particularly about
governance and service delivery shortcomings. They are critical in the Global South due to
their potential to enhance service delivery, reduce corruption, and improve accountability,
especially for marginalized groups. GRMs are widespread in international aid programs
(e.g., 69% of World Bank projects by 2020) and national policies, driven by motives like
legal mandates, governance reforms, or legitimacy enhancement. Research on GRMs has
grown over the past 20 years, driven by new public management and accountability trends.
They emphasize timely resolution, regulatory oversight, and feedback loops to enhance
service quality. However, many GRMs fail due to limited awareness, weak implementation,
and lack of political will. [4]
Hello Sarkar, launched under Nepal’s Good Governance Act, 2007, serves as a
centralized grievance redress mechanism operated by the Office of the Prime Minister
and Council of Ministers (OPMCM). Designed to address citizen complaints across all
government services, it offers multiple access channels including a toll-free hotline, email,
SMS, social media platforms, and in-person submissions—making it widely accessible and
inclusive. The platform also supports anonymous complaints and allows complaints to be
lodged on behalf of others, increasing its reach among vulnerable groups (Government of
Nepal, 2021).Hello Sarkar categorizes grievances based on urgency ranging from
immediate to general and sets strict resolution timelines from the same day up to 15 days.
Accountability is built into the system through the assignment of dedicated officers in each
agency and the requirement of monthly reporting. However, the system lacks clear
resolution metrics, such as closure rates or satisfaction tracking, which limits transparency
in performance measurement. [6]
7
Majivoice is a system that started in Kenya in 2013 to help improve water and sanitation
services. It was created by the World Bank and WASREB, a Kenyan water regulator. The
goal was to help citizens easily report problems like broken pipes or billing issues, and to
make sure water service providers and regulators can respond quickly.
People can send their complaints using SMS, USSD, website, or a phone call, and the
system works even with slow internet. In Nairobi, Majivoice was very successful:
It also helps staff track their work better and avoid delays, like in billing. The system is
supported by Kenya’s 2002 Water Act, and Water Action Groups help make sure services
are accountable to the public. [7]
• And it depends a lot on people having mobile phones (which was 80% in 2014), So,
it may be hard to use it in other areas or places.
It works 24/7 and connects 91 Central Ministries and 36 States and Union Territories.
People can use it through the website, mobile apps, or the UMANG app. The system also
uses AI and machine learning to:
8
• And send them directly to the correct government office.
In June 2023, CPGRAMS solved over 62,000 complaints. If someone is not happy with
the response, they can appeal easily, which adds to its fairness. It was even recognized in
2024 by the Commonwealth Secretariat as a strong example of a good complaint-handling
system.
However, it has a few challenges, it mostly works in English and Hindi, which may not
help people who speak other languages. It doesn’t accept all types of complaints, like those
already in court.
9
CHAPTER 3: SYSTEM ANALYSIS
These are the core features and operations that the system must perform:
1. User Registration & Login: Users must be able to register and log in securely to
submit complaints and vote.
2. Complaint Submission: Users shall submit complaints through a structured form.
10
they submitted or voted on.
• Submit Complaint
11
1. User logs in.
2. User navigates to "Submit
Complaint".
3. User enters complaint details
(title, description, location,
images/videos).
• Vote on Complaint
1. User logs in.
2. User browses published
complaints.
3. User selects a complaint.
4. User votes agree/disagree.
5. System records vote.
6. System checks if vote
threshold is reached.
7. If threshold met, system sends
alert to authority/media.
• Receive Notification
1. System monitors complaint
status.
2. When an update occurs
(e.g., status change,
authority response), system
sends notification to user.
3. User receives and views
notification.
• Status of Complaints
1. User requests status.
2. System retrieves and
displays status.
12
Figure 3 Use Case Diagram for Concerned Authority
13
5. Authority selects complaint for
further action.
14
3.1.1. ii. Non-Functional Requirements
2. Reliability & Availability: The platform should maintain high uptime and
automatically recover from small system failures.
3. Maintainability: Codebase should be modular and well-documented to support
future updates and scalability.
4. Transparency: The system should openly display complaint rankings, vote counts,
and progress updates to promote trust.
5. Security: The system should protect from common web attacks.
The technical feasibility assesses whether the proposed technology stack and infrastructure
can support the development and deployment of the system effectively.
Frontend: Next.js, a modern React framework, supports server-side rendering and routing,
enabling the creation of fast, SEO-friendly, and responsive user interfaces suitable for
citizen interaction.
Backend: Django (Python) offers a robust backend framework with built-in admin support,
strong security features, and seamless integration with machine learning components.
Database: The system utilizes SQLite3, the default database provided by Django, which is
lightweight and well-suited for academic projects and small to medium-scale applications.
SQLite3 efficiently manages structured complaint data and voting records without
requiring complex database administration.
15
Deployment: The platform can be deployed on cloud services such as Vercel for the
frontend, Heroku or Render for the backend, and managed SQLite databases or file-based
storage for persistence.
2. Operational Feasibility
The system is designed with user-friendliness and accessibility in mind to encourage broad
citizen participation.
3. Economic Feasibility
The project leverages open-source tools and frameworks, eliminating licensing costs.
No paid APIs or proprietary software are required, making it economically feasible for
student-level development and deployment.
4. Schedule Feasibility
Project timelines and milestones are planned realistically and monitored using tools such
as Gantt charts to ensure timely completion of phases.
16
3.1.3. Analysis
1. Object modelling using Class and Object Diagrams
17
2. Dynamic modelling using State and Sequence Diagrams
• State Diagram
The Complaint State Diagram illustrates the life cycle of a complaint submitted by a user
on the Janta ko Aawaj platform. It begins in the Draft state, where a user fills out the
complaint form. Once submitted, it moves to the Submitted state. The system then reviews
the complaint using a spam detection model.
If the complaint is found genuine, it transitions to the Accepted state; if not, it's Rejected.
Accepted complaints progress to the Notified state as they gather public support (based on
vote thresholds). Once an authority responds, the complaint enters the Responded state,
followed by either Ongoing (if still in progress) or Resolved. Finally, resolved complaints
are Closed after verification.
18
This state diagram ensures structured tracking, accountability, and resolution of public
complaints.
• Sequence Diagram
This sequence diagram describes the flow of events when a user submits a complaint on
the Janta ko Aawaj platform.
• The process begins when the user fills and submits the complaint form.
• The data is passed to the system, which sends it to the integrated spam detection
ML model to verify if the complaint is genuine.
• Based on the result:
o If genuine, the system stores the complaint in the database and sends a
notification to the relevant authority, also confirming submission to the
user.
o If identified as spam, the system immediately notifies the user and does not
store the complaint.
This sequence ensures that only valid and meaningful complaints enter the system,
improving data quality and reducing misuse.
19
Figure 8 Voting on Complaint Sequence Diagram
This sequence diagram represents the interaction between a user and the system when a
user votes on a complaint in the Janta ko Aawaj platform. The process begins when the
user clicks either the "Agree" or "Disagree" button on a complaint.
The complaint page (UI) sends this vote to the system, which processes and updates the
vote count in the database. After updating, the system checks if the vote count has reached
specific thresholds (e.g., 25%, 50%, or 75%). If a threshold is reached, an alert notification
is automatically sent to the concerned authority.
Finally, the system sends updated vote percentages back to the UI for real-time display,
ensuring transparency and public engagement.
20
3. Process Modelling using Activity Diagram
This activity diagram illustrates the complete flow of how a complaint is handled in the
Janta ko Aawaj system.
The process starts when a user submits a complaint. The system first verifies whether the
complaint is genuine using a spam detection mechanism. If valid, it stores the complaint in
the database and notifies the concerned authority. The complaint is then made public for
voting.
21
As users vote, the system tracks the vote percentages. If a predefined threshold is reached
(e.g., 25%, 50%, 75%), alerts are sent to the authority and relevant media. Once the
authority responds, the complaint status is updated. It is then either marked as Resolved,
Ongoing, or eventually Closed after verification.
This structured activity ensures that the complaint lifecycle is handled in a transparent,
efficient, and citizen-centric manner.
22
CHAPTER 4: SYSTEM DESIGN
4.1. Design
The system design of Janta ko Aawaj follows the object-oriented approach to define the
structure and behavior of the application. It includes the refinement of key UML diagrams
such as Class, State, Sequence, and Activity diagrams, based on the system analysis. The
architecture is modular, comprising core components like the Frontend Interface,
Backend API, Spam Classifier (ML Module), Database, and Notification Services. The
Component Diagram outlines these modules and their interactions, while the Deployment
Diagram represents how these modules are distributed across client, server, and external
services. This design ensures scalability, role-based access (User, Authority, Admin), and
seamless communication between the system parts for efficient complaint management and
tracking.
23
The system is a comprehensive web-based platform for citizen grievance redressal,
leveraging machine learning and public engagement to prioritize and escalate issues
effectively. Below is a detailed breakdown of its components and workflows.
Complaint Submission
Citizens submit complaints via a web portal, initiating the redressal process. This interface
collects essential details (e.g., issue type, location, description) and serves as the entry point
for all subsequent operations.
Alerts activate only if the complaint status is neither Resolved, Rejected, Invalid, nor
Duplicate. This prevents redundant notifications for closed cases.
24
Complaint Ranking
Admin Dashboard
Notifications leverage Django with Celery for task queuing, paired with SMTP or third-
party APIs (SendGrid, Twilio, Mailgun). This ensures reliable, scalable delivery of alerts
and updates across email/SMS channels.
The system integrates citizen participation, automated filtering, and tiered escalation to
transform grievances into actionable outcomes while minimizing administrative overhead.
25
Figure 11 ML Implementation for Complaint Classification
This component diagram represents the main functional parts of the Janta ko Aawaj
system and how they interact with each other. The system is divided into several logical
components:
26
• The Frontend includes user-facing modules like the interface, complaint
submission, voting system, and complaint tracking.
• The Backend API handles key operations such as user authentication, complaint
management, voting logic, sending notifications, and the admin dashboard.
• A dedicated Machine Learning Module (Spam Classifier) is used to detect and
filter fake or irrelevant complaints.
• The Database stores all essential data including users, complaints, and votes.
• External Services like Email and SMS Gateways are used to send alerts to
concerned authorities or users based on system actions.
Each component is modular and interacts with others to ensure a smooth, reliable, and
responsive complaint management platform.
The deployment diagram represents the structural layout of the system and how various
software components are distributed across multiple servers. The client browser hosts the
React frontend, which interacts with users and sends requests to the web server. The web
server, hosted on platforms like Vercel or using Node.js, runs a Next.js application that acts
as the bridge between the frontend and backend services. The core backend services reside
on the application server, which includes the Backend API responsible for processing
requests, managing data, and executing business logic. Additionally, the backend integrates
a Spam Classifier to filter unwanted or malicious content. For data storage, a separate
27
database server is used, which may run either PostgreSQL or MySQL. Furthermore, the
system includes a dedicated notification server that handles communication through email
and SMS, using an Email Service and SMS Gateway respectively. The entire setup ensures
clear separation of concerns, scalability, and maintainability of the system.
28
4.2. Algorithm Details
1.1 Naïve Bayes
The Naive Bayes Classifier is a probabilistic machine learning algorithm based on Bayes'
Theorem. It assumes independence between features, making it a "naive" approach. It is
particularly well-suited for text classification tasks such as sentiment analysis due to its
simplicity, efficiency, and strong performance in handling high-dimensional data like text.
Naive Bayes assumes that the features (words in a text document) are conditionally
independent given the class label. While this assumption may not hold in real-world data,
it simplifies computations and works remarkably well in practice for text-related tasks. [8]
Multinomial Naive Bayes is a probabilistic machine learning algorithm widely used for text
classification tasks such as spam detection, sentiment analysis, and document
categorization. It belongs to the Naive Bayes family, which applies Bayes’ theorem with
the “naive” assumption that features (in this case, words or tokens) are conditionally
independent given the class label. [9]
The Multinomial variant is especially suited for discrete features such as word counts or
term frequencies, making it an ideal choice for text classification where input data is
represented as counts or frequencies of words.
How It Works
Where:
29
The "naive" assumption assumes that all features are conditionally independent given the
class, allowing the likelihood to be decomposed as:
Parameter Estimation
• Prior P (𝐶𝑘 ): Estimated as the relative frequency of class 𝐶𝑘 in the training dataset.
• Likelihood (𝑥𝑖 ∣𝐶𝑘 ): Estimated as the relative frequency of word iii in all documents
belonging to class 𝐶𝑘 .
To avoid zero probabilities for words not seen in the training samples of a class, Laplace
smoothing (also called additive smoothing) is applied. The smoothed likelihood is:
Where:
30
Why Multinomial Naive Bayes?
Support Vector Machine (SVM) is a supervised machine learning algorithm widely used
for classification tasks, including text classification. In the context of complaint
classification, SVM is particularly effective because it handles high-dimensional feature
spaces, such as those created by TF-IDF or bag-of-words representations of text data, and
provides robust and accurate predictions. [10]
The main objective of the SVM algorithm is to find the optimal hyperplane that separates
different classes in an N-dimensional feature space. In this project, the classes are genuine
complaints and not genuine complaints, and the features are extracted from complaint
texts.
SVM works by maximizing the margin, the distance between the closest data points of the
classes, known as support vectors, to achieve better generalization on unseen data.
In the case of Linear SVM, the data is assumed to be linearly separable, meaning that a
straight line (in two dimensions) or a flat hyperplane (in higher dimensions) can separate
the two classes without error. The algorithm finds the hyperplane that maximizes the
margin between the two classes without applying any kernel functions.
w⋅x+b=0
where:
31
• b is the bias term shifting the hyperplane.
The classifier predicts the class of a new complaint based on which side of the hyperplane
its feature vector lies.
f(x)=sign(w⋅x+b)
Logistic Regression is a widely used supervised machine learning algorithm for binary
classification problems. Unlike its name suggests, it is not used for regression but for
predicting the probability that a given input belongs to a particular class. In the context of
complaint classification, Logistic Regression helps determine the likelihood that a
complaint is genuine or not genuine based on textual features.
Logistic Regression models the relationship between the input features (such as TF-IDF
scores of complaint words) and the probability of the complaint belonging to a class using
the logistic function (also known as the sigmoid function). This function maps any real-
valued number into the range of 0 to 1, which can be interpreted as a probability.
32
• x as the input feature vector (representing the complaint),
• b as the bias term.
The output σ(z) represents the probability that the input x belongs to the positive class (e.g.,
a genuine complaint). If the probability is greater than a certain threshold (commonly 0.5),
the input is classified as genuine; otherwise, it is classified as not genuine.
The Logistic Regression algorithm finds the optimal values of w and b by maximizing the
likelihood of the training data or equivalently minimizing the log-loss (also called cross-
entropy loss), which measures the error between the predicted probabilities and actual class
labels.
• Suitable for binary classification tasks like genuine vs. not genuine complaints.
• Outputs probabilistic predictions, giving insight into confidence levels.
• Simple, interpretable model helping to understand feature impact.
• Efficient to train and predict, even on large, high-dimensional text data.
• Performs well with linearly separable data in feature space.
• Less prone to overfitting with proper regularization.
• Serves as a strong baseline model for comparison with other classifiers.
33
Figure 15 Logistic Regression and Sigmoid Function
34
CHAPTER 5: IMPLEMENTATION
5.1. Implementation
The implementation of the “Janta ko Aawaj” platform was carried out following the
Waterfall Model, ensuring a systematic and phase-wise development process. The system
is designed to allow citizens to submit complaints, which are then filtered using machine
learning algorithms such as Naive Bayes and Logistic Regression to ensure only valid
grievances are published. Valid complaints are displayed as public polls, enabling users to
vote and collectively validate issues. As complaints reach certain agreement thresholds
(25%, 50%, and 75%), the system automatically sends alerts to relevant authorities and
notifies media outlets to maximize public attention.
1. Frontend Technologies
• Next.js: A React framework used for building the frontend with support for server-
side rendering and SEO optimization.
• Tailwind CSS: A utility-first CSS framework used for styling the frontend in a
responsive and modern way.
• Axios: For handling HTTP requests between the frontend and backend.
2. Backend Technologies
35
3. Machine Learning
• SQLite3: The default lightweight database used during development and suitable
for academic-scale deployment.
5. Deployment
6. Development Tools
• Visual Studio Code (VS Code): Code editor used for both frontend and backend
development.
• Jupyter Notebook: Primary environment for machine learning experimentation.
• Draw.io: Tools used for drawing UML diagrams like use case, sequence, and
component diagrams.
The Machine Learning (ML) module in the “Janta ko Aawaj” system is responsible for
classifying whether a complaint is genuine or not genuine (spam/irrelevant) before it is
published to the platform. This ensures quality control and reduces the chances of spam
complaints disrupting the platform’s transparency and credibility.
36
Objective
Development Environment
• A dataset of labeled complaints was created manually with two labels: genuine and
not genuine.
• Preprocessing steps included:
o Handling missing values
o Lowercasing text
37
o Removing punctuation and numbers using regEx
o Stop word removal (nltk.corpus.stopwords and custom defining stop words for
romanized Nepali and Devnagiri)
38
2. Feature Extraction
In order to improve the accuracy and robustness of the spam detection system, three
different supervised machine learning models were trained and evaluated [11]:
39
• Linear SVM was used to separate complaints using a maximum-margin
hyperplane.
4. Model Evaluation
• Accuracy
• Precision
• Recall
• F1-score
40
• Confusion matrix
How It Works
• For each test complaint, predictions from Naive Bayes, Logistic Regression, and
SVM were collected.
• The final class label was determined based on majority vote.
• This approach helped combine the strengths of all three models and reduced
individual model bias.
41
Ensemble Learning
The ensemble model showed higher consistency and better generalization, especially in
borderline cases where individual models disagreed.
42
CHAPTER 6: CONCLUSION AND RECOMMENDATION
6.1. Conclusion
Machine learning models such as Logistic Regression, Multinomial Naive Bayes, and
Support Vector Machine (SVM) were trained and compared to filter out irrelevant or
spam complaints. An ensemble model using majority voting was implemented, which
improved classification accuracy and decision consistency. This ensures that only genuine
complaints are published and prioritized, enhancing the quality and reliability of the
system.
Through its C2G2C model, the platform not only empowers citizens to raise concerns but
also promotes collective validation and pressure-based escalation to authorities and media.
The use of threshold-based alerts ensures that highly supported complaints receive timely
attention. The system was implemented using Django for the backend, Next.js for the
frontend, and deployed using platforms like Vercel and Render—making it fully functional
and testable in real-world scenarios.
Overall, this project has shown that with the right combination of technology and citizen
engagement, e-governance can be made more participatory, transparent, and impactful.
6.2. Recommendation
While the project achieves its core goals as an academic prototype, the following
recommendations are made for future enhancement and real-world deployment:
43
2. Feedback and Rating Mechanism
After a complaint is resolved, allow users to rate the response quality and
time taken, adding an extra layer of accountability.
3. Enhanced Media Upload Features
Extend the media upload functionality to support multiple images, videos,
and documents for richer and more credible complaint submissions.
4. Accessibility Features
Add options like voice-to-text, screen reader support, and simplified UI for
users with disabilities.
5. Support for Multilingual Submissions
Implement multilingual support so that users can submit complaints in
their native languages, ensuring inclusivity across Nepal’s diverse
linguistic communities.
44
References
[1] W. Bank, "Framework for e-governance in UNDP," World Bank, Berlin Germany,
2016.
[7] "MajiVoice: A New Accountability Tool to Improve Public Services," Water and
Sanitation Program (WSP), Kenya, 2015.
45
APPENDICES
46
Figure 29 Top Few Complaints Featured Along with Complaints Summary
47
Figure 31 Login Page
48
Figure 33 Submit Complaint Form
49