UMBC CMSC 491/691s Spring 2009
Special Topics: The Semantic Web

Assignment Three
Experimenting with RDFS using N3

Due Monday 2 March

N3 is a notation for RDF that is easier for people to read and write than XML/RDF. N3 also supports a simple syntax for rules that allows us to define rules to implement the meaning of RDF and (most of) OWL as well as other domain specific reasoning over RDF data.

CWM is a simple reasoner implemented in Python that you can use to experiment with both N3 and reasoning over RDF content. You can download and install cwm on your own computer or use it on the CSEE linux systems (~finin/bin/cwm).

CWM uses a straightforward forward chaining reasoning approach. It can import or export semantic web documents from local files or URLs in either N3 or RDF/XML. Some of these files can be rules (in N3) that define the semantics of RDFS and/or OWL. The rules are applied and the complete set of triples can be output.

In this assignment you will experiment with a simple ontology for defining family relations based on gedcom. (See GEDCOM 101 for some concrete details).

(1) Start by reading Tim Berners-Lee's Semantic Web Tutorial Using N3, the Primer: Getting into RDF & Semantic Web using N3 and N3Logic: A Logical Framework For the World
Wide Web

(2) Get access to CWM by installing it on your own computer or using the version on the csee linux systems in ~finin/bin/cwm. To verify the you use cwm, try the following examples (see Cwm Command Line arguments for the complete list. You can reference documents by URLs or local file names.

(3) Test your work by entering the facts about your own immediate family and trying out each of the relations. Include at least ten people (including yourself) and all relevant base relations. Using the foaf vocabulary, add some additional assertions to some of the individuals in your family. Put the assertions about your own family in a file myfamily.N3.

(4) Create a file famly-rules.n3 that capture the following rules

  • A person knows her parents.
  • A person knows her children.
  • A person knows her siblings.

Think of at least two additional rules that make sense in this domain and define it. For example, if you add an age property to people, you can add rules that assert that a person is older than another.

(5) Create a makefile that will generate the following output:

  • myfamily-facts.n3 consisting of all the facts that describe your family, both given and inferred.
  • myfamly-newfacts.n3 consisting of all of the facts that were deduced and not given about your family.

(6) Describe what you did in your assignment in a simple document mya3.html. At a minimum, you should describe what additional foaf facts and any other facts you used (e.g., age) and what additional rules you added.

(7) Create a zip or tar file that has your results and mail to Finin@cs.umbc.edu. It should contain: myfamily.n3, family-rules.n3, myfamily-facts.n3, myfamily-newfacts.n3, and mya3.html.