1Chapter 3RDF Introductionz Problem: What does an XML document mean?– XML is about data structures– Their meaning (semantics) is not apparent to a machinez RDF is more a data model than a language– Is realized in many different formatsz RDF define basic semantics– RDFS and OWL define more RDF vocabulary for building rich data modelsz RDF remains domain independentExamplez What does this mean?– Are professors also academic staff members?– If someone teaches a course, are they an academic staff member?z Can’t say in XML, but can say so in RDFS<academicStaffMember> Grigoris Antoniou </academicStaffMember><professor> Michael Maher </professor><course name="Discrete Mathematics"><isTaughtBy> David Billington </isTaughtBy></course>Examplez Embedding of elements is just a syntactic constraintz No meaning is definedz It’s in the documentation or the mind of the viewerz Does the machine have a mind?<course name="Discrete Mathematics"><lecturer>David Billington</lecturer></course><lecturer name="David Billington"><teaches>Discrete Mathematics</teaches></lecturer><teachingOffering><lecturer>David Billington</lecturer><course>Discrete Mathematics</course></teachingOffering>2Key DocumentsAll at http://www.w3.org/RDF/– RDF/XML Syntax Specification (Revised)Dave Beckett, ed. – RDF Vocabulary Description Language 1.0: RDF SchemaDan Brickley, R.V. Guha, eds. – RDF PrimerFrank Manola, Eric Miller, eds. – Resource Description Framework (RDF): Concepts and Abstract SyntaxGraham Klyne, Jeremy Carroll, eds. – RDF SemanticsPatrick Hayes, ed. – RDF Test CasesJan Grant, Dave Beckett, eds. RDF is the first SW language<rdf:RDF ……..><….><….></rdf:RDF>XML EncodingGraphstmt(docInst, rdf_type, Document)stmt(personInst, rdf_type, Person)stmt(inroomInst, rdf_type, InRoom)stmt(personInst, holding, docInst)stmt(inroomInst, person, personInst)TriplesRDFData ModelGood for MachineProcessingGood For HumanViewingGood For ReasoningRDF is a simple language for building graph based representationsThe RDF Data Modelz An RDF document is an unordered collection of statements, each with a subject, predicate and object(aka triples)z A triple can be thought of as a labelled arc in a graphz Statements describe properties of web resourcesz A resource is any object that can be pointed to by a URI:– a document, a picture, a paragraph on the Web, …– E.g., http://umbc.edu/~finin/cv.html– a book in the library, a real person (?)– isbn://5031-4444-3333– …z Properties themselves are also resources (URIs)subject objectpredicateRDF Building Blocksz Resources– Things we can talk about, URIsz Properties– Special things that represent binary relationsz Literal data– Strings, integers, dates, … xmldatatypesz Statements, aka triples– Subject Predicate Object or– Subject Property Value3URIs are a foundationz URI = Uniform Resource Identifier– "The generic set of all names/addresses that are short strings that refer to resources"– URLs (Uniform Resource Locators) are a subset of URIs, used for resources that can be accessed on the web z URIs look like “normal” URLs, often with fragment identifiers to point to a document part:– http://foo.com/bar/mumble.html#pitchz URIs are unambiguous, unlike natural language terms– the web provides a global namespace– We assume references to the same URI are to the same thingWhat does a URI mean?z Sometimes URIs denote a web resource– http://umbc.edu/~finin/finin.jpg denotes a file– We can use RDF to make assertions about the resource, e.g., it’s an image and depicts a person with name Tim Finin, …z Sometimes concepts in the external world– E.g., http://umbc.edu/ denotes a particular University located in Baltimore– This is done by social conventionz Cool URIs don’t change– http://www.w3.org/Provider/Style/URISimple RDF Examplehttp://umbc.edu/~finin/talks/idm02/“Intelligent Information Systemson the Web”http://umbc.edu/dc:Titledc:Creatorbib:Aff“Tim Finin”“[email protected]”bib:namebib:emailRDF Data Model is a Graphz Graphs only allow binary relationsz Higher arity relations must be “reified” (i.e., turned into objects)z Represent give(John,Mary,Book32) as three binary relations all involving a common object, giveEvent32– giver( giveEvent45 , John )– recipient( giveEvent45 , Mary )– gift( giveEvent45 , Book32 )z When using RDF, this has to be part of your vocabulary designz This is a price we have to pay for using a simple representation4RDF Statementsz RDF has one predefined scheme (syntax and semantics) for the reification of RDF statements themselvesz Needed to support assertions about triples– Document32 asserts “John gave Mary a book”– Tom believes John gave Mary a book– “John gave Mary a Book” has 0.33 probabilityXML encoding for RDF<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:dc="http://purl.org/dc/elements/1.1/"xmlns:bib="http://daml.umbc.edu/ontologies/bib/"><description about="http://umbc.edu/~finin/talks/idm02/"><dc:title>Intelligent Information Systems on the Web </dc:Title><dc:creator><description ><bib:name>Tim Finin</bib:Name><bib:email>[email protected]</bib:Email><bib:aff resource="http://umbc.edu/" /></description> </dc:creator></description></rdf:RDF>XML encoding for RDF<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:dc="http://purl.org/dc/elements/1.1/"xmlns:bib="http://daml.umbc.edu/ontologies/bib/"><description about="http://umbc.edu/~finin/talks/idm02/"><dc:title>Intelligent Information Systems on the Web </dc:Title><dc:creator><description ><bib:name>Tim Finin</bib:Name><bib:email>[email protected]</bib:Email><bib:aff resource="http://umbc.edu/" /></description> </dc:creator></description></rdf:RDF>Note that the document is a single RDF element which has attributes defining several namespaces.• One for the rdf vocabulary• One for the dublin core• One for the bib vocabularyXML encoding for RDF<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:dc="http://purl.org/dc/elements/1.1/"xmlns:bib="http://daml.umbc.edu/ontologies/bib/"><description about="http://umbc.edu/~finin/talks/idm02/"><dc:title>Intelligent Information Systems on the Web </dc:Title><dc:creator><description ><bib:name>Tim Finin</bib:Name><bib:email>[email protected]</bib:Email><bib:aff resource="http://umbc.edu/" /></description> </dc:creator></description></rdf:RDF>• Here’s the general way to introduce a “named subject” about
View Full Document