Semantic Web Reasoning With N3

Writing Notation3

Before we dive into EYE, let's take a look at its language and notation.
Already familiar with RDF and Notation3? Skip this section.

Creating RDF triples

RDF, the Resource Description Framework, enables us to translate human language into a model that machines can interpret. RDF slices all sentences in three entities:

  1. subject: what or who we are talking about
  2. predicate: what property of the subject we are discussing
  3. object: what we are saying about the property of the subject

Consider the following English sentence:

Cindy knows John.

Translating this in RDF, we obtain:

  1. subject: Cindy
  2. predicate: knows
  3. object: John

As you see, the predicate expresses a relationship between the subject and the object.

Writing triples in N3

Notation3N3 in short — offers one of the many ways to write down RDF.
We basically write down each of the three parts and end with a period.

:Cindy :knows :John.

The above N3 fragment looks very similar to the one in English. In fact, the only difference we spot is the presence of a colon : before each part.

In the English sentence, we assumed an implicit context wherein some Cindy and some John exist. In RDF, we have to make this context explicit. The colon tells us that each entity belongs to the context of the current document, attaching a certain meaning to them.

Perhaps surprisingly, predicates also have a specific context. Therefore, knows can have different meanings in different contexts, yet the meaning in a certain context is fixed.

Next

We dive deeper into contexts.

References