Download presentation
Presentation is loading. Please wait.
Published byEileen Wheeler Modified over 9 years ago
1
RDF – Resource Description Framework M. Missikoff – F. Taglino LEKS, IASI-CNR Una piattaforma inferenziale per il Web Semantico: Jena2 Roma, 2006 Web Semantico
2
2 Summary Motivations RDF knowledge model RDF(S) modelling notions XML/RDF, an XML syntax for RDF(S) Using RDF for inferring knowledge Extending RDF(S): OWL Conclusions
3
3 Motivations Semantic Web: Information needs to be processed by applications, rather than being only displayed to people (e.g., like with HTML) Common convention about semantics, syntax, and structure required Define a language for representing meta-data, with a semantic “flavor”
4
4 What is RDF? The Resource Description Framework is a Flexible language for representing knowledge over the web It models: conceptual knowledge (schemas) and factual knowledge (data) Enables the encoding, exchange, and reuse of structured knowledge about defined entities (identified by URI) Enables data interoperability through the design of mechanisms that support common conventions of semantics, syntax, and structure. The W3C Recommendation http://www.w3.org/TR/rdf-syntax-grammar/
5
5 URI - Uniform Resource Identifier Used to identify items on the Web Anyone can create a URI A URI can be associated to anything Network-accessible things, e.g., electronic document, image, service, … Not network-accessible things, e.g., human beings, corporation, book, car, … Abstract concepts, e.g., creator, member, … Uniform Resource Locator (URL) – one form of URI e.g., http://www.w3.org
6
6 RDF (Meta)Model Resource – thing that can be identified on the Web Property – specific aspect, characteristic, attribute, or relation used to describe a resource Value - Property’s value: resource or literal Connecting triples together we can represent a graph resource (subject) property (predicate) value (object) Knowledge is represented as collections of Triples
7
7 RDF: abstract (graph) representation john has_age john Person type Prof Student subClassOf mary has_sister 27
8
8 Statement (triple) The following sentence http://www.example.org/index.htmlhttp://www.example.org/index.html has creator whose_value_is John Smith Can be expressed by an RDF statement having: Subject http://www.example.org/index.htmlhttp://www.example.org/index.html Predicate http://purl.org/dc/creatorhttp://purl.org/dc/creator Object John Smith
9
9 Basic RDF Model - example http://www.example.org/index.htmlhttp://www.example.org/index.html has creator whose value is John Smith http://www.example.org/ index.html John Smith http://purl.org/dc/creator resource (subject) property (predicate) value (object) RDF Statement Please Note: when the object is a Literal it is represented by a BOX
10
10 RDF Schema The purpose is to define an XML vocabulary to: Denote classes (subclasses) and their relationships Define properties and associate them with classes The benefit is that Data are modeled according to schema (as usual in DB) inferencing on data, and enhanced searching are facilitated http://www.w3.org/TR/rdf-schema/
11
11 Knowledge model of RDF(S) Class range RDF(S) Meta-model Application specific schema (RDF(S) Model) Application specific actual data (RDF Instances) property Person Int has_age John has_age 2323 2323
12
12 RDF(S) modelling notions The following RDF(S) modelling notions are presented Schema definition: useful for defining new vocabularies (i.e., names of classes, of attributes, …) Utility: additional notions useful to enrich the entity definiton Label and Comment Complex Structures, e.g., Container Synonyms Note: we will present a simplified version of RDF(S). In particular, “reification” will be omitted
13
13 Schema definition (RDFS vocabulary) rdfs:Class Set of resources rdfs:subClassOf For defining specialisation among Classes rdfs:domain and rdfs:range Constraints on properties definition rdfs:subProperty For defining specialisation among Properties rdf:Property Borrowed from RDF (ground), but used at schema level
14
14 rdfs:Class Class is a resource denoting a set of resources (instances) Examples: Person River Person rdfs:Class River
15
15 rdfs:subClassOf – Example … NaturallyOccurringWaterSource Stream BodyOfWater Brook River Tributary Lake Ocean Sea rdfs:subClassOf
16
16 rdfs:subClassOf – Properties Allows specialisation hierarchy among Classes to be defined Multiple subClassOf properties may be specified Transitive (i.e., any River is a NaturallyOccurringWaterSource too)
17
17 Definition of a Property at intensional level rdfs:domain and rdfs:range Used to define properties at intentional level rdfs:domain, restricts the set of resources that may have a given property rdfs:range, restricts the set of valid values for a property. A property may have multiple domain, and more than one range
18
18 Example of definition of a Property at intensional level (1) River rdfs:Literal hasName rdfs:domain rdfs:range Class representing literals (strings) A River has a name expressed as a Literal rdf:Property rdfs:Class
19
19 Example of definition of a Property at intensional level (2) River BodyOfWater emptiesInto rdfs:domain rdfs:range rdf:Property rdfs:Class
20
20 rdfs:subPropertyOf Allows specialisation hierararchy among properties to be defined Multiple subPropertyOf properties for the same property can be specified
21
21 Example of a subProperty definition Person hasParent hasMother rdfs:domain rdfs:range rdfs:subPropertyOf The hasMother property is a sub property of the hasParent property rdfs:Class rdf:Property
22
22 Class instance definition rdf:type Instances are defined through the rdf:type property Yangtze River rdf:type The Yangtze is an instance of the River Class
23
23 Utility notions rdfs:label and rdfs:comment For describing resources with human readable text rdfs:Container Collections of resources rdfs:seeAlso and rdfs:isDefinedBy For referring to alternative descriptions of resources
24
24 rdfs:label and rdfs:comment Describe a resource with human readable text in addition to pure RDF properties rdfs:label, to assign a human readable name to a resource rdfs:comment, to give a longer natural language description to a resource Yangtze The biggest Chinese river rdfs:label rdfs:comment http://www.china.org/geography/ rivers/Yangtze http://www.china.org/geography/ rivers/Yangtze Yangtze The biggest Chinese river
25
25 Summary of RDF(S) modeling constructs rdfs:Class and rdf:type rdfs:subClassOf rdfs:domain and rdfs:range rdfs:subProperty and rdf:property rdfs:label and rdfs:comment rdfs:Container rdfs:seeAlso and rdfs:isDefinedBy rdf:Resource (the generic entity) rdf:ID (when the entity is first introduced) rdf:about (when the entity is referred to) rdf:Description
26
26 How RDF can be implemented Diagrammatic representation is an Abstract Syntax Several Concrete Sintaxes: usually RDF/XML syntax However, other notations possible e.g., Notation3 (N3): “Sean” RDF/XML Abreviated syntax Note: the symbol “#” is a separator between the Prefix and the resource ID
27
Using RDF(S) for Ontologies and Inferencing
28
28 An extract of an RDF ontology <rdf:RDF xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:rdfs=“http://www.w3.org/2000/01/rdf-schema#” xml:base=“http://www.geodesy.org/water/naturally-occurring”> Properties definition Domain and Range definition Namespaces declaration Classes definition Sub classes definition
29
29 What inferences can be made? NaturallyOccurringWaterSource Stream BodyOfWater Brook River Tributary Lake Ocean Sea rdfs:subClassOf Inference Engine <Riverrdf:ID=“http://www.china.org/geography/rivers/Yangtze” xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns=“http://www.geodesy.org/river#”> 6300 kilometers Inferences: - Yangtze is a Stream - Yangtze is a NaturallyOccurringWaterSource - http://www.china.org/EastChinaSea is a BodyOfWater - length: Literal - emptiesInto: BodyOfWater
30
30 How does a taxonomy facilitate searching? NaturallyOccurringWaterSource Stream BodyOfWater Brook River Tributary Lake Ocean Sea rdfs:subClassOf - length: Literal - emptiesInto: BodyOfWater <Riverrdf:ID=“http://www.china.org/geography/rivers/Yangtze” xmlns:rdf=“http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns=“http://www.geodesy.org/river#”> 6300 kilometers Results: - Yangtze is a Stream, so this document is relevant to the query Inference Engine “Show me all the documents that contain info about streams”
31
31 Desire more expressiveness Two classes, same concept Equivalent classes: Airplane and Plane Cardinality constraints Ocean has one maxDepth OWL RDF(S) RDF Schema: Building Block to more expressive Ontology Languages like OWL
32
32 OWL (Ontology Web Language) Provides three increasingly expressive languages OWL Full maximum expressiveness with no computational guarantees OWL DL, expressiveness of Description Logics without losing computational completeness OWL Lite, simple constraint features. E.g., cardinality constraints OWL Lite OWL DL OWL Full
33
33 Rules Allows for derivations, by introducing a “special” binary predicate: log:implies=> Subject and Object are RDF triples, called formulae Derivation (n3 syntax): {X :parent Y; :brother Z } => {Z :uncle Y }
34
34 Conclusions RDF has potential to make web contents machine readable RDF describes resources and anything can be seen as a Resources RDF(S) comprises vocabulary for describing also the intentional level Several serializations (i.e., RDF/XML, N3) Suitable for applying inference Limited features (i.e., no cardinality constraints) OWL for a more expressiveness
35
35 Sources http://www.w3.org/TR/rdf-primer/ http://www.w3.org/TR/rdf-syntax-grammar/ http://www.w3.org/TR/rdf-schema/ P.A. Champin, RDF Tutorial - http://www710.univ- lyon1.fr/~champin/rdf-tutorial/rdf-tutorial.pdf A. Wilk, RDF(S) - www.ida.liu.se/labs/iislab/courses/LW/slides/RDFS. pdf
36
36 Qualche esercizio rapido Rappresentare in RDF alcune frasi di linguaggio naturale Ugo ama Anna Il treno parte alle 10:40 Il treno è partito in ritardo Le auto vecchie inquinano Il corso di Knowledge Extraction è interessante La prima domenica del mese c’è il mercatino in Piazza Dante
37
37 Passaggio a RDF/Diagramma Ugo ama Anna Ex:UgoEx:Anna Ex:ama Persona rdf:type Studente Rdfs:subClassOf
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.