Lundi 23 janvier 2006 1
Master Web Intelligence 2005/2006
Web SémantiquePhilippe Beaune
ENSMSEmailto : [email protected]
Lundi 23 janvier 2006 2
Bref retour sur le TP ontologies
Modéliser une ontologie c'est pas confortable : l'énoncé du TP le réflétait, sans exagérationVous auriez dû vous poser la question : puisje utiliser Dublin Core ? Une ontologie sur le temps ? ...Dans un premier temps vous auriez dû vous éloigner du clavier avec un papier et un crayon ...
Lundi 23 janvier 2006 3
TP :astuceMaMetaClasse
template slots : créateur = PhB
MaSuperClassetemplate slots : créateur = PhB
UneClasseslots : créateur = PhBtemplate slots : créateur = PhB
UneSousClasseslots : créateur = PhBtemplate slots : créateur = PhB
Instance1slots : créateur = PhB
Instance2slots : créateur = PhB
Instance
Instance Instance
SubClass
SubClass Instance
en Protégé
Lundi 23 janvier 2006 4
Plan général révisé(21h en 7 séances)
Mardi 3 janv AM : repr. des connaissancesMardi 10 janv AM : DL & ontologiesLundi 16 janv PM : TP ProtégéMardi 17 janv AM : TP ontologieLundi 23 janv PM : Le Web SémantiqueLundi 23 janv PM : Le Web Sémantique
Mardi 24 janv AM : TP OWLMercredi 1er fév (8h – 10h) : examen
Lundi 23 janvier 2006 5
Rappel
Lundi 23 janvier 2006 6
Nouvelle vision (2002)
Motivation
Lundi 23 janvier 2006 7
Plan du cours
Généralités sur le Web Sémantique et applicationsLangages pour le Web Sémantique
XMLRDF et RDFSOWL = DAML+OIL ?
Web Services
Lundi 23 janvier 2006 8
Documents pour approfondirÀ disposition, quelques articles (PDF) généralistes mais de référence sur : http://www.emse.fr/~beaune/websem/
Un dossier AFIA (avril 2003)Un article des assises 2002 du GdR I3Un article basique de Tim BernersLee (2001)La vision d'Aaron Swartz (2002)Perspectives : rapport EUNSF (J. Euzénat, 2002)Des tutoriaux, etc.
Attention aux droits d'auteur
Lundi 23 janvier 2006 9
Le Web actuel
Navigation à très bas niveau :Clics sur des liensRecherche de pages par mots clés« c'est comme de la programmation en assembleur avec des goto »
Problèmes :Des millions de documents sont sur le Web !Pertinence, précision, ... des recherches
Lundi 23 janvier 2006 10
Le Web actuel (suite)
Recherche d'infos limitée :L'Homme doit interpréter le résultat
Interopérabilité difficile :Différents points de vue sur les documents
Services limités :Ex : comment organiser un séjour ?
Lundi 23 janvier 2006 11
Solution niv. 1 : Wrapper
Lundi 23 janvier 2006 12
Wrapper (suite)
Automatisation de l'extraction de l'information et médiationLe mediator s'occupe de l'utilisateur et les wrappers des sources de donnéesLes wrappers ont été adaptés aux données semistructurées, et tentent d'utiliser le format HTML avec des heuristiques (ex. : pour trouver un prix, chercher un nombre suivi d'un symbole monétaire)
Lundi 23 janvier 2006 13
Solution niv. 2 : ajout de sémantique
XML : les balises indiquent la sémantique (implicite, par convention) des données <nom>Philippe Beaune</nom>
XML structure les données en arborescences<personne>
<nom>Philippe Beaune</nom><téléphone>+(33) 477 420 136</téléphone>
</personne>
XML permet de définir des balises personnelles
Lundi 23 janvier 2006 14
Ajout de sémantique (suite)
XML lie la structure et la sémantique dans les documentsRDF permet d'ajouter de la sémantique sans aucun présupposé sur la structure du document :
Application XMLAjout de métainformation aux documents Web
RDFS : schéma de structuration des données
Lundi 23 janvier 2006 15
Solution niv. 3 : les ontologiesOntologies =
Spécifications formelles et consensuelles de conceptualisationsCompréhension commune et partagée d'un domaine
Mais quid de la standardisation du vocabulaire ?Et quid de la standardisation de la structuration ?
Lundi 23 janvier 2006 16
Applications
Lundi 23 janvier 2006 17
Knowledge Management
Gestion des connaissances, gestion des compétences, ... : acquisition, maintenance et accès à la connaissance, interopérabilitéLes grandes entreprises ont des intranet très fournisLes ontologies permettent des définitions structurelles et sémantiques des documentsRecherche d'informations, échanges de documents, maintenance, ...
Lundi 23 janvier 2006 18
B2C / recherche d'infos
Parcours manuel des magasins en ligneWrappers : spécifiques à chaque magasinsInfos partielles (ex : frais de port)Avec une structuration des informations : agents intelligents pour aider au choixIl faut que ces agents comprennent l'information disponible
Lundi 23 janvier 2006 19
Commerce électronique (B2B)
EDIFACT : lourd, coûteux, pas lisible, peu intégré, maintenance, pas évolutif, ...Ontologies : lisibles, interopérables, outils, ...Mais il faut quand même des traducteurs : <produit> <auto>
<type>voiture</type> <nom><nom>Renault></nom> <Renault><prix>20 000 euros</prix> </nom>
</produit> <prix>x $</prix>
</auto>
Lundi 23 janvier 2006 20
Un scénario (cf. Euzénat)
Quelques exemples illustratifs ...... mais surtout pas prédictifs.
Les usages ne précèdent pas la technologie, mais la technologie permet les usages.
Lundi 23 janvier 2006 21
ScénarioClara, en vacances à Honolulu, rencontre plusieurs personnes avec qui elle échange des vCards. Un soir, elle consulte son assistant pour les prévisions du lendemain. Son assistant lui ressort une vCard : « Ce type semble correspondre à l'offre de poste que Bill a publiée sur l'intranet. Puisje en informer Bill ? ». Clara demande des explications. L'assistant : « d'après son CV, trouvé sur le site de sa compagnie, il a les compétences requises, en temps que statisticien, à la tête d'une équipe de Data Mining, dans un labo de ... à l'Université Xx ». Clara demande le degré de confiance en tout ça. L'assistant : « il est cité plusieurs fois dans les pages de l'Université Xx et les revues dans lesquelles il a publié sont bien cotées par l'assistant de Bill... ». Clara autorise la transmission.
Bill et Peter se donnent rendezvous à tel congrès ... Grâce à l'assistant de Peter qui sait qu'il est végétarien, ils évitent un faux pas. Avant le repas, Peter examine un point qui le tracasse : Bill a utilisé le mot « Services » en parlant de ... Son assistant lui montre que « Services » en bases de données signifie ...
Lundi 23 janvier 2006 22
Scénario (suite)
Besoins :Assistants performantsConnectivité sans filÉchange de connaissancesProtocoles de négociationUn grand nombre de données et de connaissancesProtection des donnéesDes modèles de confiance, de négociation, de filtrage, ...
Lundi 23 janvier 2006 23
Plan du cours
Généralités sur le Web Sémantique et applicationsLangages pour le Web Sémantique
XMLRDF et RDFSOWL = DAML+OIL ?
Web Services
Lundi 23 janvier 2006 24
XML rappels
Un SGML simplifiéHTML était prévu pour décrire la structure d'un document, mais il est utilisé comme un langage de présentationXML : structures arborescentes avec une syntaxe linéaireXML : extensibleXML : métalangage
Lundi 23 janvier 2006 25
XML : rappels (suite)
Éléments : <balise>contenu</balise>Attributs : <balise nom=valeur> ... </balise>Références : < ...Commentaires : <! blabla >Process Instructions : <?name pidata?>CDATA : <![CDATA[ quelque chose ]]>Prologue : <?XML version=.... ?> ...
Lundi 23 janvier 2006 26
XML : rappels (suite)
Un document XML est valide s'il est bienformé et, lorsqu'il utilise une DTD, s'il respecte cette DTD (ou un schéma XML)Schéma XML : définit la structure des documents, le vocabulaire des balises, des types de données, des contraintes, ...Espaces de noms...
Lundi 23 janvier 2006 27
XML : espaces de noms
Un même document doit pouvoir utiliser plusieurs vocabulaires de balisages :
Conception modulaireRéutilisationMêmes noms (éléments, attributs) avec sens différents dans vocabulaires indépendantsLèver les ambiguïtésExemple :
titre = M, Mme, Mlletitre = « Les fleurs du mal »
Lundi 23 janvier 2006 28
XML : espaces de noms syntaxe
<definitions name=...xmlns:soap=''http://schemas.xmlsoap.org/wsdl/soap/''...>
<soap:body use=''quelque chose''>
</definitions>
Lundi 23 janvier 2006 29
RDF : présentation
Resource Description FrameworkPermet la représentation de métadonnées (données sur les données)Ce modèle peut être vu comme un graphe étiqueté et orienté, ou comme un modèle orienté objetsUne syntaxe en XML ; mais pas la seule
Lundi 23 janvier 2006 30
RDF : objectifsThe broad goal of RDF is to define a mechanism for describing resources that makes no assumptions about a particular application domain, nor defines (a priori) the semantics of any application domain. The definition of the mechanism should be domain neutral, yet the mechanism should be suitable for describing information about any domain.
The foundation of RDF is a model for representing named properties and property values. The RDF model draws on wellestablished principles from various data representation communities. RDF properties may be thought of as attributes of resources and in this sense correspond to traditional attributevalue pairs. RDF properties also represent relationships between resources and an RDF model can therefore resemble an entityrelationship diagram. (More precisely, RDF Schemas which are themselves instances of RDF data models are ER diagrams.) In objectoriented design terminology, resources correspond to objects and properties correspond to instance variables.
Lundi 23 janvier 2006 31
RDF : 4 niveaux
Des triplets d'URIs3 types de bases : ressources, propriétés et délcarationsDes types plus complexes : listes, collections, alternatives, ...Des schémas : classes, types de propriétés, ...
Lundi 23 janvier 2006 32
RDF : déclarations
Une délcaration est un triplet (a,b,c) qui signifie que le sujet a a comme valeur pour la propriété b l'objet c
(http://www.w3.org/Home/Lassila , hasCreator , Ora Lassila)
Lundi 23 janvier 2006 33
RDF : déclaration sur des déclarations
(st1 , rdf:subject , http://www.w3.org/H... )(st1 , rdf:predicate , hasCreator)(st1 , rdf:object , Ora Lassila)
(Philippe , dit , st1)
Lundi 23 janvier 2006 34
RDF : les 3 types de base
Resources :All things being described by RDF expressions are called
resources. A resource may be an entire Web page; such as the HTML document "http://www.w3.org/Overview.html" for example. A resource may be a part of a Web page; e.g. a specific HTML or XML element within the document source. A resource may also be a whole collection of pages; e.g. an entire Web site. A resource may also be an object that is not directly accessible via the Web; e.g. a printed book. Resources are always named by URIs plus optional anchor ids. Anything can have a URI; the extensibility of URIs allows the introduction of identifiers for any entity imaginable.
Lundi 23 janvier 2006 35
Properties : a property is a specific aspect, characteristic, attribute, or relation used to describe a resource. Each property has a specific meaning, defines its permitted values, the types of resources it can describe, and its relationship with other properties. This document does not address how the characteristics of properties are expressed (for such information, refer to the RDF Schema specification).
Statements : a specific resource together with a named property plus the value of that property for that resource is an RDF statement. These three individual parts of a statement are called, respectively, the subject, the predicate, and the object. The object of a statement (i.e., the property value) can be another resource or it can be a literal; i.e., a resource (specified by a URI) or a simple string or other primitive datatype defined by XML. In RDF terms, a literal may have content that is XML markup but is not further evaluated by the RDF processor. There are some syntactic restrictions on how markup in literals may be expressed
RDF : les 3 types de base
Lundi 23 janvier 2006 36
RDF : exempleOra Lassila is the creator of the resource http://www.w3.org/Home/Lassila
Subject (Resource) http://www.w3.org/Home/Lassila
Predicate (Property) Creator
Object (literal) "Ora Lassila"
http://www.w3.org/Home/Lassila has creator Ora Lassila
Lundi 23 janvier 2006 37
RDF : exemple (suite)The individual whose name is Ora Lassila, email <[email protected]>, is the creator of http://www.w3.org/Home/Lassila.
http://www.w3.org/Home/Lassila has creator something and something has name Ora Lassila and email [email protected]
Lundi 23 janvier 2006 38
RDF : exemple suite
The individual referred to by employee id 85740 is named Ora Lassila and has the email address [email protected]. The resource http://www.w3.org/Home/Lassila was created by this individual.
Lundi 23 janvier 2006 39
RDF : syntaxe XML de base [1] RDF ::= ['<rdf:RDF>'] description* ['</rdf:RDF>'] [2] description ::= '<rdf:Description' idAboutAttr? '>'
propertyElt* '</rdf:Description>' [3] idAboutAttr ::= idAttr | aboutAttr [4] aboutAttr ::= 'about="' URI-reference '"' [5] idAttr ::= 'ID="' IDsymbol '"' [6] propertyElt ::= '<' propName '>' value '</' propName '>' | '<' propName resourceAttr '/>' [7] propName ::= Qname [8] value ::= description | string [9] resourceAttr ::= 'resource="' URI-reference '"' [10] Qname ::= [ NSprefix ':' ] name [11] URI-reference ::= string, interpreted per [URI] [12] IDsymbol ::= (any legal XML name symbol) [13] name ::= (any legal XML name symbol) [14] NSprefix ::= (any legal XML namespace prefix) [15] string ::= (any XML text, with "<", ">", and "&"
escaped)
Lundi 23 janvier 2006 40
RDF : exempleOra Lassila is the creator of the resource http://www.w3.org/Home/Lassila
Subject (Resource) http://www.w3.org/Home/Lassila
Predicate (Property) Creator
Object (literal) "Ora Lassila"
<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22rdfsyntaxns#" xmlns:s="http://description.org/schema/"> <rdf:Description about="http://www.w3.org/Home/Lassila"> <s:Creator>Ora Lassila</s:Creator> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 41
RDF : exemple<rdf:RDF xmlns:rdf="http://wwww.w3.org/1999/02/22rdfsyntaxns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ex="http://mon_url.org/version/1.1/"> <rdf:Description rdf:ID="michel"/> <rdf:Description rdf:ID="vertigo"> <ex:homepage> <rdf:Description rdf:about= ''http://cedric.cnam.fr/vertigo''> <dc:author> <rdf:Description rdf:about="#michel"/> </dc:author> </rdf:Description> </ex:homepage> <ex:directeur> <rdf:Description rdf:about="#michel" /> </ex:directeur> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 42
RFD : exercice
Écrivez dans cette syntaxe de base les deux exemples précédents :
Page 36Page 37
Lundi 23 janvier 2006 43
RDF : syntaxesDes syntaxes XML abrégées existent
[2a] description ::= '<rdf:Description' idAboutAttr? propAttr* '/>' | '<rdf:Description' idAboutAttr? propAttr* '>' propertyElt* '</rdf:Description>' | typedNode[6a] propertyElt ::= '<' propName '>' value '</' propName '>' | '<' propName resourceAttr? propAttr* '/>'[16] propAttr ::= propName '="' string '"' (with embedded quotes escaped)[17] typedNode ::= '<' typeName idAboutAttr? propAttr* '/>' | '<' typeName idAboutAttr? propAttr* '>' property* '</' typeName '>'
Lundi 23 janvier 2006 44
RDF : containersBag : an unordered list of resources or literals. Bags are used to declare
that a property has multiple values and that there is no significance to the order in which the values are given. Bag might be used to give a list of part numbers where the order of processing the parts does not matter. Duplicate values are permitted.
Sequence : an ordered list of resources or literals. Sequence is used to declare that a property has multiple values and that the order of the values is significant. Sequence might be used, for example, to preserve an alphabetical ordering of values. Duplicate values are permitted.
Alternative : a list of resources or literals that represent alternatives for the (single) value of a property. Alternative might be used to provide alternative language translations for the title of a work, or to provide a list of Internet mirror sites at which a resource might be found. An application using a property whose value is an Alternative collection is aware that it can choose any one of the items in the list as appropriate.
Lundi 23 janvier 2006 45
RDF containers : syntaxe
[18] container ::= sequence | bag | alternative [19] sequence ::= '<rdf:Seq' idAttr? '>' member* '</rdf:Seq>' [20] bag ::= '<rdf:Bag' idAttr? '>' member* '</rdf:Bag>' [21] alternative ::= '<rdf:Alt' idAttr? '>' member+ '</rdf:Alt>' [22] member ::= referencedItem | inlineItem [23] referencedItem ::= '<rdf:li' resourceAttr '/>' [24] inlineItem ::= '<rdf:li>' value '</rdf:li>'
Containers may be used everywhere a Description is permitted:
[1a] RDF ::= '<rdf:RDF>' obj* '</rdf:RDF>' [8a] value ::= obj | string [25] obj ::= description | container
Lundi 23 janvier 2006 46
RDF containers : exemple
The students in course 6.001 are Amy, Tim, John, Mary, and Sue
<rdf:RDF> <rdf:Description about="http://mycollege.edu/courses/6.001"> <s:students> <rdf:Bag> <rdf:li resource="http://mycollege.edu/students/Amy"/> <rdf:li resource="http://mycollege.edu/students/Tim"/> <rdf:li resource="http://mycollege.edu/students/John"/> <rdf:li resource="http://mycollege.edu/students/Mary"/> <rdf:li resource="http://mycollege.edu/students/Sue"/> </rdf:Bag> </s:students> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 47
RDF containers : exempleThe source code for X11 may be found at ftp.x.org, ftp.cs.purdue.edu, or
ftp.eu.net
<rdf:RDF> <rdf:Description about="http://x.org/packages/X11"> <s:DistributionSite> <rdf:Alt> <rdf:li resource="ftp://ftp.x.org"/> <rdf:li resource="ftp://ftp.cs.purdue.edu"/> <rdf:li resource="ftp://ftp.eu.net"/> </rdf:Alt> </s:DistributionSite> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 48
RDF : referents
Ora est créatrice du « Bag », et pas des pages. La référence de la description est le container.
<rdf:Bag ID="pages"> <rdf:li resource="http://foo.org/foo.html" /> <rdf:li resource="http://bar.org/bar.html" /></rdf:Bag>
<rdf:Description about="#pages"> <s:Creator>Ora Lassila</s:Creator></rdf:Description>
Lundi 23 janvier 2006 49
RDF : distributive referent(retiré de la recomm de 2004)
Pour exprimer que Ora est créatrice de toutes les pages il faut étendre la syntaxe :[3a] idAboutAttr ::= idAttr | aboutAttr | aboutEachAttr
[26] aboutEachAttr ::= 'aboutEach="' URI-reference '"'
<rdf:Description aboutEach="#pages"> <s:Creator>Ora Lassila</s:Creator></rdf:Description>
<rdf:Description about="http://foo.org/foo.html"> <s:Creator>Ora Lassila</s:Creator></rdf:Description><rdf:Description about="http://bar.org/bar.html"> <s:Creator>Ora Lassila</s:Creator></rdf:Description>
Équivalent à :
Lundi 23 janvier 2006 50
RDF : container et motif URI(retiré de la recomm de 2004)
Comment exprimer : "all pages at my Web site", or "all pages in this branch of my Web site" ?
[26a] aboutEachAttr ::= 'aboutEach="' URI-reference '"' | 'aboutEachPrefix="' string '"'
<rdf:Description aboutEachPrefix="http://foo.org/doc"> <s:Copyright>© 1998, The Foo Organization</s:Copyright></rdf:Description>
<rdf:Description about="http://foo.org/doc/page1"> <s:Copyright>© 1998, The Foo Organization</s:Copyright></rdf:Description><rdf:Description about="http://foo.org/doc/page2"> <s:Copyright>© 1998, The Foo Organization</s:Copyright></rdf:Description>
Équivalent à :
Lundi 23 janvier 2006 51
RDF : container vs repeated prop.
Sue has written "Anthology of Time", "Zoological Reasoning", "Gravitational Reflections".
Lundi 23 janvier 2006 52
RDF : container vs repeated prop.
The committee of Fred, Wilma, and Dino approved the resolution.
Lundi 23 janvier 2006 53
RDF : statements about statements
Ralph Swick says that Ora Lassila is the creator of the resource http://www.w3.org/Home/Lassila.
Lundi 23 janvier 2006 54
RDF : statements about statements
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:a="http://description.org/schema/"> <rdf:Description> <rdf:subject resource="http://www.w3.org/Home/Lassila" /> <rdf:predicate resource="http://description.org/schema/Creator" /> <rdf:object>Ora Lassila</rdf:object> <rdf:type resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement" /> <a:attributedTo>Ralph Swick</a:attributedTo> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 55
RDF : statements about statements (retiré de la recomm de 2004)
<rdf:RDF> <rdf:Description about="http://www.w3.org/Home/Lassila" bagID="D_001"> <s:Creator>Ora Lassila</s:Creator> <s:Title>Ora's Home Page</s:Title> </rdf:Description></rdf:RDF>
[2b] description ::= '<rdf:Description' idAboutAttr? bagIDAttr? propAttr* '/>' | '<rdf:Description' idAboutAttr? bagIDAttr? propAttr* '>' propertyElt* '</rdf:Description>' [27] bagIDAttr ::= 'bagID="' IDsymbol '"'
Lundi 23 janvier 2006 56
Lundi 23 janvier 2006 57
<rdf:Description aboutEach="#D_001"> <a:attributedTo>Ralph Swick</a:attributedTo></rdf:Description>
Lundi 23 janvier 2006 58
RDF : exemple avec Dublin Core
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/metadata/dublin_core#"> <rdf:Description about="http://www.dlib.org"> <dc:Title>D-Lib Program - Research in Digital Libraries</dc:Title> <dc:Description>The D-Lib program supports the community of people with research interests in digital libraries and electronic publishing.</dc:Description> <dc:Publisher>Corporation For National Research Initiatives</dc:Publisher> <dc:Date>1995-01-07</dc:Date> <dc:Subject> <rdf:Bag> <rdf:li>Research; statistical methods</rdf:li> <rdf:li>Education, research, related topics</rdf:li> <rdf:li>Library use Studies</rdf:li> </rdf:Bag> </dc:Subject> <dc:Type>World Wide Web Home Page</dc:Type> <dc:Format>text/html</dc:Format> <dc:Language>en</dc:Language> </rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 59
RDFS : pourquoi ?
Besoin de créer des vocabulaires dans certains domainesDonc besoin d'un langage pour le faireRDFS = RDF vocabulary description language (adopté le 10 février 2004)RDFS permet de créer des vocabulaires et de les organiser dans des hiérarchies typées (classes, sousclasses, type, propriétés, souspropriétés, domaines, intervalles, ...)
Lundi 23 janvier 2006 60
RDFS (cand .recom. 27 mars 2000)
Lundi 23 janvier 2006 61
RDFS (cand. recom. 27 mars 2000)
Lundi 23 janvier 2006 62
RDFS : exemple
Lundi 23 janvier 2006 63
RDFS : exemple<rdf:RDF xml:lang="en" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"><!-- Note: this RDF schema would typically be used in RDF instance data by referencing it with an XML namespace declaration, for example xmlns:xyz="http://www.w3.org/2000/03/example/vehicles#". This allows us to use abbreviations such as xyz:MotorVehicle to refer unambiguously to the RDF class 'MotorVehicle'. --><rdf:Description ID="MotorVehicle"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/></rdf:Description><rdf:Description ID="PassengerVehicle"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description><rdf:Description ID="Truck"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description><rdf:Description ID="Van"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/></rdf:Description><rdf:Description ID="MiniVan"> <rdf:type resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/></rdf:Description></rdf:RDF>
Lundi 23 janvier 2006 64
RFDS : autre exempleLa propriété a_pour_mari est une souspropriété de a_pour_conjoint, et que tous les sujets de a_pour_mari sont membres de #Femme et #Mariés ; et que les objets de cette propriété sont membres de #Homme et #Mariés :
<rdf:RDF> <rdf:Property rdf:ID="a_pour_conjoint"/> <rdf:Property rdf:ID="a_pour_mari"> <rdfs:subPropertyOf rdf:resource="#a_pour_conjoint"/> <rdfs:domain rdf:resource="#Femme"/> <rdfs:domain rdf:resource="#Mariés"/> <rdfs:range rdf:resource="#Homme"/> <rdfs:range rdf:resource="#Mariés"/> </rdf:Property></rdf:RDF>
Lundi 23 janvier 2006 65
Plan du cours
Généralités sur le Web Sémantique et applicationsLangages pour le Web Sémantique
XMLRDF et RDFSOWL = DAML+OIL ?
Web Services
Lundi 23 janvier 2006 66
Pourquoi aller plus haut ?
Avec RDF(S) : on ne peut pas exprimer la disjonction, l'équivalence, la cardinalité, des conditions nécessaires et suffisantes, ...On ne peut pas raisonner (ou si peu!)OWL : Web Ontology Language (W3C)Mais avant :
DAML (DARPA Agent Markup Language)OIL (Ontology Inference Layer, ISTFP5)
Lundi 23 janvier 2006 67
ExempleFor example, a suitable pizza ontology might
include the information that Mozzarella and Gorgonzola are kinds of cheese, that cheese is not a kind of meat or fish, and that a vegetarian pizza is one whose toppings do not include any meat or fish. This information allows the term « pizza topped with (only) Mozzarella and Gorgonzola » to be unambiguously interpreted (by, e.g., a pizza ordering agent) as a specialisation of the term « vegetarian pizza ».
Lundi 23 janvier 2006 68
Lundi 23 janvier 2006 69
OWL = DAML+OIL ?OWL is intended to be used when the information contained
in documents needs to be processed by applications, as opposed to situations where the content only needs to be presented to humans. OWL can be used to explicitly represent the meaning of terms in vocabularies and the relationships between those terms. This representation of terms and their interrelationships is called an ontology. OWL has more facilities for expressing meaning and semantics than XML, RDF, and RDF-S, and thus OWL goes beyond these languages in its ability to represent machine interpretable content on the Web. OWL is a revision of the DAML+OIL web ontology language incorporating lessons learned from the design and application of DAML+OIL.
Lundi 23 janvier 2006 70
OWL The OWL Web Ontology Language is designed for
use by applications that need to process the content of information instead of just presenting information to humans. OWL facilitates greater machine interpretability of Web content than that supported by XML, RDF, and RDF Schema (RDF-S) by providing additional vocabulary along with a formal semantics. OWL has three increasingly-expressive sublanguages: OWL Lite, OWL DL, and OWL Full.
Lundi 23 janvier 2006 71
OWLXML provides a surface syntax for structured documents, but imposes no semantic constraints on the meaning of these documents.XML Schema is a language for restricting the structure of XML documents.RDF is a datamodel for objects ("resources") and relations between them, provides a simple semantics for this datamodel, and these datamodels can be represented in an XML syntax.RDF Schema is a vocabulary for describing properties and classes of RDF resources, with a semantics for generalization-hierarchies of such properties and classes.OWL adds more vocabulary for describing properties and classes: among others, relations between classes (e.g. disjointness), cardinality (e.g. "exactly one"), equality, richer typing of properties, characteristics of properties (e.g. symmetry), and enumerated classes.
Lundi 23 janvier 2006 72
Souslangages d'OWL
OWL Lite supports those users primarily needing a classification hierarchy and simple constraints. For example, while it supports cardinality constraints, it only permits cardinality values of 0 or 1. It should be simpler to provide tool support for OWL Lite than its more expressive relatives, and OWL Lite provides a quick migration path for thesauri and other taxonomies. Owl Lite also has a lower formal complexity than OWL DL, see the section on OWL Lite in the OWL Reference for further details.
OWL DL supports those users who want the maximum expressiveness while retaining computational completeness (all conclusions are guaranteed to be computed) and decidability (all computations will finish in finite time). OWL DL includes all OWL language constructs, but they can be used only under certain restrictions (for example, while a class may be a subclass of many classes, a class cannot be an instance of another class). OWL DL is so named due to its correspondence with description logics, a field of research that has studied the logics that form the formal foundation of OWL.
Lundi 23 janvier 2006 73
Souslangages d'OWLOWL Full is meant for users who want maximum expressiveness and the syntactic freedom of RDF with no computational guarantees. For example, in OWL Full a class can be treated simultaneously as a collection of individuals and as an individual in its own right. OWL Full allows an ontology to augment the meaning of the pre-defined (RDF or OWL) vocabulary. It is unlikely that any reasoning software will be able to support complete reasoning for every feature of OWL Full.
Every legal OWL Lite ontology is a legal OWL DL ontology.
Every legal OWL DL ontology is a legal OWL Full ontology.
Every valid OWL Lite conclusion is a valid OWL DL conclusion.
Every valid OWL DL conclusion is a valid OWL Full conclusion.
Lundi 23 janvier 2006 74
OWL et RDFOWL Full can be viewed as an extension of RDF, while OWL Lite
and OWL DL can be viewed as extensions of a restricted view of RDF. Every OWL (Lite, DL, Full) document is an RDF document, and every RDF document is an OWL Full document, but only some RDF documents will be a legal OWL Lite or OWL DL document. Because of this, some care has to be taken when a user wants to migrate an RDF document to OWL. When the expressiveness of OWL DL or OWL Lite is deemed appropriate, some precautions have to be taken to ensure that the original RDF document complies with the additional constraints emposed by OWL DL and OWL Lite. Among others, every URI that is used as a class name must be explicitly asserted to be of type owl:Class (and simililarly for properties), every individual must be asserted to belong to at least one class (even if only owl:Thing), the URI's used for classes, properties and individuals must be mutually disjoint. The details of these and other constraints on OWL DL and OWL Lite are explained in appendix E of the OWL Reference.
Lundi 23 janvier 2006 75
Avec RDFS ...Using RDFS we can
declare classes like Country, Person, Student and Canadian;
state that Student is a subclass of Person;
state that Canada and England are both instances of the class Country;
declare Nationality as a property relating the classes Person (its domain) and Country (its range);
state that age is a datatype property, with Person as its domain and integer as its range;
state that Peter is an instance of the class Canadian, and that his age has value 48.
Lundi 23 janvier 2006 76
Mais avec OWL :With OWL we can additionally:
state that Country and Person are disjoint classes;
state that Canada and England are distinct individuals;
declare HasCitizen as the inverse property of Nationality;
state that the class Stateless is defined precisely as those members of the class Person that have no values for the property Nationality;
state that the class MultipleNationals is defined precisely as those membes of the class Person that have at least 2 values for the property Nationality;
state that the class Canadian is defined precisely as those members of the class Person that have Canada as a value of the property Nationality;
state that age is a functional property.
Lundi 23 janvier 2006 77
OWL Lite : survol (1)
Class : groupe d'individus, mêmes propriétés<owl:Class rdf:ID="Regions"/>
rdfs:subClassOfrdfs:Property ; rdfs:subPropertyOfrdfs:domain ; rdfs:rangeIndividual : instances de classes<Regions rdf:ID="Rhone_Alpes"/>
Lundi 23 janvier 2006 78
OWL Lite : survol (2)
equivalentClass :<owl:Class rdf:ID="Titi">
<owl:equivalentClass rdf:resource="Toto"/>
</owl:Class>
equivalentProperty ; sameAs ; differentFrom ; AllDifferentinverseOf ; TransitiveProperty ; SymmetricProperty ; FunctionnalProperty ; ...allValueFrom ; someValueFrom ; minCardinality ...
Lundi 23 janvier 2006 79
OWL DL & Full : survol
oneOf : définir une classe en extension<owl:Class rdf:ID="Titi">
<owl:oneOf rdf:parseType="Collection"><Titi rdf:resource="#Prems"/>
<Titi rfd:resource="#Deuze"/>
</owl:oneOf>
</owl:Class>
disjointWith ; unionOf ; complementOf ; intersectionOf ; hasValue ...
Lundi 23 janvier 2006 80
OWL Full : survolowl:class équivalent à rdfs:classOWL Full also allows classes to be treated as individualsobject properties and datatype properties are not disjointOWL Full will typically be useful for people who want to combine the expressivity of OWL with the flexibility and metamodelling features of RDF. However, use of the OWL Full features means that one loses some guarantees that OWL DL and OWL Lite can provide for reasoning systems.
Lundi 23 janvier 2006 81
OWLDL : survol (1)
OWL DL requires a pairwise separation between classes, datatypes, datatype properties, object properties, annotation properties, ontology properties, individuals, data values and the builtin vocabulary. This means that, for example, a class cannot be at the same time an individual.
In OWL DL the set of object properties and datatype properties are disjoint.
OWL DL requires that no cardinality constraints (local nor global) can be placed on transitive properties or their inverses or any of their superproperties.
Annotations are allowed only under certain conditions.
Most RDF(S) vocabulary cannot be used within OWL DL.
Lundi 23 janvier 2006 82
OWLDL : survol (2)
All axioms must be wellformed, with no missing or extra components, and must form a treelike structure.
Axioms (facts) about individual equality and difference must be about named individuals.
These constraints of OWL DL may seem like an arbitrary set, but in fact they are not. The constraints are based on work in the area of reasoners for Description Logic, which require these restrictions to provide the ontology builder or user with reasoning support. In particular, the OWL DL restrictions allow the maximal subset of OWL Full against which current research can assure that a decidable reasoning procedure can exist for an OWL reasoner.
Lundi 23 janvier 2006 83
OWL : exemple (1)
The following example defines a class of individuals which have at least one parent who is a physician:
<owl:Restriction> <owl:onProperty rdf:resource="#hasParent" /> <owl:someValuesFrom rdf:resource="#Physician" /></owl:Restriction>
Lundi 23 janvier 2006 84
OWL : exemple (2)<owl:Class> <owl:intersectionOf rdf:parseType="Collection"> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Tosca" /> <owl:Thing rdf:about="#Salome" /> </owl:oneOf> </owl:Class> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <owl:Thing rdf:about="#Turandot" /> <owl:Thing rdf:about="#Tosca" /> </owl:oneOf> </owl:Class> </owl:intersectionOf></owl:Class>
Lundi 23 janvier 2006 85
OWL : exemple (3)<owl:Class rdf:ID="DaPonteOperaOfMozart"> <owl:equivalentClass> <owl:Class> <owl:oneOf rdf:parseType="Collection"> <Opera rdf:about="#Nozze_di_Figaro"/> <Opera rdf:about="#Don_Giovanni"/> <Opera rdf:about="#Cosi_fan_tutte"/> </owl:oneOf> </owl:Class> </owl:equivalentClass></owl:Class>
Lundi 23 janvier 2006 86
OWL : exemple (4)
<owl:Class rdf:ID="LivingBeing"> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:about="#Plant"/> <owl:Class rdf:about="#Animal"/> </owl:unionOf></owl:Class>
Lundi 23 janvier 2006 87
OWL Full : exemple (5)<owl:Class rdf:ID="FootballTeam">
<owl:sameAs rdf:resource="http://sports.org/US#SoccerTeam"/>
</owl:Class>
Note the difference with the statement:
<footballTeam owl:equivalentClass us:soccerTeam />
which states that the two classes have the same class extension, but are not (necessarily) the same concepts.
Lundi 23 janvier 2006 88
OWL : exemple (6)
<owl:AllDifferent>
<owl:distinctMembers rdf:parseType="Collection">
<Opera rdf:about="#Don_Giovanni"/>
<Opera rdf:about="#Nozze_di_Figaro"/>
<Opera rdf:about="#Cosi_fan_tutte"/>
<Opera rdf:about="#Tosca"/>
<Opera rdf:about="#Turandot"/>
<Opera rdf:about="#Salome"/>
</owl:distinctMembers>
</owl:AllDifferent>
Lundi 23 janvier 2006 89
Plan du cours
Généralités sur le Web Sémantique et applicationsLangages pour le Web Sémantique
XMLRDF et RDFSOWL = DAML+OIL ?
Web Services
Lundi 23 janvier 2006 90
Web services
Faire coopérer des applis sur le WebTravaux sur :
Protocoles de communicationsDescription des services et de leurs interactionsSécurité et vie privée
XMLP, SOAP, WSDL, .NET, J2EE, UDDI, OWLS, ...
Lundi 23 janvier 2006 91
Lundi 23 janvier 2006 92
Web Services
Lundi 23 janvier 2006 93
UDDI
Universal Description Discovery & IntegrationAnnuaires de services (publics ou privés)Contenu d'un enregistrement dans un annuaire UDDI :
businessEntity : decription de celui qui publiebusinessService : description d'une famille de servicesbindingTemplate : infos techniques sur un servicetmodel : format des requêtes et des réponses, gestion de la sécurité, protocoles, ...
Lundi 23 janvier 2006 94
WSDLWeb Services Language6 éléments majeurs :
Types : definitions des types de données (xsd) Message : définition des données transmisesOperation : description d'une action (in, out, fault)portType : ensemble d'opérations et messagesBinding : protocole et format de données (SOAP)Port : binding + adresse réseauService : ensemble de Ports
Lundi 23 janvier 2006 95
OWLService (OWLS)
OWLbased Web Service OntologyDescription d'un service avec :
ServiceProfile :Identification du fournisseur, entrées, résultats, effets, préconditions, QoS, restrictions, ...
ServiceModel :Processus, entrées/sorties,
ServiceGrounding :Protocoles, URI, messages, ...
Lundi 23 janvier 2006 96
Pour aller encore plus loin
Enrichir les web Services :
XQuery (à partir de Xpath)RuleML : pour coder des base de connaissances sous forme de règles de productionSWRL = OWL + RuleML