CONTENTS
DETAILS PAGE NO
ABSTRACT 6
1: INTRODUCTION
1.1 Definition 7
1.2 Characteristics 8
2: SYSTEM ANALYSIS
2.1 Existing System 9
2.2 Proposed System 10
2.3 Hardware Requirements 11
2.4 Software Requirements 11
3: SYSTEM STUDY 12
4: SYSTEM DESIGN
4.1 System Architecture 14
4.4 UML Concepts 16
5: IMPLEMENTATION
5.1 Modules 20
5.2 Source Code 25
6: SCREENSHOTS 51
7: SYSTEM TESTING 56
8: CONCLUSION 60
9: REFERENCES 61
ABSTRACT
Social networking sites have been now employed as a source of information for detection of events with particular reference to road traffic and accidents. In this paper, we present a real-time system for monitoring traffic detection from Twitter stream analysis. The system fetches status tweets from Twitter according to the action of the user and taking in account of several search criteria; processes tweets by applying text mining techniques and finally performs the classification of different updated tweets.
The main ambition of the system is to assign the appropriate class label to each tweet, as related to a trafficrelated events or not. The traffic detection system was firstly employed for real-time monitoring of several areas of the Italian road network, allowing for detection of traffic events almost in real time, often before the news came up online through traffic related news web sites. We employed the Support Vector Machine (SVM) as a classification model, and we achieved a good accuracy value by solving a binary classification (traffic versus non-traffic tweets) by work of data mining. We were also able to discriminate whether traffic is caused by an external event or not, by solving of a multiclass classification problem and obtaining by word having a good accuracy value of 96%.
Only the traffic related tweets will be processed and then will be sent to the respective emails of the people existing in the created database. They will get the complete tweet including the information of location written by user in it.
Social networking service is a service which “focuses on the construction and verification of online social networks for different communities of people who share interests and activities, or who are well interested in exploring the different interests and activities of others, and which necessitates the main use of software.”
One report which was put up by OCLC provides the definition of social networking sites ”Web sites are primarily designed mainly to work on the facilitation of interaction between users who openly share interests, attitudes and activities, such as Snapchat, Facebook, Instagram and MySpace.”
Social networking is capable enough to provide a wide range of benefits to working members of any organization:
Supports learning: Social networking will enhance informal learning techniques and support social connections within groups of learners and with them who provide the support for learning.
Support for the members of an organization: Social networking can be used be used my all members of any organization, and not just those who are involved in working with students. Social networks can help the development of different communities of practice.
Engaging in activities with others: Good use of social networks can provide us with some valuable business intelligence and gain valuable feedback on institutional services.
Very friendly access to information and applications: The ease of usage of many social networking services can be used to provide good benefits to users by simplifying of access to other tools and applications. The now very well established Facebook Platform provide fine example of how social networking service can be used as an environment for usage of numerous other tools.
The Common interface: A very possible benefit of social networking may turn out to be the common interface which limits the work and the social boundaries. Since all such services have been often used in a personal capacity this has been minimizing the training and endured support needed to gain the services professionally. This however can be a barrier for those who wish to have of strict boundaries between the socializing activities and work.
Characteristics
Here are some Examples of popular social networking services include:
Facebook: Facebook is a ever developing social networking Web site that has been very well equipped to allow people to communicate with their friends and share information in numerous ways. In May 2007 Facebook launched the Facebook Platform and an app which provides a framework for developers to well interact with the Facebook features.
MySpace: A Social networking Web site which offers an interactive, user-related network of friends, personal profile or account and groups, generally used for sharing user’s photos, music and videos.
Instagram: One online platform for posting different pictures socially communicating with people and posting stories of our current whereabouts. It has now been very popular along with facebook.
Twitter: Twitter is an example of a micro-blog servicing sector. Twitter can be further used in variety of ways sharing information with users and providing good support for friends.
This list of popular social networking services is after omitting some popular social sharing services available such as You Tube and Linked IN.
The gaining popularity and ease of usage of the social networking sites have exicted different types of universities and institutions with their ability and potential in variety of areas and their tremendous work rate. However more effectiveness of the usage of the social networks have a number of challenges in technical fields and issues such as copyrights, privacy and access.
.
2.0 SYSTEM ANALYSIS
2.1. EXISTING SYSTEM:
In Italy people haveused Twitt related streams to detect earthquakes and typhoon activities, by monitoring special triggering-keywords spared in the database, and by applying an Simple Vector Machines(SVM) as a binary classifier of positive events (earthquakes and typhoons) and also the different negative events (non-events or other events).Mr. Agarwal didmainly had his focus on the detection of fire accidents in a factory from stream analysis of twitter, by the use of NLP techniques and a Naive Bayes (NB) classifier.
THE DISADVANTAGES OF EXISTING SYSTEM:
2.2 PROPOSED SYSTEM:
THE ADVANTAGES OF PROPOSED SYSTEM:
SYSTEM REQUIREMENTS:
2.3. HARDWARE REQUIREMENTS:
2.4. SOFTWARE REQUIREMENTS:
3.0 SYSTEM STUDY
PROJECT FEASIBILITY STUDY-
The feasibility of the project is analyzed in this particular phase and the business proposal is put forward with a general plan for this project and some estimation of costs. During the system analysis the feasibility of the proposed system needs to be carried out to make sure that this proposed system will nt be any burden to a company. The understanding of major requirements for the system is a must for the feasibility analysis.
The three key considerations which are involved in the feasibility analysis study are-
THE ECONOMIC FEASIBILITY
This economic feasibility study is carried out to check the impact that the system will have on the organization. The amount of expected fund that a company can pay in the research of the system and also its development is limited. The expenditures must be shown and justified. Hence the developed system which is also within the budget was achieved only because most of the technologies are easily available. The products only which are customized had to be purchased.
This type of study is carried out to check the technical feasibility, the technical part of requirements of the system.
Any system that is developed must not have a high amount of demands on the technical resources available. This leads to higher demands on the available technical resources. This leads to higher demands being placed on the client forum. The developed system must have a minimum requirement, as only very few or none of the changes are required for the implementation of this particular system.
THE SOCIAL FEASIBILITY
The main aspect of studying this type of field is to check the level of acceptance that is done by user of a particular system. This also including the process of training the user for the usage of the system in a proper manner. The user must not feel threatened to the way how it works and instead must be accepted as a necessity. The level of confidence by the users solely depends on the methods that are employed to educate the user about the system and to make him familiar with this. The raise in the level of confidence makes sure that he is able to make some constructive criticism, which is further welcomed as he is the final user of the system.
4. SYSTEM DESIGN
4.1. SYSTEM ARCHITECTURE:
DATA FLOW DIAGRAM:
Friend Request
CLIENTS
LOGIN
Follow Friends
TWEETS
New Tweet
Check Traffic Tweet
Pre-processing
Filter the Tweet
Send Alert to Friends
4.2.UML DIAGRAMS
UML stands for Unified Modeling Language, which is a modeling language related to general purpose. This is used in the field of object oriented software engineering. The standard of it was first managed and then created by the object management group.
The main goal of the UML is to become a very commonly used language for creating models of object oriented design in computers. In its current form UML is of two major components, one is a Meta-model and other is a notation. In the upcoming future process may also be linked with Unified Modeling Language (UML).
The Unified Modeling Language is a standardized scale for specification, visualization, construction and documentation of the artifacts of the software system, as well as for modeling in business and non-software systems.
It is a collection of best engineering practices that have been proven successful in the large and complex system modeling.
UML mostly uses a type of graphical notation to denote different types of software products.
GOALS:
The Primary goals in the UML design:-
USE CASE DIAGRAM:
A use case diagram in the Unified Modeling Language (UML) is a type of behavioral diagram which is defined and created from a Use-case analysis. The main purpose is to present a graphical overview of the functionality which is provided by as system in terms of actors, their goals and dependencies between those use cases. The roles of the actors can be changed.
Login
Friends List
Follow Friends
Tweets
New Tweets
Pre Process
Filter Twitter
Alert to email
CLASS DIAGRAM:
A class diagram in the Unified Modeling Language (UML) is a static structure diagram that gives the description of the structure showing system’s classes and attributes along with the relationships among the classes. It explains which class contains information. A type of static structure diagram that gives the description of the structure of a system by outlining the system’s classes, attributes, methods, and the relationship between the classes. It explains which class has required information.
USER 1
USER n
Login
Login
Tweets ()
Follow Friends ()
New Tweet ()
Filter Tweet ()
Alert to Email ()
Tweets ()
Follow Friends ()
New Tweet()
Filter Tweet ()
Alert to Email ()
SEQUENCE DIAGRAM:
A sequence diagram in Unified Modeling Language (UML) is a kind of interaction type of diagram that shows how to operate with one another and in what sort of order. It is a construction of a Message Sequence Chart. Sequence diagrams sometimes are called as event diagrams, event scenarios, and timing diagrams.
5.1. MODULES:
MODULES DESCSRIPTION:
The Fetch of Status Update Messages (SUMs) and pre-processing
The first module extracts raw tweets from the stream which are based on one or more criteria i.e. geographical locations, keywords which appear in the text of the tweet. Each fetched raw tweet will contain the user Id, the time and text of the tweet along with are tweeting option available. In this paper the text may add some additional information such as hash tags, mentions etc. In this paper the tweets from the Italian road network are taken into account for processing. However the system can easily adapt to cope up with different languages. After the Status has been updated the status update messages are fetched according to the search criteria and pre-processed. After the processing of the SUMs, in order to extract the tweets of ech rae tweet and remove all meta related information associated with it. The meta information discarded are: user id, time, hash tags, links and special characters. Finally, the texts are converted with all characters to lower case. At the end of the process, each SUM is appeared as a string which is a sequence of characters..
The Elaboration of SUMs
The second processing module, “Elaboration of Status Update Messages”, is devoted to transforming the set of pre-processed different SUMs, i.e. a set of few strings, which are placed in a numeric manner which will be elaborated in a set of numeric vectors to be elaborated by this module. The aim is to apply some text mining techniques in the applied sequential manner to the pre-processed Status Update Messages. The modules are described in 3 forms-
To this aim, some text mining techniques are applied in sequence to the pre-processed SUMs. In the following, the 3 text mining steps performed in this module are described in detail: tokenizationis the first step where messages which are updated are converted into processing units called tokens. The second one which is stop word filtering consists in eliminating the stop words like conjunctions, prepositions, pronouns etc. This simplifies the text and minimizes the length of the status update message. Stemming is the process of reduction of each word to its root by removing the suffix. The main purpose of this is to group words with the same thing having related semantics.
Classification of SUMs
In The third module, each elaborated Status Updated Message (SUM) has a class label related to traffic events. Therefore, the output of this classification module is a collection of labeled SUMs. To the aim of labeling each SUM, a classification model is employed. The parameters of the classification model have been identified during learning stage. Actually, as it will be discussed, different classification models have been compared. The classifier that achieved the most accurate results was finally employed for the real-time monitoring with the proposed traffic detection system in this paper. This system continuously monitors a specific region and notifies the presence of a traffic event on the basis of a set of rules that can be defined by the system administrator. For example, when the first tweet is recognized as a traffic-related tweet, the system may send a warning signal. Now, the actual notification of the traffic event may be sent after the identification of a certain number of tweets bearing the same label.
Setup of the System
As stated previously, a supervised learning stage is required to perform the setup of the system. In particular, we need to identify the set of relevant stems, the weights associated with each of them, and the parameters that describe the classification models. We employ a collection of labeled SUMs (status update messages) as training set. During the learning stage, each SUM is elaborated by applying the tokenization, stop-word filtering, and stemming techniques. Therefore, the tweets were manually the tweets labeled with 2 class labels which are related to road traffic. In detail, we read, interpreted and assigned a traffic class label to each candidate having a Traffic class tweet.
INPUT DESIGN
Input design module is is the link between the information system and the user who operates. It consists of a developing specification and the procedures for the preparation of the data and the steps which necessary in putting a transaction data in to a usable form for the processing can be achieved by inspecting the computer to read the data from a written or a printed document occurring by people putting the data directly into the system. The design of the input focuses on controlling the errors and avoiding delay or avoiding any extra steps. This keeps the process simple. The input is designed in such a way that it provides security and ease of use with the retention of privacy.
OBJECTIVES
1. Input Design is the process of conversion of a user-oriented description to a computer based system. This design is important as it is effective in avoiding errors in a data input processing and showing the correct way for getting correct information from a computerized running system.
2. This is achieved by the creation of user-friendly screens for the type of data entered in order to handle large amount of data. The goal of this design input is to make the entry of the data easier and to be completely free from any errors. The design of the data entry screen has been done in a way that all the data based manipulates can be performed also providing recorded viewing facilities. It is achieved by creating user-friendly screens for the data entered to handle large volume of data. The goal of designing input is to make data entry easier and to be free from errors. The design of the data entry screen is done in such a way that all the data manipulates can be performed. It also provides us with record viewing facilities.
3. After the entry of the data, a check will be done for its validity. Data will be entered with the help of screens. User has been provided with appropriate messages so that he will not be in a maze of instant. So, the main objective is to create an easy guiding input layer. The data is entered it will check for its validity. Data is entered with the help of screens. The messages are appropriately provided so that the user won’t be in maze. The main object is to create an easier guiding input layout.
OUTPUT DESIGN
A quality output is something that meets all the requirements of the end user and does the presentation of the information clearly. The results in any output design are mainly communicated with the user and to other systems with the use of outputs. There is an immediate need of information and hard copy output in the output design. The system’s relationship will help a user’s decision making if it has an effective and intelligent output design.
1. Designing a computer output should be processed in a well thought out and in an organized manner. The development of the right output is done so that people will find the system efficient and easily used. The specific output needed to meet requirements is analyzed in the analysis design.
2. It selects the methods for the information presentation.
3. All the information related documents or report produced by the system must be created.
The output of information system should fulfill one of more of these following objectives.
5.2.SOURCE CODE
MODULES:
WEB PAGES:-
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Sign Up</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/contact-form.css”>
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script src=”js/TMForm.js”></script>
<script src=”js/modal.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</script>
<!–[if lt IE 8]>
<div style=’ clear: both; text-align:center; position: relative;’>
</a>
</div>
<![endif]–>
<![if lt IE 9]>
<script src=”js/html5shiv.js”></script>
<link rel=”stylesheet” media=”screen” href=”css/ie.css”>
<![endif]–>
</head>
</body>
B. SIGN IN
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Sign In</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/contact-form.css”>
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script src=”js/TMForm.js”></script>
<script src=”js/modal.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</script>
<!–[if lt IE 8]>
<div style=’ clear: both; text-align:center; position: relative;’>
</a>
</div>
<![endif]–>
<!–[if lt IE 9]>
<script src=”js/html5shiv.js”></script>
<link rel=”stylesheet” media=”screen” href=”css/ie.css”>
<![endif]–>
</head>
<body>
C.WELCOME USER
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Home</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</head>
D. Index
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Home</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</script>
<!–[if lt IE 8]>
<div style=’ clear: both; text-align:center; position: relative’>
</a>
</div>
<![endif]–>
<!–[if lt IE 9]>
<script src=”js/html5shiv.js”></script>
<link rel=”stylesheet” media=”screen” href=”css/ie.css”>
<![endif]–>
</head>
<body>
E. Follow friend
<%@page import=”DbPack.DatabaseConnection”%>
<%@page import=”java.sql.ResultSet”%>
<%@page import=”java.sql.Statement”%>
<%@page import=”java.sql.Connection”%>
String get = request.getQueryString();
String[] full = get.split(“,”);
String fname = full[0];
String fid = full[1];
System.out.print(fname);
System.out.print(fid);
String user_name = session.getAttribute(“name”).toString();
// EmailFinder e = new EmailFinder();
String key = null;
String email = null;
Connection con = DatabaseConnection.getCon();
Statement st1 = con.createStatement();
Statement st = con.createStatement();
boolean b = st.execute(“insert into friends values(‘0’, ‘”+user_name+”‘, ‘”+fid+”‘, ‘”+fname+”‘)”);
System.out.println(b)
if(b){
response.sendRedirect(“friends.jsp?msg=removed_failed..!”);
}else{
response.sendRedirect(“friends.jsp?msg=Added_successfully”);
}
F.FRIENDS
<%@page import=”java.sql.ResultSet”%>
<%@page import=”java.sql.DriverManager”%>
<%@page import=”java.sql.Statement”%>
<%@page import=”java.sql.Connection”%>
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Home</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({}); });
</script>
</head>
</body>
G. Friends list
<%@page import=”java.sql.ResultSet”%>
<%@page import=”java.sql.DriverManager”%>
<%@page import=”java.sql.Statement”%>
<%@page import=”java.sql.Connection”%>
<!DOCTYPE html>
<html lang=”en”>
<head>
<title>Home</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</script>
>
</head>
<body>
H. Remove Friend
<%@page import=”DbPack.DatabaseConnection”%>
<%@page import=”java.sql.ResultSet”%>
<%@page import=”java.sql.Statement”%>
%@page import=”java.sql.Connection”%
%>
String get = request.getQueryString();
String[] full = get.split(“,”);
String fname = full[0];
String fid = full[1];
System.out.print(fname);
System.out.print(fid);
String user_name = session.getAttribute(“name”).toString();
// EmailFinder e = new EmailFinder();
String key = null;
String email = null;
Connection con = DatabaseConnection.getCon();
Statement st1 = con.createStatement();
Statement st = con.createStatement();
boolean b = st.execute(“delete from friends where username = ‘”+user_name+”‘ and friends =’”+fid+”‘”);
System.out.println(b)
if(b){
response.sendRedirect(“friendlist.jsp?msg=removed_failed..!”);
}else{
response.sendRedirect(“friendlist.jsp?msg=removed_successfully=’”+fname+”‘”);
}
// System.out.println(“Error found to sending mail..!”);
// response.sendRedirect(“adminpage.jsp?mailf=public key send fails..!”);
I.Twitts
<title>Twitter</title>
<meta charset=”utf-8″>
<meta name=”format-detection” content=”telephone=no” />
<link rel=”icon” href=”https://images.ukdissertations.com/18/favicon.ico”>
<link rel=”shortcut icon” href=”https://images.ukdissertations.com/18/favicon.ico” />
<link rel=”stylesheet” href=”css/contact-form.css”>
<link rel=”stylesheet” href=”css/style.css”>
<script src=”js/jquery.js”></script>
<script src=”js/jquery-migrate-1.1.1.js”></script>
<script src=”js/jquery.easing.1.3.js”></script>
<script src=”js/script.js”></script>
<script src=”js/superfish.js”></script>
<script src=”js/jquery.equalheights.js”></script>
<script src=”js/jquery.mobilemenu.js”></script>
<script src=”js/tmStickUp.js”></script>
<script src=”js/jquery.ui.totop.js”></script>
<script src=”js/TMForm.js”></script>
<script src=”js/modal.js”></script>
<script>
$(window).load(function(){
$().UItoTop({ easingType: ‘easeOutQuart’ });
$(‘#stuck_container’).tmStickUp({});
});
</script>
J.Remove Twitt
<%@page import=”DbPack.DatabaseConnection”%>
<%@page import=”java.sql.ResultSet”%>
<%@page import=”java.sql.Statement”%>
<%@page import=”java.sql.Connection”%>
<%
String get = request.getQueryString();
String[] full = get.split(“,”);
String fname = full[0];
String fid = full[1];
System.out.print(fname);
System.out.print(fid);
// EmailFinder e = new EmailFinder();
String key = null;
String email = null;
Connection con = DatabaseConnection.getCon();
Statement st1 = con.createStatement();
Statement st = con.createStatement();
boolean b = st.execute(“delete from twitts where id = ‘”+fname+”‘ and uname =’”+fid+”‘”);
System.out.println(b);
if(b){
response.sendRedirect(“welcome_user.jsp?msg=removed_failed..!”);
}else{
response.sendRedirect(“welcome_user.jsp?msg=removed_successfully=’”+fname+”‘”);
}
// System.out.println(“Error found to sending mail..!”);
// response.sendRedirect(“adminpage.jsp?mailf=public key send fails..!”);
Execution modules
A.CHECK
Checks the web page and notifies faults
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class check extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType(“text/html;charset=UTF-8”);
PrintWriter out = response.getWriter();
try {
out.println(“<html>”);
out.println(“<head>”);
out.println(“<title>Servlet check</title>”);
out.println(“</head>”);
out.println(“<body>”);
out.println(“<h1>Servlet check at ” + request.getContextPath() + “</h1>”);
out.println(“</body>”);
out.println(“</html>”);
} finally {
out.close();
}}
B. Database
Connects the existing database values
package DbPack;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class DatabaseConnection {
public static Connection getCon(){
Connection con=null;
try {
Class.forName(“com.mysql.jdbc.Driver”);
con = DriverManager.getConnection(“jdbc:mysql://localhost:3306/traffic_from_twitter”,”root”,”root”);
System.out.println(“connected…..”);
} catch (ClassNotFoundException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
}
return con;
}
}
C. Index Wrapper
package action;
public class IndexWrapper {
private int start;
private int end;
public IndexWrapper(int start, int end) {
this.start = start;
this.end = end;
}
public int getEnd() {
return end;
}
public int getStart() {
return start;
}
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + end;
result = prime * result + start;
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
IndexWrapper other = (IndexWrapper) obj;
if (end != other.end)
return false;
if (start != other.start)
return false;
return true;
}
}
D. Database connection
Connects the web page and the database
package DbPack;
import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;
public class DatabaseConnection {
public static Connection getCon(){
Connection con=null;
try {
Class.forName(“com.mysql.jdbc.Driver”);
con = DriverManager.getConnection(“jdbc:mysql://localhost:3306/traffic_from_twitter”,”root”,”root”);
System.out.println(“connected…..”);
} catch (ClassNotFoundException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(DatabaseConnection.class.getName()).log(Level.SEVERE, null, ex);
}
return con;
}
}
E. Twitts
Processes the twitts in order with the code words struck and traffic
package action;
import DbPack.TrippleDes;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpSession;
public class twitts extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException, SQLException {
response.setContentType(“text/html;charset=UTF-8”);
PrintWriter out = response.getWriter();
try {
String timeslot = null;
String twitts = request.getParameter(“twitts”);
HttpSession session = request.getSession();
String name = session.getAttribute(“name”).toString();
;
System.out.println(twitts);
WholeWordIndexFinder finder = new WholeWordIndexFinder(twitts);
List<IndexWrapper> indexes = finder.findIndexesForKeyword(“traffic”);
List<IndexWrapper> indexes1 = finder.findIndexesForKeyword(“Traffic”);
List<IndexWrapper> indexes2 = finder.findIndexesForKeyword(“TRAFFIC”);
List<IndexWrapper> indexes3 = finder.findIndexesForKeyword(“stuck”);
List<IndexWrapper> indexes4 = finder.findIndexesForKeyword(“Stuck”);
List<IndexWrapper> indexes5 = finder.findIndexesForKeyword(“STUCK”);
List<IndexWrapper> indexes6 = finder.findIndexesForKeyword(“STRUCK”);
List<IndexWrapper> indexes7 = finder.findIndexesForKeyword(“Struck”);
List<IndexWrapper> indexes8 = finder.findIndexesForKeyword(“struck”);
List<IndexWrapper> indexes9 = finder.findIndexesForKeyword(“ROAD”);
List<IndexWrapper> indexes10 = finder.findIndexesForKeyword(“road”);
List<IndexWrapper> indexes11 = finder.findIndexesForKeyword(“Road”);
int size = indexes.size();
int size1 = indexes1.size();
int size2 = indexes2.size();
int size 3 = indexes3.size();
int size4 = indexes4.size();
int size5 = indexes5.size();
int size6 = indexes6.size();
int size7 = indexes7.size();
int size8 = indexes8.size();
int size9 = indexes9.size();
int size10 = indexes10.size();
int size11 = indexes11.size();
int total =size+size1+size2+size3+size4+size5+size6+size7+size8+size9+size10+size11;
System.out.println(“total” );
if(twitts.equals(twitts)){
Connection con =DbPack.DatabaseConnection.getCon();
Statement st = con.createStatement();
int i = st.executeUpdate(“insert into twitts values(‘0’,’”+twitts+”‘ ,’”+name+”‘, ‘YES’, ‘YES’)”);
if(i!=0){
if(total>0){
ResultSet res = st.executeQuery(“select * from uregister “);
while (res.next()) {
String email = res.getString(“email”);
mail_Send0.sendMail(twitts, name, email);
}
response.sendRedirect(“twitts.jsp?Msg=Submitted”);
}
response.sendRedirect(“twitts.jsp?Msg=Submitted”);
System.out.println(“Registeration done”);
}
else{
response.sendRedirect(“twitts.jsp?m=error…check”);
}
}
else{
response.sendRedirect(“twitts.jsp?m=error”);
}
} catch (Exception ex) {
System.out.println( ex);
System.out.println(“Registeration done”);
} finally {
out.close();
}
}
F.WHOLE WORD INDEX FINDER
Finds the correct word in the entire index related to such criteria in twitts
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import action.IndexWrapper;
public class WholeWordIndexFinder {
private String searchString;
public WholeWordIndexFinder(String searchString) {
this.searchString = searchString;
}
public List<IndexWrapper> findIndexesForKeyword(String keyword) {
String regex = “\b”+keyword+”\b”;
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(searchString);
List<IndexWrapper> wrappers = new ArrayList<IndexWrapper>();
while(matcher.find() == true){
int end = matcher.end();
int start = matcher.start();
IndexWrapper wrapper = new IndexWrapper(start, end);
wrappers.add(wrapper);
}
return wrappers;
}
G. Mail send
sends a mail to registered friends taking in account the code words
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class mail_Send0 {
public static boolean sendMail(String msg, String userid, String to) {
Properties props = new Properties();
props.put(“mail.smtp.host”, “smtp.gmail.com”);
props.put(“mail.smtp.socketFactory.port”, “465”);
props.put(“mail.smtp.socketFactory.class”,”javax.net.ssl.SSLSocketFactory”);
props.put(“mail.smtp.auth”, “true”);
props.put(“mail.smtp.port”, “465”);
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(“[email protected]”,”manchester123″);
}
});
System.out.println(“Message ” + msg);
try
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(userid));
message.setRecipients(Message.RecipientType.TO,InternetAddress.parse(to));
message.setSubject(“Signature key “);
message.setText(msg);
Transport.send(message);
System.out.println(“Done”);
System.out.println(message);
return true;
}
catch (MessagingException e) {
e.printStackTrace();
return false;
}
}
6.0. SCREENSHOTS
The Purpose of testing:-
The main purpose of this system is to make sure that the system is efficient and appears to be an effective working module to get affine output without any failures or interruptions in the process. To make sure software system meets the requirements and does not fail in a wrong manner. Each test has its own specific requirement.
TYPES OF TESTING
UNIT TESTING
UNIT TESTING is a test that involves a design of test cases that validate whether the internal program logic is functioning well and the program will get the required outputs from their inputs. All the decision tree branches and internal code flow should made sure to be validated. The testing is done with all the individual software units of the entire application and the process is done after completing an individual unit before the integration. This is a structural type testing that is based on the knowledge of its construction. It performs tests at component level. They test a specific process related to business or application.
Unit testing ensures that each and every path of a process has a good accurate performance according to the documented specifications and contains the expected results.
Integration testing
Integration tests are designed to test integrated software components to determine if they actually run as one program. Testing is event driven and is more concerned with the basic outcome of screens or fields. Integration tests demonstrate that although the components were individually satisfaction, as shown by successfully unit testing, the combination of components is correct and consistent. Integration testing is specifically aimed at exposing the problems that arise from the combination of components.
Functional test
The tests which provide demonstrations that functions tested are available as specified by requirements are functional tests. They provide systematic demonstration regarding system requirements (business or technical), documentation and user manuals
Functional testing is mainly based on the following items:
Valid Input : The identified classes must be accepted if they have a valid input.
Invalid Input : The identified classes must be rejected if they bear a wrong input.
Functions : Functions identified must be exercised.
Output : Classes identified of outputs must be exercised.
Systems/procedures : The interfacing systems or their procedures must be invoked.
Organization and preparation of functional tests are focused on key functions, special text cases or requirements. Systematic coverage which is effective to identify business process flows, pre-defined process and data fields, must be considered for the testing.
Additional tests are identified and value of currents tests is determined before functional testing.
System Test
System testing makes sure that the integrated software system meets the desired requirements of the system. It is the testing of the configuration which ensures known and predictable results. The configuration oriented system integration test is a fine example. This testing is based on the process description and the flows, mainly pre-driven links and integration points.
White Box Testing
White Box Testing is a testing where the software testing has the entire knowledge of the inner workings and structure of the software but no external knowledge of that system. Testing of the software’s purpose is mainly oriented in white box testing.
Black Box Testing
Black Box Testing is testing of the software externally i.e. a test from a source of a document, such as specification or requirements of a document. The black box testing does not relate with inner workings, structure or language of module being tested.
This testing provides the inputs and responds to outputs without the knowledge of the working of the software.
6.1 Unit Testing:
Unit testing is a part of a combined code and the unit testing phase related to the software lifecycle, though it is not common for the coding part and unit testing can be conducted as two separate phases.
Test strategy and approach
Field testing will be manually performed and the functional tests will have detailed view of information.
Test objectives
Features to be tested
Integration Testing
Software integration test is incremental integration testing of two or more integrated software components on one single platform to produce failures which are caused by defects related to interface
The task of this test is to check that components or software applications i.e. components either in a software system or software applications of company level will interact without error.
Test Results: All related test cases passed successfully with no defects.
Acceptance testing
User Acceptance Testing is the main critical phase of the project requiring significant participation by the end user. This testing makes sure the system meets the functional requirements.
Test Results: All related test cases passed successfully without any defects.
8.0. CONCLUSION
In this paper, we have proposed a system for detecting traffic through twitter stream for real-time detection of traffic-related events from Twitter stream analysis. This system is built on a Service Oriented Architecture, which is able to fetch and classify streams of tweets and to notify the users of the presence of traffic related events. Furthermore, the system is also able to discriminate if a traffic event is caused to an external cause, such as a football match, procession, or not. We have exploited some available software packages and state of the art techniques for text analysis and pattern classification. These technologies and techniques are analyzed and adapted in order to build an efficient system for the detection of traffic. The use of Simple Vector Machine algorithm has been effectively used to build the system. With the analyzing of the different algorithms used, the superiority of the SVM is shown. We have gained an accuracy of 99% for the class-2 problem and also very effective for class 3.
The results first have been analyzed and the capability of the system is also tested. The model that is employed in Italy has sent information to the people faster than any news sites or local newspapers. The system has been working efficiently in sending quick information about traffic to people.
9.0. REFERENCES
[1] F. Atefeh and W. Khreich, “A survey of techniques for event detection in twitter”, vol. 31, no. 1, pp. 132–164, 2015.
[2] P. Ruchi and K. Kamalakar, “Events from tweets,” inproc. 22nd Int,conference, Rio de janiero, Brazil,2012,pp,613—620 .
[3] A. Mislove, M. Marcon, K. P. Gummadi, P. Druschel, and B. Bhattacharjee, “Measurement and analysis of online social networks,” in proc. 7th ACMSIGCOMM conference Internet Meas, San Diego, CA,USA,2007,PP.29-42
[4] G. Anastasi et al., “Urban and social sensing for sustainable mobility in smart cities,” in Proc. IFIP/IEEE Int. conf. sustainable Internet ICT Sustainability
[5] A. Rosi et al., “Social sensors and pervasive services: Approaches and perspectives,” in Proc. IEEE Conference PERCOM Workshops, Seattle, WA, USA,2011,PP. 525-530
[6] T. Sakaki, M. Okazaki, and Y.Matsuo, “Tweet analysis for real time event detection and earthquake reporting system development”, IEEE Trans Knowl, Data Eng, vol.25, no.4, pp.919-931, April.2013.
[7] J. Allan, Topic detection and Tracking: Event-based Information Organization. Norwell, MA, USA: Kluwer, 2002.
[8] K. Perera and D.Dias, “An Intelligent driver guidance tool using location based services”, in Proc. IEEE ICSDM, Fuzhou, China,2011,pp. 246-251..
[9] T. Sakaki, Y. Matsuo, T. Yanagihara, N. P. Chandrasiri, and K. Nawa, “Real time event extraction for driving information from social sensors”, in Proc. IEEE Int. Conf. CYBER, Bangkok, Thailand,2012,pp. 221-226..
[10] B. Chen and H. H. Cheng, “A review of the applications of the agent technology in traffic and transportation systems”, IEEE Trans. Intell syst., vol 11, no.2, pp.485-497, June 2010.
[11] A. Gonzalez, L. M. Bergasa, and J. J. Yebes, “Text detection and recognition on traffic panels from street level imagery using visual appearance”, IEEE Trans, Intell syst., vol.15,no 1, pp.228-234.
[12] N. Wanichayapong, W. Pruthipunyaskul, W. Pattara-Atikom, and P. Chaovalit, “Social-based traffic information extraction and classification,” in Proc .11th INT. conference ITST, St. Petersburg, Russia 2011,pp. 107-112.
[13] P. M. d’Orey and M. Ferreira, “ITS for sustainable mobility; A Survey on applications and impact assessment tool”, IEEE Transp. Syst., vol.15, no. 2,pp. 447-493.
[14] K. Boriboonsomsin, M. Barth, W. Zhu, and A. Vu, “Eco routing navigation system based on multisource historical and real time traffic information”, IEEE Trans. Intell. Transp. Syst. Vol13, no.4 pp. 1674-1704, Dec 2012.
[15] J. Hurlock and M. L. Wilson, “Searching twitter: Separating the tweet from the chaff”, in Proc. 5th AAAI ICWSM, Barcelona, Spain, 2011, pp. 161-168.
[16] J. Weng and B.-S. Lee, “Event detection in Twitter”, in Proc. 5th AAAI ICWSM,Barcelona, Spain, 2011,pp. 401-408.
[17] S. Weiss, N. Indurkhya, T. Zhang, and F. Damerau, “Text mining: Predictive methods for analyzing unstructured information. Berlin, Germany: Springer-Verlag, 2004.
[18] A. Hotho, A. Nürnberger, and G. Paaß, “A brief survey of text mining”, LDV Forum-GLDV J.Comput. Linguistics Lang, Technol, vol.20, no.1,pp.19-62,may 2005.
[19] V. Gupta, S. Gurpreet, and S. Lehal, “A survey of text mining techniques and applications,” J.Emerging Technol. Web Intell.,vol.1, no.1,pp.60-76,Aug, 2009.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more