Nowa wersja
|
Poprzednia wersja
|
pl:dydaktyka:semweb:lab-rdfmodel [2017/10/08 17:24] kkutt utworzono |
pl:dydaktyka:semweb:lab-rdfmodel [2019/09/30 21:20] (aktualna) kkutt [Introduction. Modeling knowledge with Resource Description Framework (RDF)] |
====== Introduction. Modeling knowledge with Resource Description Framework (RDF) ====== | ====== Introduction. Modeling knowledge with Resource Description Framework (RDF) ====== |
| |
^ Last verification: | 20171001 | | ^ Last verification: | 20190930 | |
^ Tools required for this lab: | Pens and paper | | ^ Tools required for this lab: | Pens and paper | |
| |
* [[http://www.slate.com/articles/technology/future_tense/2015/11/why_does_google_say_jerusalem_is_the_capital_of_israel.html|Why Does Google Say Jerusalem Is the Capital of Israel?]] | * [[http://www.slate.com/articles/technology/future_tense/2015/11/why_does_google_say_jerusalem_is_the_capital_of_israel.html|Why Does Google Say Jerusalem Is the Capital of Israel?]] |
* [[http://www.w3.org/TR/rdf11-primer/|RDF Primer]]: general ideas about RDF; we will use only Turtle syntax so you can simply omit sections 5.2-5.4 | * [[http://www.w3.org/TR/rdf11-primer/|RDF Primer]]: general ideas about RDF; we will use only Turtle syntax so you can simply omit sections 5.2-5.4 |
* {{..:..:quick-tutorial-rdf-turtle.pdf|A Quick Tutorial on the Turtle RDF Serialization}} | * {{quick-tutorial-rdf-turtle.pdf|A Quick Tutorial on the Turtle RDF Serialization}} |
* [[#if_you_want_to_know_more|If you want to know more...]] | * [[#if_you_want_to_know_more|If you want to know more...]] |
| |
- Analyse the file. How regions' information is represented? Copy the source into the [[#report]] 8-). | - Analyse the file. How regions' information is represented? Copy the source into the [[#report]] 8-). |
| |
==== - FOAF [5 minutes] ==== | ==== - FOAF [10 minutes] ==== |
- Create your FOAF file with: <wrap caution>[[http://www.ldodds.com/foaf/foaf-a-matic|foaf-o-matic]]</wrap> | - Create your FOAF file with: <wrap caution>[[http://www.ldodds.com/foaf/foaf-a-matic|foaf-o-matic]]</wrap> |
- Save your FOAF file. Put it in the report 8-). | - Save your FOAF file. Put it in the report 8-). |
- Publish your file so that it can be referenced with URL. Put the URL into the report 8-) | - Publish your file so that it can be referenced with URL. Put the URL into the report 8-) |
- Visualize your FOAF file with <wrap caution>[[http://foaf-visualizer.gnu.org.ua/|FOAF.Vix]]</wrap>. Simply put the URL as an ''uri'' argument to the FOAF.Vix, e.g.: http://foaf-visualizer.gnu.org.ua/?nocache=1&uri=http://home.agh.edu.pl/~kkutt/foaf.rdf | - Visualize your FOAF file with <wrap caution>[[http://foaf-visualizer.gnu.org.ua/|FOAF.Vix]]</wrap>. Simply put the URL as an ''uri'' argument to the FOAF.Vix, e.g.: http://foaf-visualizer.gnu.org.ua/?nocache=1&uri=http://krzysztof.kutt.pl/foaf.rdf |
- Add more friends using their FOAF files. Visualize again. | - Add more friends using their FOAF files. Visualize again. |
| |
- Go to the <wrap caution>[[http://any23.org/|Anything to Triples]]</wrap> webpage and in section "Convert document at URI": | - Go to the <wrap caution>[[http://any23.org/|Anything to Triples]]</wrap> webpage and in section "Convert document at URI": |
* select: **turtle** from drop-down list (default is best) | * select: **turtle** from drop-down list (default is best) |
* change URL from ''http://twitter.com/cygri'' to ''http://home.agh.edu.pl/~kkutt/foaf.rdf'' | * change URL from ''http://twitter.com/cygri'' to ''http://krzysztof.kutt.pl/foaf.rdf'' |
* validation: **validate** | * validation: **validate** |
* report: **checked** | * report: **checked** |
* click "Convert" button | * click "Convert" button |
- You will get an XML with a lot of empty tags and Turtle code inside ''<data><![CDATA[ ... ]]></data>'' | - You will get an XML with a lot of empty tags and Turtle code inside ''<data><![CDATA[ ... ]]></data>'' |
- Analyze returned model. Especially look at last five statements:<code><http://home.agh.edu.pl/~kkutt/foaf.rdf#me> foaf:knows _:node1a07qklgvx22181 . | - Analyze returned model. Especially look at last five statements:<code><http://hkrzysztof.kutt.pl/foaf.rdf#me> foaf:knows _:node1a07qklgvx22181 . |
| |
_:node1a07qklgvx22181 a foaf:Person ; | _:node1a07qklgvx22181 a foaf:Person ; |
* 8-) Include your converted FOAF file in the report archive. | * 8-) Include your converted FOAF file in the report archive. |
| |
==== - Modeling knowledge with RDF graphs [20 minutes] ==== | ==== - Modeling knowledge with RDF graphs [25 minutes] ==== |
RDF is a data model based on principle of representing relational information as labeled directed graphs. | RDF is a data model based on principle of representing relational information as labeled directed graphs. |
| |
===== If you want to know more ===== | ===== If you want to know more ===== |
| |
| |
==== RDF ==== | |
| |
Reading: | Reading: |
* [[http://www.w3.org/TR/rdf11-concepts/|RDF Abstract Syntax]] | * [[http://www.w3.org/TR/rdf11-concepts/|RDF Abstract Syntax]] |
* [[http://www.w3.org/2000/10/swap/Primer.html|Primer: Getting into RDF & Semantic Web using N3]] | * [[http://www.w3.org/2000/10/swap/Primer.html|Primer: Getting into RDF & Semantic Web using N3]] |
| * RDFS enables simple reasoning: [[https://www.w3.org/TR/rdf11-mt/#patterns-of-rdfs-entailment-informative|Patterns of RDFS entailment]] |
| |
Common vocabularies: | Common vocabularies: |