30
Ch 7: RDF schema 현현현 , 김김김 , 현현현 , 현현현 Team C

Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Embed Size (px)

Citation preview

Page 1: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Ch 7: RDF schema현근수 , 김영욱 , 백상윤 , 이용현

Team C

Page 2: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Introduction

• Semantic web modeling• In RDF: simply creates graph structure to represent data

• In RDFS: about sets, provide guidelines about how to use this graph

• RDFS like other schema languages provides informa-tion about the ways in which we describe our data

Page 3: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Schema languages and their functions

• Role highly depends on the system or language• Set of allowed formats for a document (XML)• Help interpret particular data (RDB)

• Header and key information of the tables• What methods to be available for a particular instance

and its implementation (OOP)

• At the end they all tell some information about the data• RDFS helps provide some sense of meaning to the

data by inference

Page 4: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Relationship between schema and data

• Most modeling systems separate the data from its schema• RDB schema is not expressed in a table• Object model is not expressed as objects• XML DTD is not a XML document

• By contrast RDFS is defined with RDF triples• :AllStarPlayer rdf:type rdfs:Class.

:MajorLeaguePlayer rdf:type rdfs:Class.

Basic construct for specifying a set in RDFS

Page 5: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

The RDF schema language

• Relationship propagation through rdfs:subPropertyOf• Verbs as well as nouns (subClassOf)• Simple inference rule

• CONSTRUCT {?x ?r ?y .}WHERE {?x ?q ?y .

?q rdfs:subPropertyOf ?r }

• brother rdfs:subPropertyOf sibling.• Define more specific properties

Page 6: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Example

• :freeLancesTo rdfs:subPropertyOf contractsTo.:indirectlyContractsTo rdfs:subPropertyOf contractsTo.:isEmployedBy rdfs:subPropertyOf worksFor.:contractsTo rdfs:subPropertyOf worksFor.

• :Spence :freeLancesTo :TheFirm.• :Spence :contractsTo :TheFirm.

:Spence :worksFor :TheFirm. Inferred

Page 7: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

The RDF schema language (cont’d)• Typing data by usage – rdfs:domain and rdfs:range• The meaning of these terms is defined by the inferences

that can be drawn from them• CONSTRUCT {?x rdf:type ?D .}WHERE {?P rdfs:domain ?D .

?x ?P ?y .}• CONSTRUCT {?y rdf:type ?D .}WHERE {?P rdfs:range ?D .

?x ?P ?y .}• Domain/range tell us how P is to be used

Page 8: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

The RDF schema language (cont’d)• Combination of domain and range with rdfs:subClassOf

• :MarriedWoman rdfs:subClassOf :Woman.:hasMaidenName rdfs:domain :MarriedWoman.

• :Karen :hasMaidenName "Stephens".• :Karen rdf:type :MarriedWoman.

:Karen rdf:type :Woman. inferred

CONSTRUCT {?P rdf:domain ?C .}WHERE {?P rdfs:Domain ?D .

?D rdfs:subclassOf ?C .}

Page 9: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

RDFS modeling combination and patterns

• Cannot explicitly provide logical primitives like In-tersection and Union• However, can implicitly model them• Set intersection• :C rdfs:subClassOf :A.

:C rdfs:subClassOf :B.

x rdf:type C. x rdf:type A.x rdf:type B.

C A ⊆ ∩ B (O)C A ⊇ ∩ B (X)

A BC

Same for rdfs:subPropertyOf Property intersection

Page 10: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Example

• :Surgeon rdfs:subClassOf :Staff.:Surgeon rdfs:subClassOf :Physician.:Kildare rdf:type :Staff.:Kildare rdf:type :Physician.

• :Kildare rdf:type :Surgeon.

Page 11: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

C

RDFS modeling combination and patterns (cont’d)

• Set union• :A rdfs:subClassOf :C.

:B rdfs:subClassOf :C.

x rdf:type A. x rdf:type C.orx rdf:type B.

C ⊇ A U B (O)C ⊆ A U B (X)

A B

Same for rdfs:subPropertyOf Property union

Page 12: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenges

• Combine one or more RDFS constructs to achieve a particular modeling goal

Page 13: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Term Reconciliation

• How to handle terms from different agents• Use them in a single application• Challenges 5~7

Page 14: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 5

• Assert a member of one class to automatically be treated as a member of another class• All researchers are analysts• Determine that a researcher is a special case of an

analyst• :Researcher rdfs:subClassOf :Analyst.

:Wenger rdf:type :Researcher.:Wenger rdf:type :Analyst. Inferred

• If the relationship goes the other way around simply reverse the triple

Page 15: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 6

• What if the relationship between the two are not clear?

• Not or

• But

• Use the union pattern• :Analyst rdfs:subClassOf :Investigator.

:Researcher rdfs:subClassOf :Investigator.

R A AR

R A

Page 16: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 7

• The two classes are actually identical• No primitive for class equivalence in RDFS

• :Analyst rdfs:subClassOf :Researcher.:Researcher rdfs:subClassOf :Analyst.

• Paradoxical• Looks contradictory (especially with OOP), but nonetheless clear

• For example• :Reilly rdf:type :Researcher.• :Kaneda rdf:type :Analyst.

• then we can infer the other statements:• :Reilly rdf:type :Analyst.• :Kaneda rdf:type :Researcher.

Page 17: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 8

• Instance-level data integration• Contribution to a single question coming from mul-

tiple sources• Ex) Determine where ordnance can be targeted• fc:CivilianFacility rdfs:subClassOf cc:OffLimitsTarget.

space:NoFlyZone rdfs:subClassOf cc:OffLimitsTarget.

• Now instances from either descriptions will be in-ferred to have cc:OffLimitsTarget

Page 18: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 9

• Readable labels with rdfs:label• URIs are globally scoped identifiers for resource on the semantic

web• But to people they have little to no meaning• Need printable names for resources

• Various names for resources from different RDF data• :Person1 :personName "James Dean".

:Movie1 :movieTitle "Rebel Without a Cause".

• Preferable to use generic display mechanism• :personName rdfs:subPropertyOf rdfs:label.

:movieTitle rdfs:subPropertyOf rdfs:label.

• Querying for rfds:label will find both personName and movieTi-tle

Page 19: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Data typing based on use (10~11)

• ship:Berengaria ship:maidenVoyage "June 16, 1913".ship:QEII ship:nextDeparture "Mar 4, 2010".

• Additional subclasses to show the status of the ves-sals• ship:DeployedVessel rdfs:subClassOf ship:Vessel.

ship:InServiceVessel rdfs:subClassOf ship:Vessel.ship:OutOfServiceVessel rdfs:subClassOf ship:Vessel.

Page 20: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 10

• Classify each vessel into more specific subclasses depending on the information from the table• Ex) If a vessel has a maiden voyage, it is a deployed

vessel• Use rdfs:domain• ship:maidenVoyage rdfs:domain ship:DeployedVessel.• ship:nextDeparture rdfs:domain ship:InServiceVessel.• ship:decommissionedDate rdfs:domain

ship:OutOfServiceVessel.• ship:destructionDate rdfs:domain

ship:OutOfServiceVessel.

Page 21: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Inferring classes of vessels from the infor-mation known about them

Page 22: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 11

• All this concerns the vessels themselves. Can we draw inferences about entities in other table cells?• How can we express the commander of a ship has

the rank of Captain?• ship:hasCommander rdfs:range ship:Captain.

Page 23: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Inferring that the commanders of the ships have rank “Captain”

Page 24: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Challenge 12

• Filtering undefined data• How to sort out individuals based on the informa-

tion that is defined for them• Ex) The set of vessels with nextDeparture could be

used as input to a scheduling system planning group tours. Meanwhile ships without nextDepar-ture should not be considered• ship:DepartingVessel rdf:type rdfs:Class.

ship:nextDeparture rdfs:domain ship:DepartingVessel.

Page 25: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Ships with a nextDeparture specified are DepartingVessels

Page 26: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

RDFS and knowledge dis-covery• Domain/range differ dramatically from other mod-

eling paradigms• In inference-based semantics of RDFS (OWL), do-

mains and ranges are not used to validate informa-tion (OO modeling and XML)• Instead used to find new information based on old

information• Use domain and range where some particular

knowledge filtering or discovery pattern is intended

Page 27: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Modeling with domains and ranges• RDFS still possesses some confusion even with its

simplicity• Multiple domains/ranges• ship:nextDeparture rdfs:domain DepartingVessel.

ship:nextDeparture rdfs:domain InServiceVessel.

• How do we interpret this?

Page 28: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Modeling with domains and ranges• Focus on what inferences can be drawn from them• ship:QEII ship:maidenVoyage "May 2, 1969".

ship:QEII ship:nextDeparture "Mar 4, 2010".ship:QEII ship:hasCommander Warwick.

• The rules of inference for rdfs:domain allow us to draw the following conclusions:• ship:QEII rdf:type ship:DepartingVessel.

ship:QEII rdf:type ship:InServiceVessel.

• Counterintuitive to the mass

Page 29: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Modeling with domains and ranges• Object Oriented vs RDFS

Any specified domain can be used with the property (Union) DepartingVessel or InServiceVessel

Both domain classes are inferred (In-tersection) DepartingVessel and InServiceVessel

Page 30: Ch 7: RDF schema 현근수, 김영욱, 백상윤, 이용현 Team C. Introduction Semantic web modeling In RDF: simply creates graph structure to represent data In RDFS: about

Nonmodeling properties in RDFS• Properties with no inference derive from them

• rdfs:label

• Cross-referencing files: rdfs:seeAlso• Provide a way to specify the web location of supplementary in-

formation (tables from same database, Wikipedia page, etc.)

• Organizing vocabularies: rdfs:isDefinedBy• Provide a link to the primary source of information about a re-

source• subProperty of seeAlso

• Model documentation: rdfs:comment• sales:nextDeparture rdfs:comment "This indicates the next

planned departure date for a salesperson."