background preloader

Le tutoriel SPARQL

Le tutoriel SPARQL
L'objectif de ce tutoriel SPARQL est de donner un cours rapide en SPARQL. Le tutoriel couvre les fonctionnalités majeures du langage de requête au travers d'exemples, mais ne vise pas à être complet. Si vous cherchez une courte introduction à SPARQL et Jena, essayez Recherche de données RDF avec SPARQL . SPARQL est un langage de requêtes et un protocole pour accéder au RDF conçu par le groupe de travail du W3C RDF Data Access . Comme un langage de requête, SPARQL est « orienté données » en ce sens qu'il interroge uniquement les informations détenues dans des modèles ; il n'y a pas d'inférence dans le langage de requête lui-même. Commentez Tout d'abord, il faut être clair sur quelles données sont interrogées. Il est important de réaliser que ce sont les triplets qui importent, pas la sérialisation. On va commencer avec des données simples dans vc-db-1.rdf : ce fichier contient du RDF pour un certain nombre de descriptions vCard de personnes. Graphiquement, les données ressemblent à : II-A. ?

Jena - LARQ - adding free text searches to SPARQL As of Jena 2.11.0, LARQ is replaced by jena-text jena-text includes use of Apache Solr as a shared, search server, or Apache Lucene as a local text index. From Fuseki 0.2.7, jena-text is built into Fuseki. LARQ is no compatible with jena-text; the idnex format has chnaged and the integration with SPARQL is different. LARQ is a combination of ARQ and Lucene. Some example code is available here: Two helper commands are provided: larq.larqbuilder and larq.larq used respectively for updating and querying LARQ indexes. A full description of the free text query language syntax is given in the Lucene query syntax document. Usage Patterns There are three basic usage patterns supported: Pattern 1 : index string literals. Patterns 1 and 2 have the indexed content in the graph. LARQ can be used in other ways as well but the classes for these patterns are supplied. Index Creation Index Builders Index Creation

Les métadonnées sémantiques : RDF, RDFa et les microdonnées « archivEngines Le W3C (World Wide Web Consortium) débute dès 1994 ses travaux sur le Web sémantique ou Web des données. Il s’agit d’un projet à long terme visant à répertorier les connaissances stockées dans les pages du web afin d’en permettre la restitution par des applications. Les langages sémantiques RDF, RDFa et les microdonnées sont successivement spécifiés. Implémentés dans les logiciels des bibliothèques, des éditeurs, des centres d’archivage et des musées, mais aussi dans les gestionnaires de contenu, ils peuvent servir pour les échanges de métadonnées entre logiciels ou être reconnus par les moteurs de recherche. RDF (Resource Description Framework) Le langage pilier du web sémantique RDF est publié sous forme de recommandation en 1999. Une assertion peut être représentée à l’aide d’un graphe dans lequel sujet et objet sont les noeuds et le prédicat est la flèche. Une représentation équivalente de RDF en XML est la suivante : RDFa (Ressource Description Framework in attributes) <? <! Like this:

SPARQL Query Language for RDF W3C Recommendation 15 January 2008 New Version Available: SPARQL 1.1 (Document Status Update, 26 March 2013) The SPARQL Working Group has produced a W3C Recommendation for a new version of SPARQL which adds features to this 2008 version. Please see SPARQL 1.1 Overview for an introduction to SPARQL 1.1 and a guide to the SPARQL 1.1 document set. This version: Latest version: Previous version: Editors: Eric Prud'hommeaux, W3C <eric@w3.org> Andy Seaborne, Hewlett-Packard Laboratories, Bristol <andy.seaborne@hp.com> Please refer to the errata for this document, which may include some normative corrections. See also translations. Copyright © 2006-2007 W3C® (MIT, ERCIM, Keio), All Rights Reserved. Abstract RDF is a directed, labeled graph data format for representing information in the Web. Status of This Document This is a W3C Recommendation. Appendices ? ? ? ?

Stanbol - Overview about Apache Stanbol (incubating) Apache Stanbol provides a set of reusable components for semantic content management. It is important to note that Stanbol itself is NOT a semantic CMS. It extends existing CMSs with a number of semantic services. While Apache Stanbol was built with CMS in mind it can also be used for e.g. web applications (tag extraction and suggestions, text completion in search fields); 'smart' content workflows (using several Stanbol semantic engines chained together) or email routing based on extracted entities/topics; etc. Content Enhancement Extracting information from content is the most common use case for Apache Stanbol. The enhancements can be used to improve search and navigation. Detailed information on how to make use of the enhancement results returned by the Stanbol Enhancer are described in this usage scenario. Customize Enhancement Results Different application domains will have different needs for extracting entities from texts. Multilinguality Knowledge Models and Reasoning

Transformation RDF basé sur SPARQL [la suite du billet précédent sur le manque d'outil pour effectuer des transformations sur un graphe RDF, et la pertinence de cette opération pour l'échange de données.] Pourquoi faire ? La problématique est la suivante : je veux échanger des données exprimées en RDF, d’un système de départ à un système d’arrivée; les ontologies de départ et d’arrivée sont différentes, je dois donc transformer les données de départ pour construire un graphe conforme à l’ontologie d’arrivée. Il sera possible que seule une partie m’intéresse, et que toute l’information ne soit pas transformée. Chaque opération de transformation est exprimée sous la forme d’une requête CONSTRUCT en SPARQL (1), qui permet de construire un pattern dans le graphe d’arrivée en fonction d’un pattern dans le graphe de départ; la requête s’exécute sur le graphe de départ, et ses résultats sont insérés dans le graphe d’arrivée. Il suffit donc de décrire les requêtes SPARQL à exécuter à chaque opération. Et maintenant… un exemple. 1.

RDF pour les nuls Préambule du 27 août 2007 : à la suite d'un bon billet de David sur RDF, je voulais ajouter en commentaire la référence vers ce billet que j'avais écrit le 8 septembre 2006 ; je me suis alors aperçu qu'il n'avait pas été récupéré lors de l'import de mon ancien blog. Comme j'avais un peu la flemme de rechercher dans mes archives persos, mon sauveur se nomme Internet Archive dont le crawler salutaire avait indexé cette page. Qu'il en soit remercié. Pour vous faire apprécier pleinement toute la substantifique moelle du prochain billet, je me suis dit qu'il serait peut-être utile de réexpliquer le principe général de RDF1. RDF n'est pas un langage de programmation, ni même un langage à balises permettant de structurer une information. En langage naturel, pour décrire les données/choses/objets/concepts... on dispose des phrases qui sont composées de mots eux-mêmes constitués par l'agencement de sons et organisés selon une grammaire (ouf !!). Deux types d'objets en RDF utilisent les URIs :

SPARQL vs. SQL - Intro This lesson compares the SPARQL and SQL query languages, which are designed to query RDF and relational data, respectively. You may be reading this lesson because you know one and want to learn the other or because you need to make some decisions about which to use for some purpose. First, let's look at their data models; that is, the way we consider their data to be structured. Comparing RDF and SQL data Many people ask what can be done with SPARQL that can't be done with SQL, when in fact they care about what can be done in RDF that can't be done with relational databases. Both of these languages give the user access to create, combine, and consume structured data. Relational data is made up of rows of data collected into tables (also called a "relations" in formal relational literature). CREATE TABLE Person ( ID INT, fname CHAR(10), addr INT, FOREIGN KEY(addr) REFERENCES Address(ID) ); CREATE TABLE Address ( ID INT, city CHAR(10), state CHAR(2) ) <PersonA> a <Person> . SELECT ? SELECT ?

Apache Stanbol as testbed for Knowledge Management Course: BaMaNews Project Hi everybody! We are Carlo and Umberto, students of Computer Science at the University of Bologna. We want to share our experience in developing a software project, named BaMaNews, during the course in Knowledge Management taught by Valentina Presutti. At the end of the post we provide a link to download our installation guide of the Topic Classification Engine. What is Facet? In the original concept of faceted classification, there was the intention of creating a method of classification that would provide not only a library catalog for books consultation, but also a way to arrange the books on the shelves according to a suitable order that would allow users to locate directly the documents relevant for them. The facet is a particular aspect under which a topic can be treated. What is BaMaNews? The project “BaMaNews” has the purpose to represent the faceted navigation in the context of the fruition of newspaper articles. For the project we address the Guardian website.

gr4php - PHP API for consuming GoodRelations e-commerce data GR4PHP is a PHP API (as library) that allows the consumption of GoodRelations data on an eligible SPARQL endpoint without expecting the developer to have deeper understanding of the underlying GoodRelations vocabulary or SPARQL queries. The API provides six abstract functions, which are interally translated into proper SPARQL queries for GoodRelations. getCompany: Returns information about a GoodRelations BusinessEntity. getLocation: Return stores in the proximity of a given geographic point. getOffers: Returns GoodRelations Offerings given search criteria. getOpeningHours: Gives opening hours to a given store (GoodRelations LocationOfSalesOrServiceProvisioning). getProductModel: Returns details about model data (GoodRelations ProductOrServiceModel). getStore: Gives response data to a SPARQL query searching for GoodRelations LocationOfSalesOrServiceProvisioning. Take a closer look at this page for an entire view on input and output parameters of the available functions. Benefits of GR4PHP

OWL API Developers Guide to Semantic Web Toolkits for different Programming Languages Abstract This guide collects links to Semantic Web toolkits for different programming languages and gives an overview about the features of each toolkit, the strength of the development effort and the toolkit's user community. Table of Contents This guide collects links to Semantic Web toolkits for different programming languages. We evaluate for each toolkit: which features are offered (APIs, query languages, storage, reasoning support), the strength of the development effort (number of developers involved, latest release), the activity level of the toolkit's user community (number of downloads, active mailing list). Our current evaluation results are found below. Request for Support We are trying to keep this guide up-to-date. If you know about a toolkit that we have missed, it would be nice if you could send us a link. All hints are highly appreciated. Alternative Toolkit Lists Other, alternative toolkit lists are found at 2.2 Haskell 2.4 JavaScript 2.5 Common Lisp 2.6 .Net/Mono 2.9 Pike

Learning SPARQL: Querying and Updating With Sparql 1.1: Amazon.fr: Bob DuCharme: Livres anglais et étrangers

Related: