traffic crash report information search system

38
Traffic Crash Report Information Search System Kiavash Bahreini – 055251

Upload: grant-good

Post on 03-Jan-2016

42 views

Category:

Documents


2 download

DESCRIPTION

Traffic Crash Report Information Search System. Kiavash Bahreini – 055251. Outline. Introduction Semantic Web Search on the Web Adaptable Inference Capabilities The Traffic crash Ontology (properties) Protégé Traffic crash Ontology in Protégé JBuilder 2006 Jena 2.2 Ontology API RDQL - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Traffic Crash Report Information Search System

Traffic Crash Report Information Search System

Kiavash Bahreini – 055251

Page 2: Traffic Crash Report Information Search System

Outline

Introduction Semantic Web Search on the Web Adaptable Inference Capabilities The Traffic crash Ontology(properties)

Protégé Traffic crash Ontology in Protégé JBuilder 2006 Jena 2.2 Ontology API RDQL Java Server Pages Tomcat Traffic crash system use case, implementation and execution

Page 3: Traffic Crash Report Information Search System

Outline (cont)

Execution of program in Browser by running queries Converting Owl file to rdf file Compare RDBMS with OWL queries Applying annotation Reasonable Search engine Insert into Owl file Delete from Owl file Some source codes for classes in traffic crash ontology Comparison of Semantic Search and Regular Search Conclusion References

Page 4: Traffic Crash Report Information Search System

Introduction

The traffic crash database provides information on the frequency and severity of crashes within the state, demographic characteristics of individuals involved in crashes as well as weather, lighting or other related conditions associated with the crash incident.

Page 5: Traffic Crash Report Information Search System

Semantic Web

Common framework Allows data

Sharing Reuse

Across domains Application Enterprise Community boundaries

Based on Resource Description Framework (RDF) XML for syntax URIs for naming.

Page 6: Traffic Crash Report Information Search System

Search on the Web

Seeking information on the Web is widely used and will become more important as the Web grows. Nowadays, search engines browse through the Web seeking given terms within web pages or text documents without using ontologies.

Traditional search engines such as Yahoo are based on full-text search. These search engines are seeking documents, which contain certain terms.

Page 7: Traffic Crash Report Information Search System

Adaptable Inference Capabilities

Inference mechanisms for deduction of information not explicitly asserted is an important characteristic of ontology-based systems. However, systems with very general inference capabilities often do not take into account other needs, such as scalability and concurrency.

Page 8: Traffic Crash Report Information Search System

The Traffic crash Ontology(properties)

The content of Traffic crash report is: Age Gender Driver/Occupant Non-Occupant Type Pedestrian Visibility Safety Equipment Seat Position Type of Vehicle Collision Type Injury Severity Severity of Crash Weather Conditions Lighting Conditions Time Period Day of Week County of Occurrence

Page 9: Traffic Crash Report Information Search System

Protégé

Protégé is an ontology editor knowledge-base editor an open-source, Java tool

provides extensible architecture to create customized knowledge-based applications.

Developed by Stanford University, USA

Page 10: Traffic Crash Report Information Search System

Traffic crash Ontology in Protégé

Page 11: Traffic Crash Report Information Search System
Page 12: Traffic Crash Report Information Search System

JBuilder 2006

The system is written in JBuilder 2006. JBuilder is and IDE (Integrated

Development Tools) for developing new application, web etc software based on Java

Language. All of the packages and classes for using OWL and running queries are

imported into this IDE.

Page 13: Traffic Crash Report Information Search System

Jena 2.2 Ontology API

Jena 2.2 Ontology API is a Java framework for building Semantic Web applications. Use

RDF models in your Java applications with the Jena Semantic Web Framework.

Page 14: Traffic Crash Report Information Search System

RDQL

RDQL is a query language for RDF in Jena models. The idea is

to provide a data-oriented query model so that there is a more

declarative approach to complement the fine-grained,

procedural Jena API.

Page 15: Traffic Crash Report Information Search System

Java Server Pages

JavaServer Pages (JSP) technology allows web developers and

designers to rapidly develop

Easily maintain information-rich, Dynamic web pages

Page 16: Traffic Crash Report Information Search System

Tomcat

Tomcat is the official reference implementation of the Java Servlet 2.2 and JavaServer Pages 1.1 technologies.

Tomcat is a servlet container and JavaServer Pages(tm) implementation.

It may be used stand alone, or in conjunction with several popular web servers: Apache, version 1.3 or later Microsoft Internet Information Server, version 4.0 or later Microsoft Personal Web Server, version 4.0 or later Netscape Enterprise Server, version 3.0 or later

Page 17: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Page 18: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution Execution of program in Browser

JBuilder 2006

Protege 3.2

OWL File

Ontology & Knowledge Base

User interface

JSPPages

Computation Engine

Jena 2.2 OWL API

Inference Engine

RDQLSerarch Query

Page 19: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution http://app.idph.state.il.us/emsrpt/crash.asp

Page 20: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Running queries in Browser 1) Lists of whole injurers:

String queryString = " SELECT ?subjectName" + " WHERE ( ?in, nss:" + predicateName + ", ?

objectName)" + " USING nss FOR <" + NS + ">";

Page 21: Traffic Crash Report Information Search System

Traffic crash system use case, Converting Owl file to rdf file(output)

Page 22: Traffic Crash Report Information Search System

Traffic crash system use case, Converting Owl file to rdf file(generated rdf)

<?xml version="1.0" encoding="windows-1252"?><rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#">

<rdf:Description rdf:about="http://www.owl-ontologies.com/TrafficCrash.owl#">

<vcard:LABEL rdf:parseType="Resource"> <vcard:Given>hadSafetyEquipmentUsed</vcard:Given>

<vcard:Suffix>"Helmet"</vcard:Suffix> <vcard:Prefix>Milad</vcard:Prefix>

</vcard:LABEL> <vcard:LABEL rdf:parseType="Resource">

<vcard:Suffix>"Other"</vcard:Suffix> <vcard:Prefix>Samuel</vcard:Prefix>

<vcard:Given>hadSeatPosition</vcard:Given> </vcard:LABEL> </rdf:Description>

</rdf:RDF>

Page 23: Traffic Crash Report Information Search System

Traffic crash system use case, applying annotation:

Running queries in Browser 1) Smith information:

<owl:AnnotationProperty rdf:ID="SmithAnnotation"> <rdf:type

rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/>

<rdfs:range> <owl:DataRange>

<owl:oneOf rdf:parseType="Resource"> <rdf:first

rdf:datatype="http://www.w3.org/2001/XMLSchema#string"

>Smith</rdf:first> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-

rdf-syntax-ns#nil"/> </owl:oneOf>

</owl:DataRange> </rdfs:range>

<rdfs:domain rdf:resource="#Injured"/> </owl:AnnotationProperty>

Page 24: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Annotation output:

Page 25: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Annotation output (continue):

Page 26: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Running queries in Browser 2) Select injurers with conditions:

String queryString = " SELECT ?GenderType ?Age ?SeatPosition ?PedestrianVisibility ?LightingConditions ?TypeOfVehicle ?SeverityOfCrash ?NonOccupantType ?

PassengerType ?DayOfWeek ?SafetyEquipmentUsed ?CountyOfOccurrence ?InjurySeverityNonMotorVehicle ?Weather ?TimePeriod ?CollisionType ?

InjurySeverityMotorVehicle" + " WHERE ( nss:" + InjuredName + ", nss:hasGenderType , ?GenderType)" +

" ( nss:" + InjuredName + ", nss:hasAge, ?Age)" + " ( nss:" + InjuredName + ", nss:hadSeatPosition , ?SeatPosition)" +

" ( nss:" + InjuredName + ", nss:hadPedestrianVisibility , ?PedestrianVisibility)" + " ( nss:" + InjuredName + ", nss:hadLightingConditions , ?LightingConditions)" +

" ( nss:" + InjuredName + ", nss:hadTypeOfVehicle , ?TypeOfVehicle)" + " ( nss:" + InjuredName + ", nss:hadSeverityOfCrash , ?SeverityOfCrash)" +

" ( nss:" + InjuredName + ", nss:hadNonOccupantType , ?NonOccupantType)" + " ( nss:" + InjuredName + ", nss:hadPassengerType , ?PassengerType)" +

" ( nss:" + InjuredName + ", nss:hadDayOfWeek , ?DayOfWeek)" + " ( nss:" + InjuredName + ", nss:hadSafetyEquipmentUsed , ?SafetyEquipmentUsed)"

+ " ( nss:" + InjuredName + ", nss:hadCountyOfOccurrence , ?CountyOfOccurrence)" +

" ( nss:" + InjuredName + ", nss:hadInjurySeverityNonMotorVehicle , ?InjurySeverityNonMotorVehicle)" +

" ( nss:" + InjuredName + ", nss:hadWeather , ?Weather)" + " ( nss:" + InjuredName + ", nss:hadTimePeriod , ?TimePeriod)" +

" ( nss:" + InjuredName + ", nss:hadCollisionType , ?CollisionType)" + " ( nss:" + InjuredName + ", nss:hadInjurySeverityMotorVehicle , ?

InjurySeverityMotorVehicle)" + " USING nss FOR <" + NS + ">";

Page 27: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Output:

Page 28: Traffic Crash Report Information Search System

Traffic crash: Reasonable Search engine

Running queries in Browser 3) The minimum crash in which season was occured ? :

for (int k = 0; k < tokenArray.length; k++) { if (tokenArray[k].equalsIgnoreCase("season") && tokenArray[k]!=null) {

k=tokenArray.length; for (int j = 0; j < tokenArray.length; j++) {

if (tokenArray[j].equalsIgnoreCase("crashes") || tokenArray[j].equalsIgnoreCase("crash") || tokenArray[j].equalsIgnoreCase("accident") && tokenArray[j]!=null) {

j=tokenArray.length; for (int i = 0; i < tokenArray.length; i++) {

if (tokenArray[i].equalsIgnoreCase("min") || tokenArray[i].equalsIgnoreCase("minimum") || tokenArray[i].equalsIgnoreCase("atleast") || tokenArray[i].equalsIgnoreCase("max") || tokenArray[i].equalsIgnoreCase("maximum") || tokenArray[i].equalsIgnoreCase("atmost") &&

tokenArray[i]!=null) { i=tokenArray.length;

for (int c = 0; c < readFile.length(); c++) { int startIndex = readFile.indexOf("<hadWeather rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\"", c);

if (startIndex != -1) { int startIndex1 = readFile.indexOf(">", startIndex+66);

int nameIndex = readFile.indexOf("</hadWeather>", startIndex1 + 1); reasonArray[reasonCounter++] = new String(readFile.substring(startIndex1 + 1, nameIndex));

c = nameIndex + 13; weather=true;

} }

} }

} }

} }

}

Page 29: Traffic Crash Report Information Search System

Traffic crash: Reasonable Search engine

Output:

Page 30: Traffic Crash Report Information Search System

Traffic crash: Reasonable Search engine

Continue output:

Page 31: Traffic Crash Report Information Search System

Traffic crash: Insert into Owl file

output:

Page 32: Traffic Crash Report Information Search System

Traffic crash: Delete from Owl file

output:

Page 33: Traffic Crash Report Information Search System

Traffic crash system use case, implementation and execution

Some source codes for classes in traffic crash ontology:

<rdfs:domain rdf:resource="#Injured"/> <rdfs:range> <owl:DataRange> <owl:oneOf rdf:parseType="Resource"> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" >Back</rdf:first> <rdf:rest rdf:parseType="Resource"> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" >Front</rdf:first> <rdf:rest rdf:parseType="Resource"> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" >Other</rdf:first> <rdf:rest rdf:parseType="Resource"> <rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/> <rdf:first rdf:datatype="http://www.w3.org/2001/XMLSchema#string" >Unknown</rdf:first> </rdf:rest> </rdf:rest> </rdf:rest> </owl:oneOf> </owl:DataRange> </rdfs:range> </owl:DatatypeProperty>

Page 34: Traffic Crash Report Information Search System

Comparison of Semantic Search and Regular Search In RDBMS model, there is no reasoner-based

system to infer information but here there exist.

We cannot use inference engines in RDBMS. We cannot use unsupervised learning in

RDBMS. We cannot use supervised learning in

RDBMS In semantic approach the data being marked

provides the possibility for computers and other digital agents to process and ‘understand’.

Page 35: Traffic Crash Report Information Search System

Conclusion

The Traffic Crash Report Form is used to report traffic crashes.

It is based on reasonable-based system. Platform independence. Tools independence. User friendly based on web pages. It allows usingmany annotating techniques. It allows users to search, add, and delete

information from web pages.

Page 36: Traffic Crash Report Information Search System

References [1]- T. Berners-Lee, J. Hendler, O. Lassila, The Semantic Web. Scientific American, 284(5), 34–43,

2001. [2]- O. Lassila, R.R. Swick, Resource Description Framework (RDF) Model and Syntax Specification,

http://www.w3.org/TR/REC-rdf-syntax/. [3]- D. Brickley, R.V. Guha, RDF Vocabulary Description Language 1.0: RDF Schema,

http://www.w3.org/TR/rdfschema/. [4]- M. Kifer, G. Lausen, J. Wu, Logical foundations of object-oriented and frame-based languages.

Journal of the ACM, 42, 741–843, 1995. [5]- D. Fensel, I. Horrocks, F. van Harmelen, S. Decker, M. Erdmann, M. Klein, OIL in a nutshell. In

Knowledge Acquisition, Modeling, and Management, Proceedings of the European Knowledge Acquisition Conference (EKAW-2000), October, pp. 1–16. Springer-Verlag, Berlin, 2000.

[6]- P.F. Patel-Schneider, P. Hayes, I. Horrocks, F. van Harmelen, Web Ontology Language (OWL) Abstract Syntax and Semantics, http://www.w3.org/TR/owl-semantics/, November 2002.

[7]- C. Davis, S. Jajodia, P. Ng, R. Yeh (eds), Entity-Relationship Approach to Software Engineering: Proceedings of the 3rd International Conference on Entity-Relationship Approach, Anahein, CA, 5–7, October. North- Holland, Amsterdam, 1983.

[8]- Tim Berners-Lee, James Hendler, and Ora Lassila. The semantic web. Scientific American, 2001(5), 2001.

[9]- Semantic Web Technologies Trends and Research in Ontology-based Systems John Davies BT, UK Rudi Studer University of Karlsruhe, Germany Paul Warren BT, UK John Wiley & Sons Ltd.

[10]- http://www.w3.org/2004/OWL/ [11]- http://www.w3.org/RDF/ [12]- The Semantic Web: A Guide to the Future of XML, Web Services, and Knowledge Management

Michael C. Daconta Leo J. Obrst Kevin T. Smith [13]- I. Horrocks, “DAML+OIL: A Description Logic for the Semantic Web.” Bulletin of the IEEE

Computer Society Technical Committee on Data Engineering, IEEE, Vol. 25, No. 1, pp. 4-9, 2002.

Page 37: Traffic Crash Report Information Search System

References (Cont1)

[14]- Protégé overview, URL: http://protege.stanford.edu, last visited: June 2006 15]- N. F. Noy, M. Sintek, S. Decker, M. Crubezy, R. W. Fergerson, & M. A. Musen.

“Creating Semantic Web Contents with Protege-2000”, IEEE Intelligent Systems 16(2):60-71, 2001

[16]- J. Gennari, M. A. Musen, R. W. Fergerson, W. E. Grosso, M. Crubézy, H. Eriksson, N. F. Noy, S. W. Tu, “The Evolution of Protégé: An Environment for Knowledge-Based Systems Development”, 2002, URL: http://smi-web.stanford.edu/pubs/SMI_Reports/SMI-2002-0943.pdf

[17]- Erhan Gayde Thesis Eastern Mediterranean University September 2006, Gazimağusa, North Cyprus

[18]- http://www.Borland.com/ [19]- Jena – A Semantic Web Framework for Java, URL: http://jena.sourceforge.net/. [20]- HP Labs Semantic Web Research, URL: http://www.hpl.hp.com/semweb/. [21]- http://jena.sourceforge.net/tutorial/RDQL/ [22]- Borland JBuilder 2006 Documentation Files. [23]- http://www.hewettresearch.com/mikehewett.html [24]- http://jatha.sourceforge.net/ [25]- http://jakarta.apache.org/site/binindex.html

Page 38: Traffic Crash Report Information Search System

Thank you

Any Questions?