Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource.

Similar presentations


Presentation on theme: "Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource."— Presentation transcript:

1 Understanding RDF

2 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource is an electronic file on the Web accessed via a URL. RDF is to create meta data about the document as a standalone entity. Ex: author, creation date, type.

3 3/30 Example use of RDF A particularly good use of RDF is to describe resources, which are "opaque" like images or audio files. The RDFPic application is a demonstration application developed by the W3C to embed RDF meta data inside JPEG images. RDFPic automatically extract the RDF meta data from images stored on W3C's Jigsaw Web server.

4 4/30 RDFPic

5 5/30 RDF Document An RDF document contains a root element and one or more descriptions. root element specifies the document is an RDF document. A description is a set of statements about a resource. The element contains an rdf:about attribute that refers to the resource being described. The child elements of the Description element are all properties of the resource being described.

6 6/30 RDF Generated by RDFPic Root element Name spaces Dublin Core namespace s Description Child elements Of Desciption

7 7/30 RDF Generated by RDFPic Resource Property Value

8 8/30 RDF Triple The RDF model is often called a "triple" because it has three parts: Resource, Property, and Value. In the knowledge representation community, those three parts are described in terms of the grammatical parts of a sentence: subject, predicate, and object.

9 9/30 RDF Triple

10 10/30 Subject The noun or noun phrase that is the doer of the action. In RDF, we want a URI to stand for the unique concept "company" like "http://www.business.org/ontology/#company" to denote that we mean a form of business ownership and not friends coming for a visit.http://www.business.org/ontology/#company An RDF resource stands for either electronic resources, like files, or concepts, like "person." One way to think of an RDF resource is as "anything that has identity."

11 11/30 Predicate The part of a sentence that modifies the subject and includes the verb phrase. Returning to our sentence "The company sells batteries," the predicate is the phrase "sells batteries." In RDF, a predicate is a relation between the subject and the object. Thus, in RDF, we would define a unique URI for the concept "sells" like "http://www.business.org/ontology/#sells".http://www.business.org/ontology/#sells

12 12/30 Object A noun that is acted upon by the verb. In our sentence "The company sells batteries," the object is the noun "batteries." In RDF, an object is either a resource referred to by the predicate or a literal value. In our example, we would define a unique URI for "batteries" like "http://www.business.org/ontology/#batteries".http://www.business.org/ontology/#batteries

13 13/30 Statement In RDF, the combination of the preceding three elements, subject, predicate, and object, as a single unit.

14 14/30 Capturing Knowledge with RDF Comparing four different ways express concepts in : as natural language sentences, in a simple triple notation called N3, in RDF/XML serialization format, and, finally, as a graph of the triples. Buddy Belden owns a business. The business has a Web site accessible at http://www.c2i2.com/~budstv. Buddy is the father of Lynne.

15 15/30 Capturing Knowledge with RDF Buddy Belden owns a business. The business has a Web site accessible at http://www.c2i2.com/~budstv. Buddy is the father of Lynne.. In N3 The # sign means the URI of the concepts would be the current document.

16 16/30 Prefix Can replace the # sign with an absolute URI like "http://www.c2i2.com/buddy/ontology" as a formal namespace.http://www.c2i2.com/buddy/ontology In N3 you can do that with a prefix tag like this: @prefix bt:. Using the prefix, our resources would be as follows:. Of course, we could also add other prefixes from other vocabularies like the Dublin Core: @prefix dc:. This would allow us to add a statement like "The business title is Buddy's TV and VCR Service" in this way: "Buddy's TV and VCR Service".

17 17/30 Jena Tools are available to automatically convert the N3 notation into RDF/XML format. One popular tool is the Jena Semantic Web toolkit from Hewlett-Packard.

18 18/30 RDF/XML generated from N3

19 19/30 IsaViz Graph of N3 notation

20 20/30 Container: Bag The container model allows groups of resources or values. The sentence "The people at the meeting were Joe, Bob, Susan, and Ralph." can be translated to:

21 21/30 IsaViz about meeting

22 22/30 Explicit Modeling RDF containers are different than XML containers because RDF containers are explicit. This is the same case as relations between elements, which are also implicit in XML, whereas such relations (synonymous with predicates) are explicit in RDF. This explicit modeling of containers and relations is an effort to remove ambiguity from our models so that computers can act reliably in our behalf. On the downside, such explicit modeling is harder than the implicit modeling in XML documents.

23 23/30 Three types of RDF containers Bag An rdf:bag element is used to denote an unordered collection. An example would be when all members of the collection are processed the same without concern for order. Sequence An rdf:seq element is used to denote an ordered collection (a "sequence" of elements). One reason to use a sequence would be to preserve the alphabetical order of elements. Another example would be to process items in the order in which items were added to the document. Alternate An rdf:alt element is used to denote a choice of multiple values or resources. Some examples would be a choice of image formats (JPEG, GIF, BMP) or a choice of makes and models, or any time you wish to constrain a value to a limited set of legal values.

24 24/30 Making Statements Can make statements about the collection by attaching an rdf:ID attribute to the container. Making statements about the individual members is the same as making any other statement by simply referring to the resource in the collection as the object of your statement.

25 25/30 Reification While containers affect the modeling of a single statement (for example, an object becoming a collection of values), reification allows you to treat a statement as the object of another statement. This is often referred to as "making statements about statements" and is called reification.

26 26/30 N3 Example of Reification @prefix :. @prefix earl:. @prefix rdf:. @prefix dc:. :Jane earl:asserts [ rdf:subject :MyPage; rdf:predicate earl:passes; rdf:object "Accessibility Tests" ]; earl:email ; earl:name "Jane Jones". :MyPage a earl:WebContent; dc:creator.

27 27/30 Generated RDF Example of Reification rdf:resource='http://www.w3.org/2001/03/earl/0.95#passes'/> Accessibility Tests Jane Jones

28 28/30 Reification The method for reifying statements in RDF is to model the statement as a resource via explicitly specifying the subject, predicate, object, and type of the statement. Once the statement is modeled, you can make statements about the modeled statement. The reification is akin to statements as argument instead of statements as fact, which is useful in cases where the trustworthiness of the source is carefully tracked (for example, human intelligence collection).

29 29/30 Graph of reification Anonymous Node

30 30/30 Adoption of RDF Many people understand the basics of the triple but missing the utility of reification. Most databases treat data as facts, so it is a stretch to think about data as assertions. It will take training for developers and modelers to understand where to use reification and what rules apply to reified statements. Some current Semantic Web applications explicitly eliminate reification from their knowledge bases to reduce the complexity. Complexity hurts adoption, and the adoption of RDF by mainstream developers has been significantly slower than other W3C technologies.


Download ppt "Understanding RDF. 2/30 What is RDF? Resource Description Framework is an XML-based language to describe resources. A common understanding of a resource."

Similar presentations


Ads by Google