Using PHP in Linked Data Applications Jie Bao Oct 12.

Slides:



Advertisements
Similar presentations
RDF Generation and Linking using Open Refine Daniel Vila-Suero
Advertisements

Using JavaScript in Linked Data Applications Oshani Seneviratne Oct 12, 2010.
Ontology Engineering Lab #8 October 21, Review - Trial Query Exercises  What are the bones of the foot? (not sure this can be done in a single.
Semantic Web Introduction
Chapter 3 Querying RDF stores with SPARQL. TL;DR We will want to query large RDF datasets, e.g. LOD SPARQL is the SQL of RDF SPARQL is a language to query.
Linked Data browsers. Linked Data Browser One reason DBpedia is successful is its data browser for humans Given a URL to a Dbpedia resourse, it shows.
Quick RDF Introduction Scott Streit Terminology – RDF Triple (Also the triple form used in SPARQL) RDF Triple  (Resource, Property,
CSCI 572 Project Presentation Mohsen Taheriyan Semantic Search on FOAF profiles.
RDF(S) Tools Adrian Pop, Programming Environments Laboratory Linköping University.
Linked Data and Semantic Web Technologies for Aid Transparency Aman Shakya PhD (National Institute of Informatics, Japan) Asst. Professor (Institute of.
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
Semantic Web Query Processing with Relational Databases Artem Chebotko Department of Computer Science Wayne State University.
Axel Polleres Siemens AG Querying and Exchanging XML and RDF on the Web with XSPARQL (most slides taken from WWW’2012 Tutorial) This tutorial presents.
Using Java in Linked Data Applications Fuming Shih Oct 12.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Semantic Web Bootcamp Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Triple Stores.
Label production Solution with Label Gallery programs Label Gallery is used for general label design and print GalleryForm is used to create data entry.
Chapter 3A Semantic Web Primer 1 Chapter 3 Querying the Semantic Web Grigoris Antoniou Paul Groth Frank van Harmelen Rinke Hoekstra.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
Berlin SPARQL Benchmark (BSBM) Presented by: Nikhil Rajguru Christian Bizer and Andreas Schultz.
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
Hacking Linked Data A hands-on-exploration of an often nebulous concept for librarians! Reinhard Engels, ABCD Library, October 2013.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
Information Extraction with Linked Life Data 19/04/2011.
Example: Jena and Fuseki
Introduction to Linked Data Linked Data: what cataloguers need to know #cigld CILIP Cataloguing and Indexing Group (CIG) 20 February 2015 Thomas Meehan.
Entity Recognition via Querying DBpedia ElShaimaa Ali.
The Semantic Web Web Science Systems Development Spring 2015.
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
© Copyright 2013 STI INNSBRUCK Linked Open Data Anna Fensel, Ioannis Stavrakantonakis,
KIT – University of the State of Baden-Württemberg and National Large-scale Research Center of the Helmholtz Association Institute of Applied Informatics.
SPARQL W3C Simple Protocol And RDF Query Language
Semantic Web State of SemWeb Promotes flexibility, software reuse. SOA Styled architecture that exposes business processes and rules regarding IT.
SPARQL AN RDF Query Language. SPARQL SPARQL is a recursive acronym for SPARQL Protocol And Rdf Query Language SPARQL is the SQL for RDF Example: PREFIX.
Semantic Web Programming in Python an Introduction Biju B Jaganath G.
How to reuse knowledge from a Semantic MediaWiki in your own applications and websites (in lack of a shorter title) Tutorial Denny Vrandečić, Markus Krötzsch.
Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Dr. Lowell Vizenor Ontology and Semantic Technology Practice Lead Alion Science and Technology Semantic Technology: A Basic Introduction.
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
Chapter 3 Querying RDF stores with SPARQL
Alexandra Cristea 1.  pronounced "sparkle“  recursive acronym for: ◦ SPARQL Protocol and RDF Query Language  a semantic query language  a query language.
RDF David R Newman 15 May 2009.
>> PHP: MySQL & CRUD. R ecall Database Tables Records is composed of Operations (CRUD) Create Retrieve Update Delete DBMS Access Control MySQL phpMyAdmin.
© Copyright 2014 STI INNSBRUCK OpenRDF & SPARQL Short guide on how to use the STI LOI OpenRDF workbench.
Sales Demo. Demo Overview RDF and Triples D2RQ Overview and Setup Ontology and Mappings Sales Demo Model Inferencing.
Chapter 04 Semantic Web Application Architecture 23 November 2015 A Team 오혜성, 조형헌, 권윤, 신동준, 이인용.
Linked Data Theatre Slide deck. The challenge Linked Data We love our Linked Data! Turtle representation But it doesn’t look good.
Semantic Web in Depth SPARQL Protocol and RDF Query Language Dr Nicholas Gibbins –
Christopher Gutteridge Patrick McSweeney. Datum.
S. Schenk, C. Saathoff, A. Baumesberger, F. Jochum, A. Kleinen, S. Staab, and A. Scherp Information Systems & Semantic Web University of Koblenz, Germany.
SPARQL Query Andy Seaborne. Apache Jena he.org/jena ● Open source - Apache License ● Apache Incubator (accepted November 2010) ●
Introduction to RDF Sandro Hawke, Semantic Web Tutorial ISWC 2010.
INF1343, Winter 2011 Data Modeling and Database Design Yuri Takhteyev University of Toronto This presentation is licensed under Creative Commons Attribution.
SPARQLing SERVICES Leigh Dodds Engineering Manager, Ingenta XTech, May 2006.
1 RDF Storage and Retrieval Systems Jan Pettersen Nytun, UiA.
RDFLib for your Linked Data Venture Mathew Cherian Oct 12, 2010.
SPARQL.
SPARQL SPARQL Protocol and RDF Query Language
Introduction to CodeIgniter (CI)
Linked Data browsers.
SPARQL: A query language for RDF
SPARQL Exercise Much of this exercise has been copied from: INF3580/INF4580 – MANDATORY EXERCISE 3
Sparql Examples.
Statistical Knowledge Patterns: Identifying Synonymous Relations in Large Linked Datasets Ziqi Zhang, Anna Lisa Gentile, Eva Blomqvist, Isabelle Augenstein,
DBpedia 2014 Liang Zheng 9.22.
Logics for Data and Knowledge Representation
Triple Stores.
Linked Data 101 Things, URIs, RDF, Triples, Turtle, Ontologies, Vocabularies and SPARQL Linked Data is our Implementation choice for FAIR.
Linked Data Ryan McAlister.
Presentation transcript:

Using PHP in Linked Data Applications Jie Bao Oct 12

ARC2 ARC2 is PHP-based – Various RDF parsers and extractors (RDF/XML, Turtle, RSS, microformats, eRDF, RDFa,...) – Serializers (N-Triples, RDF/JSON, RDF/XML, Turtle) – RDF Storage, SPARQL Query, and Update

PHP Program <?php echo “Hello World”; ?> Can be run in dual modes: hello.php

Task today 1.Load Lalana’s foaf file at Extract her friends 3.Look at the friends’ FOAF files, see where they work 4.Use the workplace URI or the labels to query dbpedia for it’s location 5.Print a list of friends, their workplaces and where the workplaces are located

Getting Started <?php include_once("./ARC2/arc/ARC2.php"); $parser = ARC2::getRDFParser(); $parser->parse(' $triples = $parser->getTriples(); foreach($triples as $triple){ print_r($triple); } ?> 1 Load Lalana’s foaf file at

Setup Local Triple Store We will use a SPARQL query Need to setup a local database for that (ARC2 uses MySQL) 2. Extract her friends $config = array( 'db_name' => 'arc2', 'db_user' => 'arc2', 'db_pwd' => 'arc2‘, 'store_name' => 'arc_tests' ); $store = ARC2::getStore($config); if (!$store->isSetUp()) { $store->setUp(); } $store->query( ‘LOAD ');

Do Some Query $q = ' PREFIX foaf:. SELECT ?person ?name WHERE { foaf:knows ?person. ?person foaf:name ?name. } '; echo " "; if ($rows = $store->query($q, 'rows')) { foreach ($rows as $row) { $foafURL = $row['person']; echo ' '. $row['name']. ' '. $foafURL. " \n“; } 3. Look at the friends’ FOAF files, see where they work

Do a More Complicated Query PREFIX rdfs: PREFIX type: PREFIX prop: PREFIX ont: PREFIX foaf: PREFIX geo: SELECT DISTINCT ?label ?lat ?long WHERE { { {?resource prop:website.} UNION {?resource foaf:homepage } } { {?resource ont:location ?location. OPTIONAL {?location geo:lat ?lat. ?location geo:long ?long.} OPTIONAL {?location rdfs:label ?label.} } 4. Use the workplace URI or the labels to query dbpedia for it’s location UNION {?subject prop:employer ?resource} UNION {?subject prop:institution ?resource} UNION {?subject prop:workInstitution ?resource} UNION {?subject prop:workInstitutions ?resource} UNION {?subject prop:workplaces ?resource} UNION {?subject ont:occupation ?resource} OPTIONAL {?resource geo:lat ?lat. ?resource geo:long ?long.} OPTIONAL {?resource rdfs:label ?label.} }} SPARQL Endpoint:

Query a Remote Store $config_dbpedia = array( /* remote endpoint */ 'remote_store_endpoint' => ' ); $store_dbpedia = ARC2::getRemoteStore($config_dbpedia); $q = ' PREFIX foaf:. SELECT ?name ?person ?workplace WHERE { foaf:knows ?person. ?person foaf:workplaceHomepage ?workplace. OPTIONAL {?person foaf:name ?name } }'; $rows = $store->query($q, 'rows')) ; 4. Use the workplace URI or the labels to query dbpedia for it’s location

Visualize your result 5. Print a list of friends, their workplaces and where the workplaces are located

Demo and Questions