140 likes | 213 Views
Logics for Data and Knowledge Representation. Resource Description Framework (RDF). Feroz Farazi. RDF. Definitions. A language for representing Web resources and information about them in the form of metadata [ RDF Primer ]
E N D
Logics for Data and Knowledge Representation Resource Description Framework (RDF) Feroz Farazi
RDF Definitions • A language for representing Web resources and information about them in the form of metadata [RDF Primer] • A language to represent all kinds of things that can be identified on the Web [RDF Primer] • A domain independent data model for representing information on the Web [G. Antoniou and F.v. Harmelen, 2004] • A language with an underlying model designed to publish data on the Semantic Web [F. Giunchiglia et al., 2010]
RDF Keys • Resource • A thing or a class or an entity we want to talk about • For example, web pages, articles, authors, etc. • Property • metadata of the resources to be described • For example, creator, date of creation, publisher, etc. • Statement • A piece of information about a resource represented using a property and a value • For example, Tim Berners-Lee authored Weaving the Web. In other words, Weaving the Web has an author (or creator) whose value is Tim Berners-Lee. • A subject (Weaving the Web)–predicate (creator)–object (Tim Berners-Lee) triple
Statements • In RDF, statements become machine comprehensible as • Triple elements are represented in a form of machine processableidentifiers • They are encoded in a machine processablelanguage • Identifiers • URL: Uniform Resource Locator • URI: Uniform Resource Identifier • URI includes • Things that can be located on the web (using URL), e.g., a home page of a person • Things that are not web accessible, e.g., a real world concept or entity • Language • RDF defines a specific XML language called RDF/XML
RDF Data Model GeoNames has coverage of all countries GeoNameswas modified on April 25, 2009 • A graph data model with directed edges • URIs to identify nodes (subject and object) and edges (predicate) • Objects can beliterals: plain and typed
RDF Representations • The graph is a powerful tool for the understanding of the people • For the Semantic Web we need machines to understand and process • Simple statements are represented as triples in RDF/XML • RDF statements have similarity to • The entries in the data processing systems • The rows in the relational database tables • The assertions in logic languages • An RDF document • Contains an element enclosed in XML tag rdf:RDF • A set of descriptions can be defined within this element with the tag rdf:Description • Each description makes a set of statements about a resource, where • The resource can be defined newly with rdf:ID • It can refer to an existing resource with rdf:about
RDF Representations • Structured attributes (e.g., address) can be represented • Blank nodes or anonymous resources are used • Group of things (e.g., a conference participants) can be represented • RDF Containers can be used • Constructs are rdf:Bag, rdf:Seq, rdf:Alt • Container content are called members, which are listed using rdf:li • RDF Collections can be used • Can represent a close list overcoming the limitation of Containers • Constructs are rdf:List, rdf:first, rdf:rest, rdf:nil • Provenance of the statements (e.g., who, when) can be represented • RDF Reification is the means to represent statements about statements • Constructs are rdf:Stament, rdf:subject, rdf:predicate and rdf:object
XML Syntax for RDF • RDF/XML: <?xml version=“1.0”?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/terms#"> <rdf:Description rdf:about="http://www.geonames.org"> <rdfs:label>GeoNames</rdfs:label> <dc:coverage rdf:resource="http://www.geonames.org/countries"/> <dc:modified>April 25, 2009</dc:modified> </rdf:Description> </rdf:RDF>
RDF Schema (RDFS) • A language for depicting the vocabulary of RDF developed to describe resources and relations between them [RDF Schema] • A language defined to provide mechanisms to add semantics to RDF resources [RDF Schema] • From the type system (classes and properties) perspective it has similarity to the object-oriented programming (OOP) paradigm • Differs from this paradigm in terms of defining classes and properties • In OOP, usually, classes are defined with respect to the properties an instance may have • In RDF Schema properties are defined with respect to the classes of the resources they can be attached to
Application: RDF vs Database Application Application RDF Files Parser Query Engine Query Engine Serializer Database RDF Store (merge) Unstructured formats (Web pages), Structured formats (CSV, Excel and Databases) • Both applications have • A query engine • A storage • RDF applications also have • parser, serializer, converter and scraper • RDF merge functionality • Some example applications are calendar integration, map integration and annotation Converters and scrapers [D. Allemang and J. Hendler, 2008]
RDF Inferencing • In RDFS, semantics can be expressed through inferences • It allows type (rdf:type) propagation through rdfs:subClassOf :Fausto_Giunchiglia rdf:type :Prfoessor :Professor rdfs:subClassOf :Faculty :Fausto_Giunchiglia rdf:type :Faculty (inferred) • It allows relationship propagation thgorugh rdfs:subPropertOf :prfoessorshipAt rdfs:subProperytOf :affiliationWith :Fausto Giunchiglia :professorshipAt :UniTN :Fausto_Giunchiglia :affiliationWith :UniTN (inferred) • It allows type identification through rdfs:domain :professorshipAt rdfs:domain :Person :Fausto_Giunchiglia :professrshipAt :UniTn :Fausto_Giunchiglia rdf:type :Person
RDF Inferencing • It allows type identification through rdfs:range :professorshipAt rdfs:range :Educational_Institution :Fausto_Giunchiglia :professrshipAt :UniTn :UniTn rdf:type :Educational_Institution (inferred) • Inferencing through rdfs:domain and rdfs:subClassOf :Researcher rdfs:subClassOf :Scientist :hIndex rdfs:domain :Researcher :Fausto_Giunchiglia :hIndex 44 :Fausto_Giunchiglia rdf:type :Researcher (inferred) :Fausto_Giunchiglia rdf:type :Scientist (inferred) • Inferencing through rdfs:range and rdfs:subClassOf :Educational_Institution rdfs:subClassOf :Organization :professorshipAt rdfs:range : Educational_Institution :Fausto_Giunchiglia :professorshipAt :UniTn :UniTn rdf:type :Educational_Institution (inferred) :UniTn rdf:type :Organization (inferred)
RDF Modeling • Modeling (logical) Set Intersection in RDF • Can we represent that “If an entity e is in X, it is also in both Y and Z”? • No explicit modeling construct is provided to do that but Can be modeled as: X rdfs:subClassOf Y X rdfs:subClassOf Z e rdf:type X e rdf:type Y (inferred) e rdf:type Z (inferred) • Modeling (logical) Set Union in RDF • Can we represent “Any entity e that belongs either to Y or Z also belongs to X”? • No explicit modeling construct is provided to do that but Can be modeled as: Y rdfs:subClassOf X Z rdfs:subClassOf X e rdf:type Y or e rdf:type Z e rdf:type X (inferred)
References • RDF Primer (2004). W3C Recommendation. • RDF Schema (2004). W3C Recommendation. • G. Antoniou & F. van Harmelen (2004). A Semantic Web Primer (Cooperative Information Systems). MIT Press, Cambridge MA, USA. • F. Giunchiglia, F. Farazi, L. Tanca, and R. D. Virgilio. The semantic web languages. In Semantic Web Information management, a model based perspective. Roberto de Virgilio, Fausto Giunchiglia, Letizia Tanca (Eds.), Springer, 2009. • D. Allemang and J. Hendler. Semantic web for the working ontologist: modeling in RDF, RDFS and OWL.Morgan Kaufmann Elsevier, Amsterdam, NL, 2008.