Tag Archives: Ontology

Ontologies

> reading: Chapter 4 "Incorporating Semantics", Semantic Web Programming, J. Hebeler et al.

Open World and Closed World Assumption

Open world assumption (OWA) means that information that is not present in a certain domain is not considered to be false. Just because it's not there, does not mean it's wrong.
Closed world assumption (CWA) is obviously the opposite. When there is a piece of information missing, it means it is wrong.

For example: "John works with Paul".
With CWA we couldn't say whether John and Paul know each other. We would have to assume that they don't. There are just working together. We would have to answer "no" to the question, whether they know each other.
With OWA the information about whether they know each other or not is not stated. So we just can not say anything about it, whether it's true that they're working together or not. But we couldn't say it is false either.

No unique Names Assumption

In the WWW we can not assume that information is always identified by an unique name. When two web sites referencing to a single information, we can not assume both are using the same URIs to reference to this information. Unless the two are explicitly stating that the information they are talking about are the same (by adding additional attributes) ....... wait something is confusing! need to think about that again

Ontology Elements

  • Header
    • represents the ontology itself
    • contains comments, labels, version and other imported ontologies
  • Class
    • special kind of resource that represents a set of resources
  • Individual
    • member of a class
    • can be member directly or indirectly
  • Property
    • predicate to describe individuals
    • object properties link individuals to other individuals
    • data properties link individuals to literal values
  • Annotation
    • basically like a Property
    • has no associated semantics
    • commonly used for label or comment
  • Datatype
    • well data type

Modelling RDF

> reading: Chapter 3 "Modelling Information", Semantic Web Programming, J. Hebeler et al.

Very briefly: there are three ways of writing information in RDF-style. Most likely there are much more ways of writing, or better representing, infortmation with RDF. But the following three are the most popular ones. The first one is RDF/XML, which is a XML presentation of RDF. Second is the Terse RDF Triple Language (aka Turtle ... why Turtle!?). And the third on is N-Tripel.

The XML notation is obvious. It's specialised XML for RDF. In the entry to the RDF Primer are some little examples. A snippet from a full RDF/XML could look like this:

<rdf:RDF
     xmlns:rdf="http://www.w3.org/rdf"
     xmlns:ext="http://example.org/ext"
     xmlns:foaf="http://xmlns.com/foaf/"
     xmlns:people="http://example.org/people">
  <rdf:Description rdf:about="http://.../people#Paul">
     <ext:worksWith rdf:resource="http://.../people#John/>
  </rdf:Description>
<!-- More -->
</rdf:RDF>

Well, it's XML. Not pretty, but it's interpretable for software.

The second one, Turtle, is supposed to be more human-friendly:

@prefix rdf:    <http://www.w3.org/rdf>
@prefix ext:    <http://example.org/ext>
@prefix foaf:   <http://xmlns.com/foaf>
@prefix people: <http://example.org/people> 

people:Paul ext:worksWith people:John .
people:Matt foaf:knows people:John .
people:Andrew
     foaf:knows people:Matt ;
     foaf:surname "Lopez" .

But I must say it is not that easier to read. Maybe a bit, because it has less brackets, obviously. The biggest benefit from this one is I think, that it has much less overhead (well the bracket-stuff). So file sizes would be much smaller, especially because with RDF you  can produce incredibly huge files.

And thirdly the N-Triples, which is a "simplified version of Turtle":

<urn:http://example.com/peoples:Paul> <urn:http://xmlns.com/foaf:worksWith> <urn:http://example.com/peoples:John>

So N-Triples are expressed in one line. Each entry is filled up with one line. There is no such thing as @prefix as in Turtle, which is stupid I think. Imagine: There is the full URL to a certain namespace for each subject, predicate and object. Of course this can be considered a "simplified version of Turtle", but I don't see this as practicable. If there would be a possibility to define QNames for the namespaces, this would be great. It would be so compact.