0% found this document useful (0 votes)
28 views

Damage Assessment Tweet

This document describes a project to identify damage assessment tweets using textual features. The project was completed by three students - Afifa Arif, Muhammad Omer Shahid, and Wajih Zain - under the supervision of Dr. M Shahid Iqbal Malik at Capital University of Science and Technology, Islamabad. The project involved developing machine learning models to classify tweets related to different disasters based on textual features. The document outlines the project introduction, requirements, system design including flowcharts, architecture diagram, and user interface design.

Uploaded by

ASIM ZUBAIR 111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Damage Assessment Tweet

This document describes a project to identify damage assessment tweets using textual features. The project was completed by three students - Afifa Arif, Muhammad Omer Shahid, and Wajih Zain - under the supervision of Dr. M Shahid Iqbal Malik at Capital University of Science and Technology, Islamabad. The project involved developing machine learning models to classify tweets related to different disasters based on textual features. The document outlines the project introduction, requirements, system design including flowcharts, architecture diagram, and user interface design.

Uploaded by

ASIM ZUBAIR 111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 95

Identification of Damage Assessment Tweets

Using Textual Features

Afifa Arif BSE183101


Muhammad Omer Shahid BSE183117
Wajih Zain BSE183142

Fall-2021
Supervised By
Dr. M Shahid Iqbal Malik

Department of Computer Science


Capital University of Science & Technology, Islamabad

1
PROJECT REPORT

NUMBER OF
Version V 1.0 MEMBERS 3

Identification of damage assessment tweets using textual


features
TITLE

SUPERVISOR NAME Dr. Shahid Iqbal Malik

MEMBER NAME REG. NO. EMAIL ADDRESS

Afifa Arif BSE183101 [email protected]


Muhammad Omer Shahid BSE183117 [email protected]

Wajih Zain BSE183142 [email protected]

MEMBER’S SIGNATURES

Supervisor’s Signature

Capital University of Science and Technology, Islamabad Department of Software Engineering


2

APPROVAL CERTIFICATE

This project, entitled as “Identification of Damage Assessment Tweets Using Textual


Features” has been approved for the award of

Bachelor of Science in Software Engineering

Committee Signatures:

Supervisor: __________________________

(Dr. Shahid Iqbal Malik)

Project Coordinator: __________________________

(Sir Ibrar Arshad)

Head of Department: __________________________

(Dr. Nadeem Anjum)

Capital University of Science and Technology, Islamabad Department of Software Engineering


3

DECLARATION

We, hereby, declare that “No portion of the work referred to, in this project has been submitted in
support of an application for another degree or qualification of this or any other university/institute
or other institution of learning”. It is further declared that this undergraduate project, neither as a
whole nor as a part thereof has been copied out from any sources, wherever references have been
provided.

MEMBER’S SIGNATURES

Capital University of Science and Technology, Islamabad Department of Software Engineering


4

ACKNOWLEDGEMENTS

The completion of this project could not have been possible without the participation and assistance
of a lot of individuals contributing to this project. However, we would like to express our deep
appreciation and indebtedness to our teachers and supervisors for their endless support, kindness,
and understanding during the project duration.

Above all, we would like to thank the Great Almighty for always having his blessing on us.

Capital University of Science and Technology, Islamabad Department of Software Engineering


5

Table of Contents
1 Introduction ................................................................................................................................................... 9
1.1 Project Introduction............................................................................................................................... 9
1.2 Existing Examples / Solutions .............................................................................................................. 9
1.3 Business Scope .................................................................................................................................... 10
1.4 Useful Tools and Technologies ........................................................................................................... 10
1.5 Project Work Break Down .................................................................................................................. 11
1.6 Project Timeline .................................................................................................................................. 13
1.7 Abbreviations............................................................................................................................................ 13
2 Requirement Specification and Analysis .................................................................................................... 14
2.1 Requirement Specification .................................................................................................................. 14
2.2 Functional Requirements .................................................................................................................... 14
2.3 Non-Functional Requirements ............................................................................................................ 16
2.4 System Use Case Modeling ................................................................................................................ 16
2.5 Use Case1 Title: .................................................................................................................................. 17
2.5.1 Train model Usecase Description ............................................................................................... 17
2.5.2 Test Model Usecase Description ................................................................................................. 18
3 System Design ............................................................................................................................................ 20
3.1 Layer Definition .................................................................................................................................. 20
3.1.1 Presentation layer ........................................................................................................................ 20
3.1.2 Business logic Layer ................................................................................................................... 20
3.2 System Design Diagrams .................................................................................................................... 20
3.2.1 High Level Design ...................................................................................................................... 20
3.2.2 System Sequence Diagrams ........................................................................................................ 21
3.3 Flow Chart........................................................................................................................................... 23
3.3.1 Select dataset flowchart............................................................................................................... 25
3.3.2 Select disaster flowchart ............................................................................................................. 25
3.3.3 Select features flowchart ............................................................................................................. 26
3.3.4 Select Preprocessing Technique flowchart ................................................................................. 27
3.3.5 Select Machine Learning model flowchart ................................................................................. 28
3.3.6 Select Evaluation Metrics flowchart ........................................................................................... 29
3.3.7 Select Validation technique flowchart ........................................................................................ 30
3.3.8 Save Model flowchart ................................................................................................................. 30
3.4 Architecture Diagram .......................................................................................................................... 32
3.5 User Interface Design .......................................................................................................................... 33
3.5.1 Homepage interface .................................................................................................................... 33

Capital University of Science and Technology, Islamabad Department of Software Engineering


6

3.5.2 Display dataset page interface ..................................................................................................... 33


3.5.3 Select dataset interface ................................................................................................................ 34
3.5.4 View dataset interface ................................................................................................................. 34
3.5.5 Feature extraction interface ......................................................................................................... 35
3.5.6 Preprocessing interface ............................................................................................................... 35
3.5.7 Train model interface .................................................................................................................. 36
3.5.8 Test model interface .................................................................................................................... 36
3.5.9 About us ...................................................................................................................................... 37
4 Software Development ................................................................................................................................ 38
4.1 Coding Standards ................................................................................................................................ 38
4.1.1 Indentation .................................................................................................................................. 38
4.1.2 Declaration .................................................................................................................................. 38
4.1.3 Statement Standards .................................................................................................................... 38
4.1.4 Naming Convention .................................................................................................................... 38
4.2 FrontEnd Development Environment ................................................................................................. 39
4.3 BackEnd Development Environment .................................................................................................. 39
4.4 Software Description........................................................................................................................... 39
4.4.1 Module Classifier ........................................................................................................................ 39
4.4.2 Module Web ................................................................................................................................ 47
5 Software Testing ......................................................................................................................................... 85
5.1 Testing Methodology .......................................................................................................................... 85
5.2 Test Cases ........................................................................................................................................... 86
5.2.1 Homepage testcase ...................................................................................................................... 86
5.2.2 Select train model testcase .......................................................................................................... 86
5.2.3 Select dataset testcase 1 .............................................................................................................. 87
5.2.4 Select dataset testcase 2 .............................................................................................................. 87
5.2.5 Select disaster testcase ................................................................................................................ 88
5.2.6 View Dataset ............................................................................................................................... 89
5.2.7 Select Feature Extraction testcase 1 ............................................................................................ 89
5.2.8 Select feature extraction testcase 2.............................................................................................. 90
5.2.9 Select Preprocessing technique testcase ...................................................................................... 90
5.2.10 Select ML model testcase............................................................................................................ 91
5.2.11 Select Evaluation metrics testcase 1............................................................................................ 92
5.2.12 Select Validation technique testcase 1 ........................................................................................ 92
5.2.13 Select Validation technique testcase 2 ........................................................................................ 93
5.2.14 Display Result ............................................................................................................................. 93

Capital University of Science and Technology, Islamabad Department of Software Engineering


7

List of Figures
Figure 1: Work Breakdown Structure ............................................................................................. 12
Figure 2 : Project Timeline ............................................................................................................. 13
Figure 3: Usecase Diagram ............................................................................................................. 16
Figure 4: Train Model SSD ............................................................................................................. 22
Figure 5: Test Model SSD............................................................................................................... 23
Figure 6: Flowchart ......................................................................................................................... 24
Figure 7: Select dataset flowchart ................................................................................................... 25
Figure 8: Select Disaster flowchart ................................................................................................. 25
Figure 9: Select Feature Extraction flowchart ................................................................................ 26
Figure 10: Select preprocessing technique flowchart ..................................................................... 27
Figure 11: Select ML model flowchart ........................................................................................... 28
Figure 12: Select Evaluation metrics flowchart .............................................................................. 29
Figure 13: Select validation technique flowchart ............................................................................ 30
Figure 14: Save Model flowchart .................................................................................................... 31
Figure 15: Architecture Diagram .................................................................................................... 32
Figure 16: Homepage interface ....................................................................................................... 33
Figure 17: Display dataset page interface ....................................................................................... 33
Figure 18: Select dataset interface .................................................................................................. 34
Figure 19: View dataset interface ................................................................................................... 34
Figure 20: Feature extraction interface ........................................................................................... 35
Figure 21: Preprocessing interface .................................................................................................. 35
Figure 22 Train model interface ...................................................................................................... 36
Figure 23 Test model interface ....................................................................................................... 36
Figure 24 about us interface ............................................................................................................ 37

Capital University of Science and Technology, Islamabad Department of Software Engineering


8

List of Tables
Table 1: Functional Requirements .................................................................................................. 14
Table 2: Non-Functional Requirements .......................................................................................... 16
Table 3: Train Model Usecase Description ..................................................................................... 17
Table 4: Test Model Usecase Description ...................................................................................... 18
Table 5: Layer Definition ................................................................................................................ 20
Table 6: Homepage testcase ............................................................................................................ 86
Table 7: Select train model testcase ................................................................................................ 86
Table 8: Select dataset testcase 1 .................................................................................................... 87
Table 9: Select dataset testcase 2 .................................................................................................... 87
Table 10: Select disaster testcase .................................................................................................... 88
Table 11: View dataset .................................................................................................................... 89
Table 12: Feature Extraction testcase1 ........................................................................................... 89
Table 13: Feature Extraction testcase2 ........................................................................................... 90
Table 14: Preprocessing technique .................................................................................................. 90
Table 15: ML Model testcase .......................................................................................................... 91
Table 16: Evaluation Metrics testcase1 ........................................................................................... 92
Table 17: Validation Technique testcase 1 ..................................................................................... 92
Table 18: Validation Technique testcase 2 ..................................................................................... 93
Table 19: Display results ................................................................................................................. 93

Capital University of Science and Technology, Islamabad Department of Software Engineering


9

1 Introduction

1.1 Project Introduction

Damage assessment is the method involved with deciding the area, nature, and seriousness of harm
supported by people in general and private areas after a disaster. The typical damage assessment
estimates the losses and the impacts of those losses on the affected individuals and communities.
These days, Twitter has become better known among clients for imparting data, particularly during
disasters. Twitter provides situational information on a wide range of social activities that are
helpful during crisis events such as earthquakes, floods, cyclones, wildfire, etc. Identifying tweets
related to the target event during a disaster is a challenging task. During and in the aftermath of a
disaster people post sentiment tweets along with situational tweets (e.g., sympathies for those
affected) are also posted. These tweets are not much useful in damage assessment. There are only
a few works focused on detecting the damage assessment tweets. For damage assessment, in our
project, we use three features which are the low-level lexical features, top-most frequency word
features, and syntactic features.
We will be using a hierarchical clustering approach for classifying our data. There will be two types
of categories in which tweets are divided that are: Binary Labels and Multi-Valued Labels. In binary
labels, there are two labels that are Damage Assessment and Non-Damage Assessment. Multi-
Valued Labels include three labels Human Damage Assessment, Infrastructure Damage
Assessment, and Non-Damage Assessment.

1.2 Existing Examples / Solutions

Most of the existing works only focused on general categories of disaster tweets like informative
and non-informative. These works focus on disaster-related tweets but not on the sub-category of
tweets such as infrastructure damage, human damage. E.g.: AIDR, AIDR is a free and open-source
software that automatically collects and classifies tweets that are posted during humanitarian crises.

AIDR: Artificial Intelligence for Disaster Response (qcri.org)

Some works focused on damage assessment from social media that uses only imagery data but not
text data. The drawback of this works is it gives information only about the infrastructure damage,
but it does not provide information on the human damage (i.e. injured or dead people, missing,
trapped, or found people). E.g.: Rapid Damage Assessment Using Social Media Images by

Capital University of Science and Technology, Islamabad Department of Software Engineering


10

Combining Human and Machine Intelligence - An automatic image processing system that analyzes
the usefulness of social media imagery content to perform rapid damage assessment (infrastructure)
during a real-world disaster.
https://arxiv.org/pdf/2004.06675.pdf

Some of the approaches work only for regional language e.g. Italian tweets but do not work for
English language tweets. Some methods are also required to give the keywords manually to identify
the damage assessment tweets. E.g.: A Linguistically driven Approach to Cross-Event Damage
Assessment of Natural Disasters from Social Media Messages - This work focuses on the analysis
of Italian social media messages for disaster management

https://dl.acm.org/doi/10.1145/2740908.2741722

1.3 Business Scope

Identification of damage assessment tweets is beneficial to both humanitarian organizations and


victims during a disaster. The goal of this project is to classify the damage assessment tweet. This
project will help humanitarian organizations to understand the seriousness of the damage and
provide services to the people according to the emergency during a disaster. The main stakeholders
of this project are disaster management authorities (i.e. NDMA, PDMA) and the NGOs. The reason
behind this project is not to earn from it but to serve humanity.

1.4 Useful Tools and Technologies

We are making a web application to identify damage assessment tweets. To achieve our goal we
will train different Machine Learning models. We will be using Python language to create models.
For the backend, we will use Django and for the frontend, we will use Angular.

Python is an interpreted high-level general-purpose programming


language. We will train our Machine learning models in python

Capital University of Science and Technology, Islamabad Department of Software Engineering


11

Angular is a platform for building mobile and desktop web


applications. We will be using Angular for creating our web
application frontend

Enterprise Architect is a visual modeling and design tool based on


the UML. We will use Enterprise Architecture for developing use
cases, class diagrams, domain models, SSD, SD, and Data flow
diagrams.

MongoDB is a source-available cross-platform document-oriented


database program. Classified as a NoSQL database program,
MongoDB uses JSON-like documents with optional schemas.

1.5 Project Work Break Down

A work-breakdown structure in project management and systems engineering is a deliverable-


oriented breakdown of a project into smaller components. A work breakdown structure is a key
project deliverable that organizes the team's work into manageable sections. The Project is divided
into several stages. All members are going to participate in different stages of development as
mentioned in Figure 1 which shows that the tasks assign to different members.

Capital University of Science and Technology, Islamabad Department of Software Engineering


12

Figure 1: Work Breakdown Structure

Capital University of Science and Technology, Islamabad Department of Software Engineering


13

1.6 Project Timeline


A timeline is a chronological list of events that have happened or are about to happen. Project timelines
are the same, they tell you what tasks you need to complete and how much time you have to complete
them. As mentioned in Figure 2.

Figure 2 : Project Timeline

1.7 Abbreviations

AIDR: Artificial Intelligence for Digital Response


SSD: System sequence diagram
SVM: Support Vector Machine
RF: Random Forest
UC: Usecase

Capital University of Science and Technology, Islamabad Department of Software Engineering


14

2 Requirement Specification and Analysis


Requirement’s analysis is a process of determining user expectations for a new or modified product.
These features, called requirements, must be quantifiable, relevant and detailed. In software
engineering, such requirements are often called functional specifications. In Chapter 2 we will enlist
the functional and non-functional requirements and model functional requirements in the form of
use case model.

2.1 Requirement Specification


Requirements specification involves frequent communication with system users to determine
specific feature expectations, resolution of conflict or ambiguity in requirements as demanded by
the various users or groups of users and documentation of all aspects of the project development
process from start to finish. Requirements are a description of how a system should behave or a
description of system properties or attributes. It can alternatively be a statement of 'what' an
application is expected to do.
2.2 Functional Requirements
Functional requirements define functionalities of a system or its components. Functional
requirements may be calculations, technical details, data manipulation and processing and other
specific functionality that define what a system is supposed to accomplish. Our functional
requirements are listed in Table 1.

Table 1: Functional Requirements

S. Functional Requirement Type Status


No.
1 User can select NLP dataset. Core Complete
2 User can select MMD dataset. Core Complete
3 User can select one disaster type in Core Complete
respective dataset.
4 User can select all disaster types in Core Pending
respective dataset.
5 User can view the dataset. Intermediate Complete
6 User can select low level lexical Core Pending
features for training.

7 User can select top frequency features Core Complete


for training
8 User can select syntactic features for Core Complete
training.

Capital University of Science and Technology, Islamabad Department of Software Engineering


15

9 User can select all features for training. Core Pending


10 User can select punctuation symbols Core Pending
removal preprocessing technique
11 User can select unknown words Core Pending
removal preprocessing technique.
12 User can select numerals removal Core Pending
preprocessing technique.
13 User can select lowercase conversion Core Pending
preprocessing technique.
14 User can select all preprocessing Core Complete
techniques.
15 User can select weighting technique for Core Pending
training.
16 User can select random forest machine Core Complete
learning model for training.
17 User can select SVM learning model for Core Pending
training.
18 User can select accuracy evaluation Core Complete
metric or training.
19 User can select precision evaluation Core Pending
metric for training
20 User can select recall evaluation metric Core Pending
for training
21 User can select F-Measure evaluation Core Pending
metric for training.
22 User can select all evaluation metrics. Core Pending
23 User can select 10-fold cross validation Core Complete
technique for training.
24 User can select hold-out method Core Complete
validation technique for training.
25 User can view results of train model. Intermediate Complete
26 User can save the trained model. Core Pending
27 User can test the trained model for Core Pending
unseen data.

Capital University of Science and Technology, Islamabad Department of Software Engineering


16

2.3 Non-Functional Requirements


Following is the list of the non-functional requirements listed in Table 2.

Table 2: Non-Functional Requirements

S. Non Functional Requirements Category


No.
1 The system should be easy to use, interface must be well Usability
organized.
2 System should not crash during any activity. Reliability

3 System should always be available when requested for use. Availability


4 Computation time and response time should be as little as Performance
possible, because one of the software’s features is
timesaving.

2.4 System Use Case Modeling


A Use Case depicts how actors will interact with the system. A use case is a methodology used in
system analysis to identify, clarify and organize system requirements. The use case is made up of
a set of possible sequences of interactions between systems and users in a particular environment
and related to a particular goal. Following use case diagrams will depict how our system works.
The usecase diagram of our system shows that user have basically two functions train model and
uc usecase
test model as depicted in Figure 3.

Tra i n m o d e l

Use r
Te st m o d e l

Figure 3: Usecase Diagram

Capital University of Science and Technology, Islamabad Department of Software Engineering


17

2.5 Use Case1 Title:


2.5.1 Train model Usecase Description

Table 3: Train Model Usecase Description

Use Case ID: UC 1


UC Name Train Model
Actors User
Description User trains the model by selecting dataset then disaster then extract
feature then select preprocessing technique then weighting technique.
After this user selects ML model, evaluation metrics and validation
technique then request to train model and save it.
Trigger “Train Model” button
Pre-condition User must access the website.
Post- User must train the model successfully.
condition
Basic Flow User System
1. User clicks on Train 2. System displays dataset to
Model option. choose.
3. User selects the 4. System notifies the user about
dataset. dataset selection and display
5. User selects the disaster disasters to choose.
and click on next button. 6. System notifies the user about
7. User selects the feature disaster selection and display to
extraction technique and choose feature extraction technique.
click on next button. 8. System notifies the user about
9. User selects the feature extraction technique
preprocessing technique selection and display to choose
and click on next button. preprocessing technique.
11. User selects the 10. System notifies the user about
weighting technique and preprocessing technique selection
click on next button. and display to choose weighting
13. User selects the technique.
Machine learning model 12. System notifies the user about
then evaluation metrics weighting technique selection and
and after that the display next page.
validation technique and 14. System successfully selects all
click on train model options and notifies that model is
button. trained successfully.

Capital University of Science and Technology, Islamabad Department of Software Engineering


18

15. User saves the model. 16. System notifies that model is
saved successfully.

Alternative 1. User clicks on test model option.


Flow 2. User selects view dataset.
3. User cancel to save the model.
4. User selects view result.

Exception 1. Selected dataset had some miscellaneous information.


2. During loading dataset, System stops responding.
3. Service may not be available.
4. System may crash while posting request.
5. Preprocessing and feature extraction method may not be applied.
6. Unknown error occurred while saving model.

2.5.2 Test Model Usecase Description

Table 4: Test Model Usecase Description

Use Case ID: UC 2


UC Name Test Model
Actors User
Description User enters unseen data and system predicts the class label.
Trigger “Predict” button.
Pre-condition Model must be trained.
Post-condition System will predict the class label.
Basic Flow User System
1. User selects the test 2. System displays to select
model option. already trained model.
3. User selects the 4. System notifies about selected
already trained model. model.
5. User enters unseen 6. System displays the predicted
data and click Predict class label.
button to predict class
label.

Capital University of Science and Technology, Islamabad Department of Software Engineering


19

Alternative Flow User selects the train model option.


Exception 1. System may not be responding at the moment.
2. No past data.
3. An unknown error occurred while updating the status.

Capital University of Science and Technology, Islamabad Department of Software Engineering


20

3 System Design
The purpose of this chapter is to provide information that is complementary to the development
phase. Without an adequate design, that delivers required function as well as quality attributes,
the project will fail. However, communicating architecture to its stakeholders is as important a
job as creating it in the first place.

3.1 Layer Definition

Table 5: Layer Definition

Layers Description

Presentation This layer will be used for


Layer the interaction with the user
through a graphical user
interface.
Business Logic This layer contains the
Layer business logic. All the
constraints and majority of
the functions reside under
this layer.

3.1.1 Presentation layer


Occupies the top level and displays information related to services available on a website. This
tier communicates with other tiers by sending results to the browser and other tiers in the network.

3.1.2 Business logic Layer


Application Layer also called the middle tier, logic tier, business logic or logic tier, this tier is
pulled from the presentation tier. It controls application functionality by performing detailed
processing.

3.2 System Design Diagrams


System design is divided into two parts:
3.2.1 High Level Design
High-level design provides a view of the system at an abstract level. It shows how the major
pieces of the finished application will fit together and interact with each other. The high-level

Capital University of Science and Technology, Islamabad Department of Software Engineering


21

design does not focus on the details of how the pieces of the application will work. Those details
can be worked out later during low-level design and implementation.

3.2.2 System Sequence Diagrams


System sequence diagram (SSD) is a sequence diagram that shows, for a particular scenario of a use
case, the events that external actors generate their order, and possible inter-system events.

3.2.2.1 Train Model SSD


This is Train Model’s system sequence diagram which shows that when the user clicks on Train
model button, datasets are displayed. User first selects the dataset and dataset selected. Then user
selects disaster type and disaster selected as well. After this user selects the feature extraction and
after selection user selects the preprocessing technique. After this user selects the weighting
technique and then selects the ML model, evaluation metrics and validation technique. After this
user requests system to train the model. System trains the model successfully. After that user can
view result as well as save the trained model as shown in Figure#4.

Capital University of Science and Technology, Islamabad Department of Software Engineering


22

sd sd

System

User

SelectDataset(dataset)

:DatasetSelected

SelectDisaster(dataset)

:DisasterSelected

SelectFeatures(Feature name: String)

:FeaturesSelected

SelectPreprocessingTechnique(Technique name: String)

:TechniqueSelected

SelectWeightingTechnique(Technique name: String)

:TechniqueSelected

SelectMLmodel(Model name: String)

:ModelSelected

SelectEvaluationMetrics(Metrics name: String)

:EvaluationMetricSelected

SelectValidationTechnique(Technique name: String)

:TechniqueSelected

RequestTrainModel()

:ModelTrained

ViewResult()

:DisplayResult

RequestSaveTrainedModel()

:TrainedModelSaved

Figure 4: Train Model SSD

Capital University of Science and Technology, Islamabad Department of Software Engineering


23

3.2.2.2 Test Model SSD


When the user selects the Test model button, user selects the already trained model and system in
response displays the selected trained model. Then user enter the unseen data and clicks on predict
button and after this system displays the predicted class label as shown in Figure#5.
sd history

System

User

Sel ectAl readyT rai nedModel ()

:
T rai nedModel Sel ected

EnterUnseenData()

Predi ctCl assLabel ()

:
Di spl ayPredi ctedCl assLabel

Figure 5: Test Model SSD

3.3 Flow Chart


User have main two option; train model or test model.
 Train model
1. First user selects the dataset from given options.
2. Then user selects the disaster from given options.
3. After this user can either view dataset or selects features from given options to be extract.
4. Then user selects the preprocessing technique from given option.
5. After user can either view dataset or directly selects the weighting technique.
6. Then user selects ML model from given options.
7. Then user selects the evaluation metrics and validation technique from given options.
8. Then user requests to train model.
9. After this user can either view results or save the trained model.
 Test Model
1. First user selects the already trained model.
2. Then user enter the unseen data/tweet.
3. Then click on predict button so system displays predicted class label.
Complete flowchart of our project is shown in Figure#6.

Capital University of Science and Technology, Islamabad Department of Software Engineering


24

Business Process flow

Start

Train Model Test Model

End

Select Dataset Select Already


trained model

Save Model Enter unseen data


Select Disaster

View Dataset View Result Predict Class label

Select features
Train model
End

Select
View Dataset Select Validation
Preprocessing
technique technique

Select weighting Select ML model Select Evaluation


technique metrics

Figure 6: Flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


25

3.3.1 Select dataset flowchart

User can select any one dataset from the following;


1. Crisis NLP
2. Process
Business Crisis MMD
Choose Dataset

Crisis NLP dataset

Select Dataset

Start End

Crisis MMD
dataset

Figure 7: Select dataset flowchart

3.3.2 Select disaster flowchart


User can selects either one disaster or all disaster.
Business Process disaster

One disaster

Select Disaster

Start End

All disasters

Figure 8: Select Disaster flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


26

3.3.3 Select features flowchart


User can selects one or more than one options from the following features;
1. Low level lexical features
2. Top frequency features
3. Syntactic features
4. All features
Business Process FeatureExtraction

Low level lexical


features

Top frequency
features
Select Features

Start End
Syntactic features

All features

Figure 9: Select Feature Extraction flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


27

3.3.4 Select Preprocessing Technique flowchart


User can select one or more than one preprocessing technique from following options;
1. Punctuation symbols removal
2. Unknown words removal
3. Numerals removal
4. Lower case conversion
5. All preprocessing techniques

Business Process Preprocessing

Punctuation
symbols removal

Unknown words
removal

Select Preprocessing technique

Numerals Removal
Start End

Lower case
conversion

All techniques

Figure 10: Select preprocessing technique flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


28

3.3.5 Select Machine Learning model flowchart


User can select any one ML model from following;
1. Random forest
2. Support vector machine
Business Process ML model

Random forest

Select ML model

End
Start

Support Vector
Machine

Figure 11: Select ML model flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


29

3.3.6 Select Evaluation Metrics flowchart

User can selects either one or more than one option from following;
1. Accuracy
2. Precision
3. Recall
4. F-measure
5. All metrics

Business Process Ev aluation Metrics

Accuracy

Precision

Select Evaluation Metrics

Recall

Start End

F-measure

All metrics

Figure 12: Select Evaluation metrics flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


30

3.3.7 Select Validation technique flowchart


User can select either 10-fold method or hold-out method from validation techniques.
Business Process v alidation

10-fold cross method

Select Validation Technique

Start End

Hold-out method

Figure 13: Select validation technique flowchart

3.3.8 Save Model flowchart


For saving the model, following data is required;
1. Dataset name
2. Disaster name
3. Feature name
4. Preprocessing technique name
5. Weighting technique name
6. ML Model name
7. Evaluation metric value
8. Validation technique name
9. Current date and time

Capital University of Science and Technology, Islamabad Department of Software Engineering


31

Business Process Sav eModel

Dataset name

Disaster name

Feature names

Preprocessing
technique name

Save Model

Weighting
Start technique name
End

ML Model name

Evaluation metrics
values

Validation technique
name

Current Date and


Time

Figure 14: Save Model flowchart

Capital University of Science and Technology, Islamabad Department of Software Engineering


32

3.4 Architecture Diagram


Software architecture is, simply, the organization of a system. This organization includes all
components, how they interact with each other, the environment in which they operate, and the
principles used to design the software as depicted in Figure 15. In many cases, it can also include
the evolution of the software into the future.
cmp Component Model

Presentation Layer

User Interface

Business Logic

Feature Extraction Pre-Processing Machine Learning Ev aluation Metrics Validation


Model technique

Sav e Model

Database Layer

Database

Figure 15: Architecture Diagram

Capital University of Science and Technology, Islamabad Department of Software Engineering


33

3.5 User Interface Design


3.5.1 Homepage interface
Homepage shows two tabs train model and test model. User can select any of the tab as shown in
Figure 16.

Figure 16: Homepage interface

3.5.2 Display dataset page interface


If user selects train model tab then this page is displayed. In this user can select the dataset and
disaster type and click on next button or user can also view the selected dataset by clicking on view
dataset tab as shown in Figure 17.

Figure 17: Display dataset page interface

Capital University of Science and Technology, Islamabad Department of Software Engineering


34

3.5.3 Select dataset interface

Figure 18: Select dataset interface

3.5.4 View dataset interface

Figure 19: View dataset interface

Capital University of Science and Technology, Islamabad Department of Software Engineering


35

3.5.5 Feature extraction interface


User can select any of the feature and click on the next button for further process or back button if
he wants to change dataset or disaster as shown in Figure 20.

Figure 20: Feature extraction interface

3.5.6 Preprocessing interface


User can select any of the preprocessing technique and click on the next button for further process
or back button if he wants to change dataset or disaster or feature as shown in Figure 21.

Figure 21: Preprocessing interface

Capital University of Science and Technology, Islamabad Department of Software Engineering


36

3.5.7 Train model interface


User selects the ML model, evaluation metrics and validation technique and click on train model
button. User can also click on back button to make any change or view result button to check the
results as shown in Figure 22.

Figure 22 Train model interface

3.5.8 Test model interface


User can either write any unseen data or upload file to predict whether there is a damage or not by
clicking on predict button as shown in Figure 23.

Figure 23 Test model interface

Capital University of Science and Technology, Islamabad Department of Software Engineering


37

3.5.9 About us

Figure 24 about us interface

Capital University of Science and Technology, Islamabad Department of Software Engineering


38

4 Software Development
4.1 Coding Standards
4.1.1 Indentation
Proper code indention is used in this project. The indentation of blocks of code enhances
readability, understandability and hierarchy of lines of code.

4.1.2 Declaration
 In this project we have used one declaration per line is to increase clarity and better
understanding of code. Following is the order of declaration:
 All the widgets have been imported at the beginning.
 The sequence of class variables is: First public, protected then private.
 Instance variables follow the sequence: First public then private instance variables.
 Then class constructors are declared with proper names.
 Class methods are grouped by functionality rather than by scope or accessibility to make
reading and understanding the code easier.
 Declarations for local variables are only at the beginning of code after importing
packages and libraries

4.1.3 Statement Standards


Each line of code contains one declaration at most. Compound statements in this project
contain lines of code enclosed in braces. The inner block of code of compound statements
begins after the opening braces from next line. Proper indentation is also followed for lines of
codes inside the compound statements. Proper braces are used in code around all statements
such as if-else, try-catch etc.

4.1.4 Naming Convention


Proper naming convention rules are followed while implementation of this project which make
programs more understandable by making them easier to read.

While implementing this project, we have used words from Natural Language (English) to
properly assign understandable names to classes, variables and methods. Such as Requests,
DocumentCollection, BasicInformation etc. instead of un-understandable names like myc
method, a1, b1 etc.

Mixed case is used to make names readable with lower case letters in general capitalizing the
first letter of class names and interface names.

Capital University of Science and Technology, Islamabad Department of Software Engineering


39

4.2 FrontEnd Development Environment


Visual Studio Code is a streamlined code editor with support for
development operations like debugging, task running, and version control.
It aims to provide just the tools a developer needs for a quick code-build-
debug cycle and leaves more complex workflows to fuller featured IDEs,
such as Visual Studio IDE.

4.3 BackEnd Development Environment


Python is an interpreted high-level general-purpose programming language.
Its design philosophy emphasizes code readability with the use of
significant indentation. Its language constructs and object-oriented approach
aim to help programmers write clear, logical code for small- and large-scale
projects

The Jupyter Notebook App is a server-client application that allows


editing and running notebook documents via a web browser. The Jupyter
Notebook App can be executed on a local desktop requiring no internet
access (as described in this document) or can be installed on a remote
server and accessed through the internet.

4.4 Software Description

4.4.1 Module Classifier


4.4.1.1 Pre-processing

import nltk
import numpy as np
import pandas as pd
import os
import re, string, unicodedata
from nltk.corpus import stopwords
from collections import Counter

def remove_punctuation(twt):

punctuations = string.punctuation

Capital University of Science and Technology, Islamabad Department of Software Engineering


40

NewCol=[]

no_punct = ""
for char in str(twt):
if char not in punctuations:
no_punct = no_punct + char
else :
no_punct = no_punct + "

return no_punct

def remove_number(tweet):

tweet = tweet.split(" ")


new_words = []
for word in tweet:
new =re.sub(r'[0-9]', " ", word)
new_words.append(new)

return ' '.join(new_words)

def remove_stopwords(words):

words = words.split(" ")


new_words = []
for word in words:
if word not in stopwords.words('english'):
new_words.append(word)

return ' '.join(new_words)

def remove_wordsLESS3(tweet):

tweet = tweet.split(" ")


new_words = []
for word in tweet:
if len(word) >= 3 :
new_words.append(word)

Capital University of Science and Technology, Islamabad Department of Software Engineering


41

return ' '.join(new_words)

def remove_non_ascii(words):

words = words.split(" ")


new_words = []
for word in words:
word=word.encode('ascii', 'ignore').decode('utf-8', 'ignore')
new_words.append(word)

return ' '.join(new_words)

def remove_username(tweet):

tweet = tweet.split(" ")


new_words = []
for word in tweet:
new_word =re.sub(r"@\S+", "", word)
if new_word != '':
new_words.append(new_word)

return ' '.join(new_words)

def remove_URL(tweet):
tweet = tweet.split(" ")
new_words = []
for word in tweet:
new_word =re.sub(r"http\S+", "", word)
new_words.append(new_word)

return ' '.join(new_words)

def cleanTweet(alltweet):

newtweet= []

for tweet in alltweet:


tweet = tweet.lower()
tweet = remove_URL(tweet)
tweet = remove_non_ascii(tweet)

Capital University of Science and Technology, Islamabad Department of Software Engineering


42

tweet = remove_stopwords(tweet)
tweet = remove_username(tweet)
tweet = remove_punctuation(tweet)
tweet = remove_number(tweet)
tweet = remove_wordsLESS3(tweet)

newtweet.append(tweet)
return newtweet

4.4.1.2 Syntactic Features


The syntactic features such as count of numerals and count of intensifiers for classifying situational
and non-situational tweets during a disaster.

import string
import numpy as np
import pandas as pd
import string
import os
import sys
import io

def countLen(col):
tweet_len = []

for row in col:


count=len(row) - row.count(',') - row.count(" ")
tweet_len.append(count)

return tweet_len

def countVerb(col):

verb_cont=[]

for row in col:

count=0
count = count + row.count("V")
verb_cont.append(count)

return verb_cont

def countPronoun(col):

Capital University of Science and Technology, Islamabad Department of Software Engineering


43

Pronoun_count = []

for row in col:

count=0
count = count + row.count("O")
Pronoun_count.append(count)

return Pronoun_count

def countCommonNoun (col):

CommonNoun_count = []

for row in col:

count=0
count = count + row.count("N")
CommonNoun_count.append(count)

return CommonNoun_count

def countAdverb(col):

Adverb_count = []

for row in col:

count=0
count = count + row.count("R")
Adverb_count.append(count)

return Adverb_count

def countAdjective(col):

Adjective_count = []

for row in col:

count=0
count = count + row.count("A")
Adjective_count.append(count)

return Adjective_count

Capital University of Science and Technology, Islamabad Department of Software Engineering


44

def countInterjection(col):

Interjection_count = []

for row in col:

count=0
count = count + row.count("!")
Interjection_count.append(count)

return Interjection_count

def countDeterminer(col):

Determiner_count = []

for row in col:

count=0
count = count + row.count("D")
Determiner_count.append(count)

return Determiner_count

def countURL(col):

URL_count = []

for row in col:

count=0
count = count + row.count('U')
URL_count.append(count)

return URL_count

def countAbbreviations(col):
abbr_count = []

for row in col:

count=0
count = count + row.count('G')

Capital University of Science and Technology, Islamabad Department of Software Engineering


45

abbr_count.append(count)

return abbr_count

def countPrePost(col):
prePost_count = []

for row in col:


count =0
count = count + row.count('P')
prePost_count.append(count)

return prePost_count

def countNominalVerbal(col):
NominalVerbal_count = []

for row in col:


count =0
count = count + row.count('L')
NominalVerbal_count.append(count)

return NominalVerbal_count

def Syntactic Features(DF):

PosCOL=len(DF.columns)-1 # POS_tags columns

tweet_length = countLen(DF.iloc[:,PosCOL])

Determiners_Count = countDeterminer(DF.iloc[:,PosCOL])
Verbs_Count = countVerb(DF.iloc[:,PosCOL])
Pronouns_Count = countPronoun(DF.iloc[:,PosCOL])

NominalVerbal_Count = countNominalVerbal(DF.iloc[:,PosCOL])

URLs_Count = countURL(DF.iloc[:,PosCOL])

Noun_Count = countCommonNoun(DF.iloc[:,PosCOL])
Adverb_Count = countAdverb(DF.iloc[:,PosCOL])
Adjective_Count = countAdjective(DF.iloc[:,PosCOL])

Abbreviation_count= countAbbreviations(DF.iloc[:,PosCOL])
Interjection_count = countInterjection(DF.iloc[:,PosCOL])

Capital University of Science and Technology, Islamabad Department of Software Engineering


46

PrePost_count = countPrePost(DF.iloc[:,PosCOL])

DF.insert(len(DF.columns),"tweet_length",tweet_length)
DF.insert(len(DF.columns),"Determiners_Count",Determiners_Count)
DF.insert(len(DF.columns),"Verbs_Count",Verbs_Count)
DF.insert(len(DF.columns),"Pronouns_Count",Pronouns_Count)

DF.insert(len(DF.columns),"NominalVerbal_Count",NominalVerbal_Count)
DF.insert(len(DF.columns),"URLs_Count",URLs_Count)
DF.insert(len(DF.columns),"Noun_Count",Noun_Count)
DF.insert(len(DF.columns),"Adverb_Count",Adverb_Count)
DF.insert(len(DF.columns),"Adjective_Count",Adjective_Count)

DF.insert(len(DF.columns),"Unknown_count",Abbreviation_count)

DF.insert(len(DF.columns),"Interjection_count",Interjection_count)

DF.insert(len(DF.columns),"PrePost_count",PrePost_count)

return DF

4.4.1.3 Top-most frequency words

def Unique_word(List):
new_set = set()
for tweet in List:
for item in tweet.split(" "):
if item != " " and item != "":
new_set.add(item)
return list(new_set)

def BOW (all_tweet,col_name):

all_tweet_frequncy = []
for tweet in all_tweet:
tweet = tweet.split(" ")
single_tweet=[]

for word in col_name:


single_tweet.append(tweet.count(word))

all_tweet_frequncy.append(single_tweet)

Capital University of Science and Technology, Islamabad Department of Software Engineering


47

NEWDF=pd.DataFrame(all_tweet_frequncy)
NEWDF.columns=col_name

return NEWDF

disaster= sheet[23:-14]
print("\n ",disaster,"\n ")
df=pd.read_csv("../../"+sheet,low_memory=False)
allTweet = df.loc[:,"tweet_text"]

allTweet = cleanTweet(list(allTweet))

print(allTweet)

all_unique = Unique_word(allTweet)

# print("\n combine_Tweet : ",countTop(combine,10))


df_final = BOW(allTweet,all_unique)
df_final.loc['Column_Total']=df_final.sum(axis=0)
df_final = df_final.sort_values(by = 'Column_Total', axis = 1, ascending = False)
df_final.to_csv(disaster+"all_words_fequency.csv",index=False)
df_top = df_final.iloc[:,0:11]
df_top.to_csv(disaster+"top10_fequency.csv",index=False)

4.4.2 Module Web

4.4.2.1 Index.html

Capital University of Science and Technology, Islamabad Department of Software Engineering


48

4.4.2.2 Index.html Code


<!DOCTYPE html>
<html style="font-size: 16px;">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="keywords" content="Damage Tweet Assessment, Damage Tweet Assessment,
About">
<meta name="description" content="">
<meta name="page_type" content="np-template-header-footer-from-plugin">
<title>Index</title>
<link rel="stylesheet" href="sirf.css" media="screen">
<link rel="stylesheet" href="Index.css" media="screen">
<script class="u-script" type="text/javascript" src="jquery.js" defer=""></script>
<script class="u-script" type="text/javascript" src="anotherJquery.js"
defer=""></script>
<link id="u-theme-google-font" rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,5
00,500i,700,700i,900,900i|Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i"
>
<link id="u-page-google-font" rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,30
0i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">

</head>
<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


49

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-1"
id="carousel_00ee" >

<div class="u-clearfix u-sheet-1">


<h1 class="u-text-body-alt-color u-text-1" >Damage Tweet Assessment</h1>
<a href="Datasets.html" class="u-border-2 u-border-white u-btn u-button-
style u-hover-white u-btn-1">Train Model</a>
<a href="Test_Model.html" class="u-border-2 u-border-white u-btn u-button-
style u-hover-white u-btn-1">Test Model</a>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-


sheet">
<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>

</body>
</html>

Capital University of Science and Technology, Islamabad Department of Software Engineering


50

4.4.2.3 Dataset.html

4.4.2.4 Dataset.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


51

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-2" id="sec-d531"
data-image-width="1600" data-image-height="900">
<div class="u-clearfix u-sheet">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">DataSet</h1>
<h3 class="u-text u-text-body-alt-color u-text-default u-text-
2">Dataset</h3>
<h3 class="u-text u-text-body-alt-color u-text-3">Disaster</h3>
<div class="u-align-center u-border-1 u-border-grey-90 u-custom-color-1 u-
form u-radius-50 u-form-1">
<form id="form" action="#" method="POST" class="u-clearfix u-form-custom-
backend u-form-horizontal u-form-spacing-19 u-inner-form" style="padding: 33px;"
source="custom" name="form" redirect-url="299242952" redirect-
address="dataSet.html" redirect="true">
<div class="u-form-group u-form-select u-form-group-1">
<label for="select-57b6" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="select-57b6" name="select" class="u-border-1 u-border-
grey-30 u-input u-input-rectangle">
<option class="mmd" value="mmd">Select Dataset</option>
<option class="mmd" value="mmd">Crisis MMD</option>
<option class="nlp" value="nlp">Crisis NLP</option>
</select>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12"
version="1" class="u-caret"><path fill="currentColor" d="M4 8L0 4h8z"></path></svg>
</div>
</div>
<div id="form" class="u-form-group u-form-select u-form-group-2">
<label for="select-6ab7" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="MMD" type="dropdown" name="select-1" class="u-border-1
u-border-grey-30 u-input u-input-rectangle" required="required"
autofocus="autofocus">
<option id="data" value="Disaster">Select Disaster</option>
<option id="data1" value="California Wildfires">California
Wildfires</option>

Capital University of Science and Technology, Islamabad Department of Software Engineering


52

<option id="radiol" value="Sri Lanka Floods">Sri Lanka


Floods</option>
<option id="radiol" value="Hurricane Irma">Hurricane Irma</option>
<option id="radiol" value="Hurricane Harvey">Hurricane
Harvey</option>
<option id="radiol" value="Hurricane Maria">Hurricane
Maria</option>
<option id="radiol" value="Iraq–Iran Earthquake">Iraq–Iran
Earthquake</option>
<option id="radiol" value="Mexico Earthquake">Mexico
Earthquake</option>
</select>

<select id="NLP" type="dropdown" name="select-1" class="u-border-1


u-border-grey-30 u-input u-input-rectangle" required="required"
autofocus="autofocus">
<option id="data" value="Disaster">Select Disaster</option>
<option id="data2" value="Pakistan Earthquake">Pakistan
Earthquake</option>
<option id="radiol" value="Typhoon Hagupit">Typhoon
Hagupit</option>
<option id="radio" value="Chile Earthquake">Chile
Earthquake</option>
<option id="radio" value="Nepal Earthquake">Nepal
Earthquake</option>
<option id="radio" value="India Floods">India Floods</option>
<option id="radio" value="Cyclone">Cyclone</option>
</select>

</div>
</div>
</form>

</div>
<a href="Feature_Extraction.html" class="u-active-palette-2-base u-border-
2 u-border-black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-
text-black u-text-hover-white u-btn-2"><span class="u-icon"></span>Next
</a>
<a href="ViewDataSetCFWF.html" id="btn_CFWF" class="u-border-2 u-border-
black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-text-hover-
custom-color-1 u-btn-3" >View Dataset<span style="font-size:
1.125rem;"></span></a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


53

<a href="PracticeAnotherDataSet.html" id="btn_data2" class="u-border-2 u-


border-black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-text-
hover-custom-color-1 u-btn-3" >View Dataset<span style="font-size:
1.125rem;"></span></a>

<a href="index.html" class="u-border-none u-btn u-btn-round u-button-style


u-custom-color-1 u-radius-50 u-btn-2">Back</a>

</div>
</section>
<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-
e74c"><div class="u-align-left u-clearfix u-sheet u-sheet-1">
<p class="u-text u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text u-text-default u-text-2">Afifa Arif&nbsp;<br>Bse183101
</p>
<p class="u-text u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){

$('#NLP').hide();
$('#btn_data2').hide();
$('#btn_CFWF').hide();

$('#select-57b6').change(function(){
var sv = $(this).val();

switch(sv){
case 'mmd':
$('#NLP').hide();
$('#MMD').show();
break;

case 'nlp':
$('#NLP').show();
$('#MMD').hide();
break;

Capital University of Science and Technology, Islamabad Department of Software Engineering


54

}
})

$('#MMD').change(function(){
var sv2 = $(this).val();

switch(sv2){
case 'California Wildfires':
$('#btn_CFWF').show();
$('#btn_data2').hide();
break;

default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})

$('#NLP').change(function(){
var sv3 = $(this).val();

switch(sv3){
case 'Pakistan Earthquake':
$('#btn_CFWF').hide();
$('#btn_data2').show();
break;

default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})
});
</script>

Capital University of Science and Technology, Islamabad Department of Software Engineering


55

4.4.2.5 Dataset of California wildfires

4.4.2.6 Dataset of California wildfire’s code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


56

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-section-1" id="sec-f9aa">
<div class="u-clearfix u-sheet u-sheet-1">
<h3 class="u-align-left u-text u-text-default u-text-1">Dataset
:&nbsp;Crisis MMD</h3>
<h3 class="u-align-left u-text u-text-default u-text-
2">Disaster:&nbsp;California Wildfires</h3>

<div class="container">
<div class="table-responsive">
<h1 align="center">California Wildfires 2017</h1>
<br />
<div align="center">
<!-- <button type="button" name="load_data" id="load_data" class="btn
btn-info">Load Data</button> -->
</div>
<br />
<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-
hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-1">&nbsp;Back
</a>
<a href="Feature_Extraction.html" class="u-btn u-btn-round u-button-
style u-hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-
2">Next&nbsp;</a>
<div id="employee_table">
</div>
</div>
</div>

<script>
$(document).ready(function(){
// $('#load_data').click(function(){
// });
$.ajax({

Capital University of Science and Technology, Islamabad Department of Software Engineering


57

url:"california_wildfires.csv",
dataType:"text",
success:function(data)
{
var employee_data = data.split(/\r?\n|\r/);
var table_data = '<table class="table table-bordered table-striped">';
for(var count = 0; count<employee_data.length; count++)
{
var cell_data = employee_data[count].split(",");
table_data += '<tr>';
for(var cell_count=0; cell_count<cell_data.length; cell_count++)
{
if(count === 0)
{
table_data += '<th>'+cell_data[cell_count]+'</th>';
}
else
{
table_data += '<td>'+cell_data[cell_count]+'</td>';
}
}
table_data += '</tr>';
}
table_data += '</table>';
$('#employee_table').html(table_data);
}
});

});
</script>

<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-hover-


palette-1-light-2 u-palette-1-base u-radius-2 u-btn-1">&nbsp;Back
</a>
<a href="Feature_Extraction.html" class="u-btn u-btn-round u-button-style
u-hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-2">Next&nbsp;</a>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-


e74c"><div class="u-align-left u-clearfix u-sheet u-sheet-1">
<p class="u-text u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>

Capital University of Science and Technology, Islamabad Department of Software Engineering


58

<p class="u-text u-text-default u-text-2">Afifa Arif&nbsp;<br>Bse183101


</p>
<p class="u-text u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

4.4.2.7 Dataset.html

4.4.2.8 Dataset.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


59

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-2" id="sec-d531"
data-image-width="1600" data-image-height="900">
<div class="u-clearfix u-sheet">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">DataSet</h1>
<h3 class="u-text u-text-body-alt-color u-text-default u-text-
2">Dataset</h3>
<h3 class="u-text u-text-body-alt-color u-text-3">Disaster</h3>
<div class="u-align-center u-border-1 u-border-grey-90 u-custom-color-1 u-
form u-radius-50 u-form-1">
<form id="form" action="#" method="POST" class="u-clearfix u-form-custom-
backend u-form-horizontal u-form-spacing-19 u-inner-form" style="padding: 33px;"
source="custom" name="form" redirect-url="299242952" redirect-
address="dataSet.html" redirect="true">
<div class="u-form-group u-form-select u-form-group-1">
<label for="select-57b6" class="u-form-control-hidden u-
label"></label>
<div class="u-form-select-wrapper">
<select id="select-57b6" name="select" class="u-border-1 u-border-
grey-30 u-input u-input-rectangle">
<option class="mmd" value="mmd">Select Dataset</option>
<option class="mmd" value="mmd">Crisis MMD</option>
<option class="nlp" value="nlp">Crisis NLP</option>
</select>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="12"
version="1" class="u-caret"><path fill="currentColor" d="M4 8L0 4h8z"></path></svg>
</div>
</div>
<div id="form" class="u-form-group u-form-select u-form-group-2">

Capital University of Science and Technology, Islamabad Department of Software Engineering


60

<label for="select-6ab7" class="u-form-control-hidden u-


label"></label>
<div class="u-form-select-wrapper">
<select id="MMD" type="dropdown" name="select-1" class="u-border-1
u-border-grey-30 u-input u-input-rectangle" required="required"
autofocus="autofocus">
<option id="data" value="Disaster">Select Disaster</option>
<option id="data1" value="California Wildfires">California
Wildfires</option>
<option id="radiol" value="Sri Lanka Floods">Sri Lanka
Floods</option>
<option id="radiol" value="Hurricane Irma">Hurricane Irma</option>
<option id="radiol" value="Hurricane Harvey">Hurricane
Harvey</option>
<option id="radiol" value="Hurricane Maria">Hurricane
Maria</option>
<option id="radiol" value="Iraq–Iran Earthquake">Iraq–Iran
Earthquake</option>
<option id="radiol" value="Mexico Earthquake">Mexico
Earthquake</option>
</select>

<select id="NLP" type="dropdown" name="select-1" class="u-border-1


u-border-grey-30 u-input u-input-rectangle" required="required"
autofocus="autofocus">
<option id="data" value="Disaster">Select Disaster</option>
<option id="data2" value="Pakistan Earthquake">Pakistan
Earthquake</option>
<option id="radiol" value="Typhoon Hagupit">Typhoon
Hagupit</option>
<option id="radio" value="Chile Earthquake">Chile
Earthquake</option>
<option id="radio" value="Nepal Earthquake">Nepal
Earthquake</option>
<option id="radio" value="India Floods">India Floods</option>
<option id="radio" value="Cyclone">Cyclone</option>
</select>

</div>
</div>
</form>

</div>

Capital University of Science and Technology, Islamabad Department of Software Engineering


61

<a href="Feature_Extraction.html" class="u-active-palette-2-base u-border-


2 u-border-black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-
text-black u-text-hover-white u-btn-2"><span class="u-icon"></span>Next
</a>
<a href="ViewDataSetCFWF.html" id="btn_CFWF" class="u-border-2 u-border-
black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-text-hover-
custom-color-1 u-btn-3" >View Dataset<span style="font-size:
1.125rem;"></span></a>

<a href="PracticeAnotherDataSet.html" id="btn_data2" class="u-border-2 u-


border-black u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50 u-text-
hover-custom-color-1 u-btn-3" >View Dataset<span style="font-size:
1.125rem;"></span></a>

<a href="index.html" class="u-border-none u-btn u-btn-round u-button-style


u-custom-color-1 u-radius-50 u-btn-2">Back</a>

</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-


e74c"><div class="u-align-left u-clearfix u-sheet u-sheet-1">
<p class="u-text u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text u-text-default u-text-2">Afifa Arif&nbsp;<br>Bse183101
</p>
<p class="u-text u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

<script
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){

$('#NLP').hide();
$('#btn_data2').hide();
$('#btn_CFWF').hide();

Capital University of Science and Technology, Islamabad Department of Software Engineering


62

$('#select-57b6').change(function(){
var sv = $(this).val();

switch(sv){
case 'mmd':
$('#NLP').hide();
$('#MMD').show();
break;

case 'nlp':
$('#NLP').show();
$('#MMD').hide();
break;
}

})

$('#MMD').change(function(){
var sv2 = $(this).val();

switch(sv2){
case 'California Wildfires':
$('#btn_CFWF').show();
$('#btn_data2').hide();
break;

default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}
})

$('#NLP').change(function(){
var sv3 = $(this).val();

switch(sv3){
case 'Pakistan Earthquake':
$('#btn_CFWF').hide();
$('#btn_data2').show();
break;

Capital University of Science and Technology, Islamabad Department of Software Engineering


63

default:
$('#btn_data2').hide();
$('#btn_CFWF').hide();
break;
}

})
});
</script>

4.4.2.9 PakistanEarthquake.html

4.4.2.10 PakistanEarthquake.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

Capital University of Science and Technology, Islamabad Department of Software Engineering


64

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-section-1" id="sec-f9aa">
<div class="u-clearfix u-sheet u-sheet-1">
<h3 class="u-align-left u-text u-text-default u-text-1">Dataset
:&nbsp;Crisis NLP</h3>
<h3 class="u-align-left u-text u-text-default u-text-
2">Disaster:&nbsp;Pakistan Earthquake</h3>

<div class="container">
<div class="table-responsive">
<h1 align="center">Pakistan Earthquake 2013</h1>
<br />
<div align="center">
</div>
<br />
<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-
hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-1">&nbsp;Back
</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


65

<a href="Feature_Extraction.html" class="u-btn u-btn-round u-button-


style u-hover-palette-1-light-2 u-palette-1-base u-radius-2 u-btn-
2">Next&nbsp;</a>
<div id="employee_table">
</div>
</div>
</div>

<script>
$(document).ready(function(){
$.ajax({
url:"Pakistan_eq_CF.csv",
dataType:"text",
success:function(data)
{
var employee_data = data.split(/\r?\n|\r/);
var table_data = '<table class="table table-bordered table-striped">';
for(var count = 0; count<employee_data.length; count++)
{
var cell_data = employee_data[count].split(",");
table_data += '<tr>';
for(var cell_count=0; cell_count<cell_data.length; cell_count++)
{
if(count === 0)
{
table_data += '<th>'+cell_data[cell_count]+'</th>';
}
else
{
table_data += '<td>'+cell_data[cell_count]+'</td>';
}
}
table_data += '</tr>';
}
table_data += '</table>';
$('#employee_table').html(table_data);
}
});

});
</script>

<a href="Datasets.html" class="u-btn u-btn-round u-button-style u-hover-palette-1-


light-2 u-palette-1-base u-radius-2 u-btn-1">&nbsp;Back
</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


66

<a href="Feature_Extraction.html" class="u-btn u-btn-round u-button-style u-hover-


palette-1-light-2 u-palette-1-base u-radius-2 u-btn-2">Next&nbsp;</a>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80 u-footer" id="sec-


e74c"><div class="u-align-left u-clearfix u-sheet u-sheet-1">
<p class="u-text u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text u-text-default u-text-2">Afifa Arif&nbsp;<br>Bse183101
</p>
<p class="u-text u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

4.4.2.11 FeaturesExtraction.html

4.4.2.12 FeaturesExtraction.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">

Capital University of Science and Technology, Islamabad Department of Software Engineering


67

<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">


</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>

<section class=" u-image u-section-3" id="sec-7a43" data-image-width="1600"


data-image-height="900">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">Features
Extraction</h1>
<div class="u-custom-color-1 u-form u-form-1">
<form id="form" autocomplete="off" class=" u-form-spacing-10 u-form-
vertical" name="form-2" style="padding: 10px;" >
<div class="u-form-checkbox u-form-group u-form-group-1">
<input type="checkbox" id="checkbox-c8cf" class="checkbox" name="Lower
Case Consvesion" value="On">
<label for="checkbox-c8cf" class="u-label" >Low level Lexical
Features</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-2">

Capital University of Science and Technology, Islamabad Department of Software Engineering


68

<input type="checkbox" id="checkbox-16b0" class="checkbox"


name="checkbox-1" value="On">
<label for="checkbox-16b0" class="u-label">Systamatic Features</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-3">
<input type="checkbox" id="checkbox-902c" class="checkbox"
name="checkbox-2" value="On">
<label for="checkbox-902c" class="u-label">Top Fequency
Feature</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-5">
<input type="checkbox" id="checkbox-d2bf" name="checkbox-4"
value="On">
<label for="checkbox-d2bf" class="u-label">All</label>
</div>
<script type='text/javascript'>
$(document).ready(function(){
// Check or Uncheck All checkboxes
$("#checkbox-d2bf").change(function(){
var checked = $(this).is(':checked');
if(checked){
$(".checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
$(".checkbox").each(function(){
$(this).prop("checked",false);
});
}
});

// Changing state of CheckAll checkbox


$(".checkbox").click(function(){

if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-d2bf").prop("checked", true);
} else {
$("#checkbox-d2bf").prop("checked", false);
}
});
});
</script>
</form>

Capital University of Science and Technology, Islamabad Department of Software Engineering


69

</div>

<a href="Pre-Processing.html" id="btn_next" style="display: none;"


class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-
white u-btn-2">Next</a>
<a href="Datasets.html" id="btn_back" class="u-btn u-button-style u-
custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Back</a>
</div>

</section>

<script type="text/javascript">
$(document).ready(function(){

$('#form :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
}
})
});
</script>
<script>
var selectedValue = document.getElementById("form").value;
</script>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-sheet">


<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

Capital University of Science and Technology, Islamabad Department of Software Engineering


70

4.4.2.13 PreProcessing.html

4.4.2.14 PreProcessing.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preproces
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


71

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>

<section class="u-clearfix u-image u-section-4" id="sec-5d35" data-image-


width="1600" data-image-height="900">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class=" u-text-body-alt-color u-title u-text-1">Pre-Processing</h1>
<div class="u-custom-color-1 u-form u-form-1">
<form id="form" autocomplete="off" class=" u-form-spacing-10 u-form-
vertical" name="form-2" style="padding: 10px;" >
<div class="u-form-checkbox u-form-group u-form-group-1">
<input type="checkbox" id="checkbox-c8cf" class="checkbox" name="Lower
Case Consvesion" value="On">
<label for="checkbox-c8cf" class="u-label" >Lower Case
Consvesion</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-2">
<input type="checkbox" id="checkbox-16b0" class="checkbox"
name="checkbox-1" value="On">
<label for="checkbox-16b0" class="u-label">Remove Punctuation</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-3">
<input type="checkbox" id="checkbox-902c" class="checkbox"
name="checkbox-2" value="On">
<label for="checkbox-902c" class="u-label">Remove Numarical</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-4">
<input type="checkbox" id="checkbox-cd4e" class="checkbox"
name="checkbox-3" value="On">
<label for="checkbox-cd4e" class="u-label">Remove Unknown
Words</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-5">
<input type="checkbox" id="checkbox-d2bf" name="checkbox-4"
value="On">
<label for="checkbox-d2bf" class="u-label">All</label>
</div>
<script type='text/javascript'>
$(document).ready(function(){

Capital University of Science and Technology, Islamabad Department of Software Engineering


72

// Check or Uncheck All checkboxes


$("#checkbox-d2bf").change(function(){
var checked = $(this).is(':checked');
if(checked){
$(".checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
$(".checkbox").each(function(){
$(this).prop("checked",false);
});
}
});

// Changing state of CheckAll checkbox


$(".checkbox").click(function(){

if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-d2bf").prop("checked", true);
} else {
$("#checkbox-d2bf").prop("checked", false);
}
});
});
</script>
</form>
</div>
<a href="Train_Model.html" id="btn_next" style="display: none;" class="u-
btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-
btn-2">Next</a>
<a href="Feature_Extraction.html" id="btn_back" class="u-btn u-button-style
u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Back</a>
</div>
</section>

<script type="text/javascript">
$(document).ready(function(){

$('#form :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
}

Capital University of Science and Technology, Islamabad Department of Software Engineering


73

else{
$("#btn_next").hide();
// $("#btn_back").hide();
}
})
});
</script>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-


sheet">
<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>

</body>
<script>
var selectedValue = document.getElementById("form").value;
</script>
</html>

4.4.2.15 TrainModel.html

Capital University of Science and Technology, Islamabad Department of Software Engineering


74

4.4.2.16 TrainModel.html Code


<body class="u-body">
<header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf u-
header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>

<section class="u-clearfix u-image u-section-6" id="sec-f34a" data-image-


width="1600" data-image-height="900">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">Train Model</h1>
<h4 class="u-text u-text-white u-text-2">Evaluation Matrics</h4>
<h4 class="u-text u-text-white u-text-3">Validation Technique</h4>
<h4 class="u-text u-text-white u-text-4">ML Model</h4>
<div class="u-custom-color-1 u-form u-form-1">

Capital University of Science and Technology, Islamabad Department of Software Engineering


75

<form id="form1" class="u-clearfix u-form-spacing-10 u-form-vertical u-


inner-form" name="form-3" style="padding: 10px;">
<div class="u-form-group u-form-radiobutton u-form-group-3">
<div class="u-form-radio-button-wrapper">
<input type="radio" name="radiobutton" value="Support Vector
Machine">
<label class="u-label" for="radiobutton">10 Cross Validation
Technique</label>
<br>
<input type="radio" name="radiobutton" value="Hold-Out Validation
Technique">
<label class="u-label" for="radiobutton">Hold-Out Validation
Technique</label>
<br>
</div>
</div>
</form>
</div>
<div class="u-custom-color-1 u-form u-form-2">
<form id="form2" class="u-clearfix u-form-spacing-10 u-form-vertical u-
inner-form" name="form-3" style="padding: 10px;">
<div class="u-form-group u-form-radiobutton u-form-group-3">
<div class="u-form-radio-button-wrapper">
<input type="radio" name="radiobutton" value="Support Vector
Machine">
<label class="u-label" for="radiobutton">Support Vector
Machine</label>
<br>
<input type="radio" name="radiobutton" value="Random Forest">
<label class="u-label" for="radiobutton">Random Forest</label>
<br>
</div>
</div>
</form>
</div>
<div class="u-custom-color-1 u-form u-form-3">
<form id="form3" class="u-clearfix u-form-spacing-10 u-form-vertical u-
inner-form" name="form-3" style="padding: 10px;">
<div class="u-form-checkbox u-form-group u-form-group-5">
<input type="checkbox" id="checkbox-1719" class="checkbox"
name="checkbox-4" value="On">
<label for="checkbox-1719" class="u-label">Macro-recall</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-6">
<input type="checkbox" id="checkbox-e485" class="checkbox"
name="checkbox-1" value="On">

Capital University of Science and Technology, Islamabad Department of Software Engineering


76

<label for="checkbox-e485" class="u-label">Macro-precision</label>


</div>
<div class="u-form-checkbox u-form-group u-form-group-7">
<input type="checkbox" id="checkbox-442d" class="checkbox"
name="checkbox-2" value="On">
<label for="checkbox-442d" class="u-label">Macro-f1-score</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-8">
<input type="checkbox" id="checkbox-ff33" class="checkbox"
name="checkbox" value="On">
<label for="checkbox-ff33" class="u-label">Macro-Accuracy</label>
</div>
<div class="u-form-checkbox u-form-group u-form-group-8">
<input type="checkbox" id="checkbox-ff36" name="checkbox" value="On">
<label for="checkbox-ff36" class="u-label">All</label>
</div>
</form>
</div>
<script type='text/javascript'>
$(document).ready(function(){
// Check or Uncheck All checkboxes
$("#checkbox-ff36").change(function(){
var checked = $(this).is(':checked');
if(checked){
$(".checkbox").each(function(){
$(this).prop("checked",true);
});
}else{
$(".checkbox").each(function(){
$(this).prop("checked",false);
});
}
});

// Changing state of CheckAll checkbox


$(".checkbox").click(function(){

if($(".checkbox").length == $(".checkbox:checked").length) {
$("#checkbox-ff36").prop("checked", true);
} else {
$("#checkbox-ff36").prop("checked", false);
}

Capital University of Science and Technology, Islamabad Department of Software Engineering


77

});
});
</script>
<a href="Some_Massage_TeeHee.html" id="btn_train" style="display: none;"
class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-
white u-btn-4">Train</a>
<a href="Display_Results.html" id="btn_next" style="display: none;"
class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-black u-text-hover-
white u-btn-5">View Results</a>
<a href="Pre-Processing.html" id="btn_back" class="u-btn u-button-style u-
custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Back</a>
<!-- <a href="Weighted_Method.html" data-page-id="782507417" id="btn_back"
class="u-border-none u-btn u-btn-round u-button-style u-custom-color-1 u-radius-50
u-btn-2">Back</a> -->
</div>
</section>

<script type="text/javascript">
$(document).ready(function(){

$('#form1 :radio').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>

<script type="text/javascript">
$(document).ready(function(){

$('#form2 :radio').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{

Capital University of Science and Technology, Islamabad Department of Software Engineering


78

$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>

<script type="text/javascript">
$(document).ready(function(){

$('#form3 :checkbox').change(function(){
if($(this).is(':checked')){
$("#btn_next").show();
// $("#btn_back").show();
$("#btn_train").show();
}
else{
$("#btn_next").hide();
// $("#btn_back").hide();
$("#btn_train").hide();
}
})
});
</script>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-sheet">


<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>

</body>
</html>

Capital University of Science and Technology, Islamabad Department of Software Engineering


79

After Model is Train We can click on test model

Code
<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu u-menu-dropdown u-offcanvas u-menu-1">
<div class="menu-collapse" href="#">
</div>

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preprocessing</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


80

</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"


style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>
</div>

</nav>
</header>
<section class="u-align-center u-clearfix u-image u-section-1"
id="carousel_00ee" >

<div class="u-clearfix u-sheet-1">


<h1 class="u-text-body-alt-color u-text-1" >Damage Tweet Assessment</h1>
<a href="Datasets.html" class="u-border-2 u-border-white u-btn u-button-
style u-hover-white u-btn-1">Train Model</a>
<a href="Test_Model.html" class="u-border-2 u-border-white u-btn u-button-
style u-hover-white u-btn-1">Test Model</a>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-


sheet">
<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>

</body>
</html>

Capital University of Science and Technology, Islamabad Department of Software Engineering


81

4.4.2.17 TestModel.html

4.4.2.18 TestModel.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu-1">

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preproces
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>
</li></ul>

Capital University of Science and Technology, Islamabad Department of Software Engineering


82

</div>

</nav>
</header>

<section class="u-clearfix u-image u-section-8" id="sec-0605" data-image-


width="1600" data-image-height="900">
<div class="u-clearfix u-sheet u-sheet-1">
<h1 class="u-text u-text-body-alt-color u-title u-text-1">Test Model</h1>
<div class="u-form u-form-1">
<form action="#" method="POST" class="u-clearfix u-form-spacing-10 u-
form-vertical u-inner-form" source="custom" name="form-4" style="padding: 10px;">
<div class="u-form-group u-form-message">
<label for="message-193a" class="u-form-control-hidden u-
label"></label>
<textarea placeholder="Tweet Placement" rows="7" cols="50"
id="message-193a" name="message" class="u-gradient u-input u-input-rectangle u-
input-1" required=""></textarea>
</div>

</form>
</div>
<a href="" class="u-btn u-button-style u-custom-color-1 u-radius-50 u-text-
black u-text-hover-white u-btn-2">Predict</a>
<a href="index.html" data-page-id="782507417" class="u-btn u-button-style
u-custom-color-1 u-radius-50 u-text-black u-text-hover-white u-btn-2">Go Back</a>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-


sheet">
<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>
</body>
</html>

Capital University of Science and Technology, Islamabad Department of Software Engineering


83

4.4.2.19 AboutUs.html

4.4.2.20 AboutUs.html Code


<body data-home-page="Index.html" data-home-page-title="Index" class="u-
body"><header class="u-clearfix u-custom-color-1 u-header u-sticky u-sticky-decf
u-header" id="sec-781b"><a class="u-image u-logo u-image-1" data-image-width="1687"
data-image-height="1687">
<img src="images/Twitter.png" class="u-logo-image u-logo-image-1">
</a>
<nav class="u-menu-1">

<div class="u-custom-menu u-nav-container">


<ul class="u-nav u-spacing-2 u-unstyled u-nav-1">
<li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-
90" href="index.html" style="padding: 10px 14px;">Home</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Data Sets</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Feature Extraction</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Preproces
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Train Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Display Result</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
style="padding: 10px 14px;">Test Model</a>
</li><li class="u-nav-item"><a class="u-hover-palette-1-light-1 u-text-grey-90"
href="About.html" style="padding: 10px 14px;">About</a>

Capital University of Science and Technology, Islamabad Department of Software Engineering


84

</li></ul>
</div>

</nav>
</header>

<section class="u-clearfix u-image u-section-9" id="sec-398b" data-image-


width="1600" data-image-height="900">
<div class="u-clearfix u-sheet u-sheet-1">
<div class="fr-view u-align-center u-clearfix u-hover-feature u-rich-text
u-text u-text-1">
<h1 style="text-align: center;">
<span class="u-text-body-alt-color">About Us</span>
</h1>
<p style="text-align: center;">
<span class="u-text-body-alt-color">Detecting the damage assessment
tweets is beneficial to both humanitarian organizations and victims during a
disaster. Most of the previous works that identify tweets during a disaster have
been related to situational information, availability/requirement of resources,
infrastructure damage, etc.&nbsp;</span>
<span style="line-height: 2.0;">
<img src="images/DamageAssessment.jpg" align ="center" style="width:
583px;" class="fr-dib fr-fic" width="570">
<span class="u-text-body-alt-color">There are only a few works focused
on detecting the damage assessment tweets. In this paper, a novel method is proposed
for identifying the damage assessment tweets during a disaster. Our proposed method
effectively utilizes the low-level lexical features, top-most frequency word
features, and syntactic features that are specific to damage assessment. These
features are weighted by using simple linear regression and Support Vector
Regression (SVR) algorithms. Later, the random forest technique is used as a
classifier for classifying the tweets. We experimented on 14 standard disaster
datasets of different categories for binary and multi-class classification. The
proposed method gives an accuracy of 94.62% for detecting the damage assessment
tweets. Most importantly, the proposed method can be applied in a situation where
enough labeled tweets are not available and also when specific disaster type tweets
are not available. This can be done by training the model with past disaster
datasets. Our proposed model is trained on datasets such as (i) combination of
earthquake disaster datasets (ii) combination of old earthquake disaster datasets,
and (iii) combination of old diverse disaster datasets and tested on the other
datasets in the cross-domain scenario. The proposed approach is also compared with
state of-the-art approaches, both in-domain and cross-domain, for binary and multi-
class classification. The proposed method has improved up to 37.12% accuracy
compared with the existing methods. &nbsp;</span>

Capital University of Science and Technology, Islamabad Department of Software Engineering


85

</span>
</p>
<a href="index.html" data-page-id="782507417" class="u-border-none u-btn
u-btn-round u-button-style u-custom-color-1 u-radius-50 u-btn-2">Back</a>
</div>
</div>
</section>

<footer class="u-align-center u-clearfix u-footer u-grey-80" ><div class="u-


sheet">
<p class="u-text-default u-text-1">Muhammad Omer Sahid<br>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; Bse183117
</p>
<p class="u-text-default u-text-2">Afifa Arif<br>Bse183101
</p>
<p class="u-text-default u-text-3">Wajih Zain<br>Bse183142
</p>
</div></footer>

</body>
</html>

5 Software Testing

This chapter provides a description about the adopted testing procedure. This includes the selected
testing methodology, test suite and the test results of the developed software.

5.1 Testing Methodology


After implementation, the process flow manager is tested for functional errors. We are going to do
Black Box Testing (by passing random selected values and mapping it against the expected output
in a normal flow), Unit and Integration Testing which is the testing of the functional requirements
implemented in our system without regard to code.

Capital University of Science and Technology, Islamabad Department of Software Engineering


86

The test cases are done manually without the use of any tool.

5.2 Test Cases

5.2.1 Homepage testcase

Table 6: Homepage testcase

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Home page Test ID: 1
Version: 1 Test Type: Black Box Testing
Input

Select any option (button click)

Expected Output

Selected option should be displayed

Actual Output

Page displayed

Expected Exception

System not responding

5.2.2 Select train model testcase

Table 7: Select train model testcase

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Train model Test ID: 2
Version: 1 Test Type: Black Box Testing
Input

Select Train model

Capital University of Science and Technology, Islamabad Department of Software Engineering


87

Expected Output

System display datasets to be selected.

Actual Output

Datasets displayed.

Expected Exception

System not responding

5.2.3 Select dataset testcase 1

Table 8: Select dataset testcase 1

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Select Dataset Test ID: 3
Version: 1 Test Type: Black Box Testing
Input

Select Crisis NLP csv file

Expected Output

Dataset should be selected

Actual Output

Dataset selected

Expected Exception

Corrupt csv file

5.2.4 Select dataset testcase 2

Table 9: Select dataset testcase 2

Date: 2/23/22
System: Identify Damage Assessment Tweet

Capital University of Science and Technology, Islamabad Department of Software Engineering


88

Objective: Select Dataset Test ID: 4


Version: 1 Test Type: Black Box Testing
Input

Select Crisis MMD csv file

Expected Output

Dataset should be selected

Actual Output

Dataset selected

Expected Exception

Corrupt csv file

5.2.5 Select disaster testcase


Table 10: Select disaster testcase

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Select disaster Test ID: 5
Version: 1 Test Type: Black Box Testing
Input

Select one disaster type

Expected Output

Disaster type should be selected

Actual Output

Disaster type selected

Expected Exception

System not responding

Capital University of Science and Technology, Islamabad Department of Software Engineering


89

5.2.6 View Dataset


Table 11: View dataset

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: View dataset Test ID: 6
Version: 1 Test Type: Black Box Testing
Input

View dataset button click

Expected Output

Dataset should be displayed

Actual Output

Dataset displayed

Expected Exception

System not responding

5.2.7 Select Feature Extraction testcase 1

Table 12: Feature Extraction testcase1

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply features extraction technique Test ID: 7
Version: 1 Test Type: Black Box Testing
Input

Select Top Frequency features

Expected Output

System extracts Top Frequency features from dataset

Capital University of Science and Technology, Islamabad Department of Software Engineering


90

Actual Output

Top Frequency features extracted from dataset.

Expected Exception

System not responding

5.2.8 Select feature extraction testcase 2

Table 13: Feature Extraction testcase2

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply features extraction technique Test ID: 8
Version: 1 Test Type: Black Box Testing
Input

Select Syntactic features

Expected Output

System extracts Syntactic features from dataset

Actual Output

Syntactic features extracted from dataset.

Expected Exception

System not responding

5.2.9 Select Preprocessing technique testcase

Table 14: Preprocessing technique

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply preprocessing technique Test ID: 9

Capital University of Science and Technology, Islamabad Department of Software Engineering


91

Version: 1 Test Type: Black Box Testing


Input

Select All preprocessing techniques

Expected Output

System apply All preprocessing techniques on dataset

Actual Output

All preprocessing techniques applied on selected dataset.

Expected Exception

System not responding

5.2.10 Select ML model testcase


Table 15: ML Model testcase

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply ML model Test ID: 10
Version: 1 Test Type: Black Box Testing
Input

Select Random forest model.

Expected Output

System apply Random forest model on dataset

Actual Output

Random forest model applied on selected dataset and user will be able to select evaluation
metrics method.

Expected Exception

System not responding

Capital University of Science and Technology, Islamabad Department of Software Engineering


92

5.2.11 Select Evaluation metrics testcase 1


Table 16: Evaluation Metrics testcase1

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Evaluation metrics Test ID: 11
Version: 1 Test Type: Black Box Testing
Input

Select Accuracy

Expected Output

System apply Accuracy method on dataset

Actual Output

Accuracy method applied on selected dataset and user will be able to select validation
technique.

Expected Exception

System not responding

5.2.12 Select Validation technique testcase 1

Table 17: Validation Technique testcase 1

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Validation technique Test ID: 12
Version: 1 Test Type: Black Box Testing
Input

Select 10-fold cross method

Expected Output

System apply 10-fold cross method on selected dataset

Capital University of Science and Technology, Islamabad Department of Software Engineering


93

Actual Output

10-fold cross method applied on dataset and user will be able to train the model.

Expected Exception

System not responding

5.2.13 Select Validation technique testcase 2

Table 18: Validation Technique testcase 2

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Apply Validation technique Test ID: 13
Version: 1 Test Type: Black Box Testing
Input

Select Hold-out method

Expected Output

System apply Hold-out method on selected dataset

Actual Output

Hold-out method applied on dataset and user will be able to train the model.

Expected Exception

System not responding

5.2.14 Display Result


Table 19: Display results

Date: 2/23/22
System: Identify Damage Assessment Tweet
Objective: Display Result Test ID: 14
Version: 1 Test Type: Black Box Testing
Input

Capital University of Science and Technology, Islamabad Department of Software Engineering


94

Click train model button

Expected Output

Result should be display to the user.

Actual Output

Result displayed.

Expected Exception

System not responding

Capital University of Science and Technology, Islamabad Department of Software Engineering

You might also like