INF347, Télécom ParisTech
The Semantic Web
24th of June 2011
The purpose of this lab session is to get some hands-on experience with the Semantic Web.
You should zip your answers to the questions and send them by mail to me.
Unlike the previous TP, you should hand in your results at the end of the session!
Do not worry if you cannot finish everything. Just do what you can.
1. Exploring YAGO online
YAGO is a large ontology that is being developed by the Max-Planck Institute for Informatics in Germany. Go to the YAGO Web site, http://mpii.de/yago, click on the “Demo” tab and start the textual browser. This browser allows navigating through the YAGO ontology.
- Choose a person of public interest (hint: Dominique Strauss-Kahn is written with a hyphen). Type the name in the box and hit ENTER. Why do you not land directly at the entity itself?
- Click on the link with the entity (on the right). Follow the
type and subclassOf links to the root class. Note down all classes you encounter on one path to the root, hand them in.
- Optional: Find at least one incorrect statement in the ontology. More bugs give bonus points ☺
2. Querying YAGO with SPARQL
Try out the following:
- Run
/infres/ic2/suchanek/data/converters/yago2sparql.sh
- Ask
SELECT ?x WHERE { :Elvis_Presley rdf:type ?x . }
(Hit ENTER twice after this query and give it some time.) This query lists all classes that Elvis Presley is an instance of. Note that the results show the full URI of the entities, not the equivalent short form with namespace prefixes. Hand in some of the results.
- Can you modify the query so that it lists all facts with Elvis Presley in the position of
the subject, not just the ones with the
rdf:type relation? You should find facts about
his songs, his wife, his birth date and the movies he acted in. Hand in the results.
- List all the entities that Elvis created (with the relation
:created). Now list only those
of them that were created on 1970-06-06. Use the relation :wasCreatedOnDate and
remember to put quotes around the literal 1970-06-06. Hand in the results.
Enter a blank line to quit the SPARQL interface.
3. RDFa
Here, we are going to try out some RDFa.
- Go to http://ubiquity-rdfa.googlecode.com/svn/trunk/install-checker.html
- Drag the big gray "Check RDFa" icon to your bookmark area (works with Firefox and Chrome).
- Make an HTML/RDFa page about yourself with at least 5 facts. Use standard name spaces (e.g., from Facebook's open graph protocol, or from the Web search alliance Schema.org, or from Google's namespace. You can also use HTML5 microformats, but we did RDFa in the lecture).
Hint: The easiest solution is to go to Google's example, go to the bottom of the page, click "RDFa", copy/paste what is written there, and adapt it to yourself.
- Use the Parser to verify you page. For this, display the page in a browser and click on the "Check RDFa" bookmark. Hand in the page.
- Optional: Go beyond the simple example, add some more facts, make your address complete, etc.