Difference between revisions of "RDF"

From BC$ MobileTV Wiki
Jump to: navigation, search
(Example 3: Recommendations)
Line 382: Line 382:
 
* Expressing Dublin Core metadata using the Resource Description Framework (RDF): http://dublincore.org/documents/2008/01/14/dc-rdf/
 
* Expressing Dublin Core metadata using the Resource Description Framework (RDF): http://dublincore.org/documents/2008/01/14/dc-rdf/
 
* The RDF Pipeline Framework - Automating Distributed, Dependency-Driven Data Pipelines: http://code.google.com/p/rdf-pipeline/ | [http://link.springer.com/chapter/10.1007%2F978-3-642-39437-9_5 WHITEPAPER]
 
* The RDF Pipeline Framework - Automating Distributed, Dependency-Driven Data Pipelines: http://code.google.com/p/rdf-pipeline/ | [http://link.springer.com/chapter/10.1007%2F978-3-642-39437-9_5 WHITEPAPER]
 +
* Sail Implementation: https://github.com/tinkerpop/blueprints/wiki/Sail-Implementation (Sail is "like the [[JDBC]] of [[RDF]]")
  
  

Revision as of 17:41, 25 September 2015

Resource Description Framework

Resource Description Framework (commonly abbreviated RDF) is emerging as the leading metadata description language, used in creating associations between different types of metadata. [1][2] RDF can be represented in any number of ways which can represent namespaces and triples, the most common being via a visual graph representation, XML and N3.


RDF is based on the following simple model for data association:

 subject predicate object


Specifications


Media Types

FormatEXAMPLE
RDF/XML XML serialization of RDF application/rdf+xml
<rdf:Description rdf:about="http://purl.org/commons/record/ncbi_gene/1812">
  <rdfs:label>human DRD1</rdfs:label>
</rdf:Description
ntriples simple serialization of RDF text/plain http://purl.org/commons/record/ncbi_gene/1812 http://www.w3.org/2000/01/rdf-schema#label "human DRD1" .
turtle textual serialization of RDF application/x-turtle ncbi_gene:1812 rdfs:label "human DRD1" .
n3 [extension] of turtle language expressing a superset of RDF text/rdf+n3 (not registered) hcls:kb foo:asserts { ncbi_gene:1812 rdfs:label "human DRD1" } .


Vocabularies

RDF data/documents require a specific vocabulary to define their structure (much like XML documents require a DTD or Schema). A vocabulary is a definition of terms (or words) used within a particular domain of knowledge (in this case the domain described by the RDF document).

The W3C has created a set of guidelines and best practices for publishing RDF vocabularies, with the following being a depiction of the most basic method: File:W3C deref-ont-uri-min.png [3]

Subject

The specific resource being described.


For example:

* In the following basic cat example, the statement:  "cats are felines" is a general ontological statement, while 
"Schnookums isAnimal Cat" is a specific triple which could be represented in RDF. In this example, "Schookums" is
the Subject, "isAnimal" is the Predicate and "Cat" is the Object.



Predicate

The description itself.


A Predicate is the description of a specific "resource" which can be reasonably categorized as an object and which has a definable type that falls under a given domain.

For example, in the following sentence:

* Most people agree that cats are felines and popular science tells us that felines are mammals. 

--> In both cases "are" is a predicate which indicates the state of being.


The following RDF could be created from (or "gleaned" about) the resources that are described in this sentence:

* statement1:
Most people  agree  statement2
* statement2:  
cats are felines

AND

* statement3:
popular science  tells us  statement4
* statement4
felines  are  mammals


Thus the new information we can discover through the use of RDF and combination of statements 1-4 is:

* Most people agree that cats are mammals.

Yes, all that to discover a seemingly trivial new piece of information, but this most basic example can easily be multiplied by the thousands of new facts that can be discovered through the relations of triples, that is, sets of RDF three-way relationships, and one can imagine a wealth of complex aggregates of individually trivial new information inferences.


Some additional facts might also be relevant to this "discussion" and can be related through the document's namespaces or included directly, such as:

  • Most people:
people who agree   >   threshold
threshold   =   51%

people who agree:

Arnold Steeves  is a  person 
Cyril Sneer  is a  person 
Jack James  is a  person 
       ...


  • Popular Science:
scientist published in list of accredited journals
 

list of accredited journals:

Academia Journal of Science  is a  journal
American Science Association  is a  journal 
Science Weekly  is a  journal
       ...

scientists:

Arnold Steeves  is a  scientist
Cyril Sneer  is a  scientist 
Jack James  is a  scientist 
       ...


scientist type of person



Object

The type of resource being described.


Essentially, thanks to its permissiveness, you can describe virtually any type of resource in RDF. The resource is typically personified and as such is best likened to and thought of as a noun in English, but it can in fact be any kind of non-describable resource in the universe.

For example, a resource could be almost any object:

* a Cat
* a Feline
* an Animal
* a Person
* Music album
* Movie
* TV show (programme)
* An episode of a TV show
* A timeslot within an episode of a TV show
* Day
* Time-of-Day
* Time-frame
* Event
* Computer
* Mobile Device
* Blackhawk Hellicopter
* Lazer-guided Missile technology
* Lazer
* Guide
* Missile
* Launcher
* Space Shuttle
* Mechanical part on a Space Shuttle
* Constollation
* Galaxy
* Planet
* Moon
* Comet
* Meteor
* Asteroid (synonyms and relations between similar words can also be described within RDF)
* Periodic Table Element
* Bacterial Culture
* Newly discovered (or previously discovered) Cell structure
* Disease
* Genome Structure
* Brain structure
* Synaptic Response
* Internal Organ
* Medical Record
* Food
* Allergy
* Nutrient
* Or any other "thing" living or non, that you can imagine

With RDF the benefit is that we can develop a clear definition and structure of resources. This structure and definition can define who owns which resource, whether anyone is even allowed to own that resource, what the resource costs to buy, to use, to borrow, what the penalties are for illegally stealing, damaging or destroying the resouce, etc...



EXAMPLES

Example 1: BCmoney

The following example shows the case for representing a multimedia viewing interaction where a particular Person (Bryan) watches a clip from a particular program (The Transformers).

 <http://bcmoney.tv/bryan> <http://bcmoney.tv/ontology/consumer/person/> "Bryan Copeland" .
 <http://bcmoney.tv/ontology/consumer/person/#watches> <http://bcmoney.tv/ontology/transmission-method/vod/stream> "1a" .
 <http://bcmoney.tv/ontology/transmission-method/vod/stream#1a> <http://bcmoney.tv/ontology/transmission-method/tv/programme> "tt0086817" .
 <http://bcmoney.tv/ontology/transmission-method/tv/programme#tt0086817> <http://bcmoney.tv/ontology/transmission-method/tv/programme/title> "The Transformers" .


Example 2: Publisher

Likewise, since http://bcmoney.tv/bryan identifies a particular resource (regardless of whether that URI could be traversed as a hyperlink, or whether the resource is actually the BC$ of Bryan Copeland), to say that the title of this resource is "Bryan Copeland" and its publisher is "bcmoney" would be two assertions that could be expressed as valid RDF statements. In the N-Triples form of RDF, these statements might look like the following:

 <http://bcmoney.org/Bryan_Copeland> <http://bcmoney.org/bc/money/1.0/> "Bryan Copeland" .
 <http://bcmoney.org/Bryan_Copeland> <http://bcmoney.org/bc/money/1.0/publisher> "BCmoney.tv" .


And these statements might be expressed in RDF/XML as:

 <rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:bc="http://openrecommender.org/bc/recommender/1.0/">
	<rdf:Description rdf:about="http://bcmoney.org/Bryan_Copeland">
		<bc:Person>Bryan Copeland</bc:Person>
		<bc:publisher>BCmoney.tv</bc:publisher>
	</rdf:Description>
 </rdf:RDF>


To an English-speaking person, the same information could be represented simply as:

The title of this resource, which is published by Wikipedia, is 'Tony Benn'

However, RDF puts the information in a formal way that a machine can understand. The purpose of RDF is to provide an encoding and interpretation mechanism so that resources can be described in a way that particular software can understand it; in other words, so that software can access and use information that it otherwise couldn't use.

Example 3: Recommendations

Just as easily as specifying a (person) publisher, owner, or creator of a resource, a recommender can be acknowledged.

 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
          xmlns:bc="http://openrecommender.org/bc/recommender/1.0/"> 
   <rdf:Description rdf:about="http://openrecommender.org/59dscd"> 
     <foaf:Person>Bryan Copeland</foaf:Person> 
     <bc:recommends>Thundercats</bc:recommends> 
     <bc:Recommendation>Thundercats</bc:Recommendation> 
     <bc:recommendedTo>Jason Tse</bc:recommendedTo> 
   </rdf:Description> 
 </rdf:RDF> 

Where "59dscd" corresponds to a TinyUrl ID that points to the episode (actual video) recommended. The resource prefix (whatever it may be) can then be applied, for example: [2]

Example 4: WordNet







Tools

Validators

Editors

Viewers

Converter

Publishing

  • D2R Server: http://d2rq.org/d2r-server (tool for publishing Relational Databases on the Semantic Web)
  • RDFizers: http://simile.mit.edu/wiki/RDFizers (converts from one binary file format into an equivalent RDF representation)
  • CytoScape: http://cytoscape.org/ (open source bioinformatics software platform for visualizing molecular interaction networks, integrating these interactions with gene expression profiles & other state data)[5]

Data Stores

  • 4store: http://4store.org/ (an efficient, scalable and stable RDF database)
  • OpenRDF: http://www.openrdf.org/
  • Neo4j: (while not being designed for RDF out-of-the-box, its graph database model lends itself well to RDF through extensions like Tikerpop[6] or Sail[7])

Data Sources

Plugins

Parsers

PHP

Java

JavaScript

Python

Perl

Ruby

C#

C

C++

Prolog


Resources


Tutorials


External Links


References

  1. wikipedia:Resource Description Framework
  2. W3C's RDF Specification: [1]
  3. W3C Guide to Publishing RDF Vocabularies: http://www.w3.org/TR/swbp-vocab-pub/
  4. D2R MAP - Database to RDF Mapping Language and Processor: http://wifo5-03.informatik.uni-mannheim.de/bizer/d2rmap/D2Rmap.htm
  5. Cytoscape: Hands-down Winner for Large-scale Graph Visualization -- Where Has the Biology Community Been Hiding this Gem?: http://www.mkbergman.com/415/cytoscape-hands-down-winner-for-large-scale-graph-visualization/
  6. RDF data in Neo4J - the Tinkerpop story: http:///datablend.be/?p=554
  7. Storing and querying RDF data in Neo4J through Sail: http://architects.dzone.com/news/storing-and-querying-rdf-data
  8. The Day after Freebase went RDF: http://blog.semantic-web.at/2008/10/30/the-day-after-freebase-went-rdf/
  9. wikipedia: Fresnel_lens

See Also

Linked Data | OWL | RDF Schema | XML | XML Schema | JSON | n3 | NoSQL