![Page 1: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/1.jpg)
A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer
Paul R. Smart, Alistair Russell, Dave Braines, Yannis Kalfoglou, , Jie Bao and Nigel R. Shadbolt
Presented by Kristine MonteithCS 652 – Information Extraction and Integration
5/21/09
![Page 2: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/2.jpg)
Overview
• Semantic Query Languages such as SPARQL are important tools for Information Retrieval
• This paper presents a tool to aid in the process of query formation
• Visual Query Systems • Syntactically valid queries• Avoid lexical and syntactic errors• Possibility of improved efficiency, understanding,
and reduced training requirements
![Page 3: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/3.jpg)
vSPARQL Visual Query Language
• Set of graphic notations that support the visual representation of SPARQL query components
• Outline• Core SPARQL Features• Triple Patterns • Simple Select Query• Graph Patterns • Solution Sequence Ordering • SPARQL CONSTRUCT Queries• Other SPARQL Features
![Page 4: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/4.jpg)
Core SPARQL Features
![Page 5: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/5.jpg)
Triple Patterns
![Page 6: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/6.jpg)
Simple Select Query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX edto: <http://www.e-defence.org/ontologies/terrorism.owl#>
SELECT ?activity ?dateWHERE{
?activity rdf:type edto:Activity.?activity edto:hasDate ?date
}
![Page 7: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/7.jpg)
Simple Select Query
![Page 8: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/8.jpg)
Graph Patterns • Each variable has local scope with respect to the graph pattern in
which it is contained
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX edto: <http://www.e-defence.org/ontologies/terrorism.owl#>
SELECT ?activityWHERE{
{?activity rdf:type edto:MilitaryActivity}.{?activity rdf:ytpe edto:BiologicalActivity}
}
![Page 9: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/9.jpg)
Graph Patterns
![Page 10: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/10.jpg)
Other Graph Patterns
• Optional graph patterns• Union graph patterns• Allow users to specify alternatives for graph
pattern matching
![Page 11: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/11.jpg)
Solution Sequence Ordering
• Specify the order in which query results are returned
![Page 12: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/12.jpg)
Filtering
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX edto: <http://www.e-defence.org/ontologies/terrorism.owl#>
SELECT ?activity ?activityDateWHERE{
?activity rdf:type edto:Activity?activity edto:hasDate ?activityDateFILTER (?activity>"2005-01-01T00:00:00Z"^^xsd:dateTime)
}
![Page 13: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/13.jpg)
Filtering
![Page 14: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/14.jpg)
SPARQL CONSTRUCT Queries • Define both a set of triples to match against the rdf graph and a template
for rdf construction
CONSTRUCT{
_:a rdf:type edto:TerroristAttack._:a edto:hasICN ?aaip_ICN.?x owl:sameAs _:a
}WHERE{
?x rdf:type aaip:TerroristIncident?x aaip:hasICN ?aaip_ICN?y rdf:type edto:TerroristAttack?y edto:hasICN ?edto_ICN
}
![Page 15: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/15.jpg)
SPARQL CONSTRUCT Queries
![Page 16: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/16.jpg)
Other SPARQL Features
• Supported in the NITELIGHT tool• Not part of the vSPARQL specification• ASK and DESCRIBE query forms• DISTINCT, LIMIT and OFFSET solution modifiers
![Page 17: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/17.jpg)
NITELIGHT Tool
![Page 18: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/18.jpg)
Additional Application Areas
• Rule Creation • Take advantage of multiple knowledge bases
• Information Integration and Interoperability• Ontology alignments between ostensibly disparate
ontologies
![Page 19: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/19.jpg)
Rule Creation
CONSTRUCT {
?z edto:hasSuspectedResponsibilityFor ?x } WHERE{
?x rdf:type edto:TerroristAttack . ?x edto:isPerformedBy ?y . ?y edto:isMemberOf ?z . ?z rdf:type edto:TerroristOrganization
}
![Page 20: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/20.jpg)
Information Integration and Interoperability
PREFIX edto: <http://www.e-defence.org/ontologies/terrorism.owl#> PREFIX ito: <http://www.ito.org/terrorism.owl#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
CONSTRUCT {
_:t rdf:type edto:TerroristAttack . _:t edto:isSuicideAttack xsd:true . _:d ref:type edto:ExplosiveDevice . _:t edto:uses edto _:d
} WHERE {
?x rdf:type ito:TerroristIncident . ?x ito:hasType ito:Bombing . ?x ito:involvesWeapon ito:Explosive . ?x ito:hasVictim ?victim . ?victim ito:isFatality xsd:true . ?victim rdf:type ito:Terrorist . ?x ito:perpetratedBy ?victim
}
![Page 21: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/21.jpg)
Strengths
• Helped me understand SPARQL better• Enforces correct syntax• Seems like an attractive, easy-to-use program
![Page 22: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/22.jpg)
Weakness
• Requires the user to already be familiar with SPARQL
• Tool not available online• Ontology not available online
![Page 23: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/23.jpg)
Future Work
• User evaluation study already planned
![Page 24: A Visual Approach to Semantic Query Design Using a Web-Based Graphical Query Designer](https://reader035.vdocuments.us/reader035/viewer/2022062301/56813369550346895d9a7f4f/html5/thumbnails/24.jpg)
QUESTIONS?