Convert a statement with adjective in RDF triple

459 views Asked by At

How adjective are treated in a semantic web RDF triples?

For example, how to traslate in RDF triples the following statement ?

Bob has a new car

Maybe:

  1. subject: bob
  2. predicate: has
  3. object: car

plus

  1. subject: car
  2. predicate: is
  3. object: new

and link the two RDF (first object with second subject)?

Is this the way ?

Can someone suggest related documentation ?

5

There are 5 answers

0
Reto Gmür On

What you are saying is that Bob has something that is a car and that is new. In your two statements your are not saying that "car" is a car.

In Turtle:

:bob :has [ a :Car; a :NewThing].

(where a is a shortcut for rdf:type).

0
chris On

That's right. Rather naive, but your model makes perfect sense. How much depth, clarity, and interoperability you want to embody will largely depend on your choice of standards, vocabularies, and modelling. For example, what constitutes 'new', and what does it mean to 'have' a car, are things that you can explore and define in as much depth as you want. You may find it useful to reuse other ontologies that already have definitions for such concepts.

The CIDOC-CRM (and its several extensions) for instance bases almost everything on the concept of events and activities. Although highly relevant these days to the archaeology and cultural heritage domains, the model was developed long before the semantic web and its various standards came to be. It is arguably the most comprehensive ontology with its own complex reasoning and inference capabilities.

So going down the CIDOC pathway, 'having a new car' is really an event of someone gaining ownership (for instance) of a car at some particular point in time. A person becomes an actor that engages in some ownership activity, which itself may be a 'transfer of ownership/rights' from some other actor, etc. Time itself is also a timespan rather than a 'single point' i.e. it spans a particular interval. Ownership of a car may also become a complex phenomenom that entails other propositions and inferences, related to society, pragmatic aspects (e.g. have to pay registration, taxes, etc), meta/physical (e.g. dangers of possessing a car and driving in the streets), etc. The nicest thing about CIDOC is that it gives you the tools to be as 'psychotic' in modelling as you desire. That's part of the reason I guess that it is gaining so much traction in the archaelogy field.

0
Kingsley Uyi Idehen On

To make this live and more understandale, I am tweaking the response by Reto, using schema.org terms and nanotation (which makes this post a Linked Open Data source that includes the description of bob and the car he owns):

{
<#bob> 
foaf:name "Bob" ; 
a foaf:Person;
<#has> [ a schema:Car; schema:purchaseDate "2015-06-11"^^xsd:Date].

<#has> 
a rdfs:Property ;
rdfs:label "has" ; 
schema:domainIncludes foaf:Person ;
schema:rangeIncludes schema:Car . 
}

Results of the Turtle embedded in my response, using nanotation:

0
Konrad Höffner On

In this example, the "new" adjective can and should be converted to an absolute date but this does not answer the general problem, where that is not always possible.

Semantically, adjectives always represent unary relationships, different from verbs which can be unary ("Bob runs."), binary ("Bob runs to Alice.") or more ("Bob runs to Alice with Trudy."). This is confusing in English, because syntactically, adjectives are sometimes used in an unary ("new car") but other times in a binary ("The car is new.") way. In other languages, such as Russian, that is not the case, you would just say "Car new." (translated of course).

Now, mathematically, an unary relation can be seen as a set and the other way around. Thus, the most adequate RDF formalism would be, as @reto-gmür said, membership of a class "NewThing", as classes are sets of individuals. As RDF uses binary relations, we need, as sometimes in English, the helper relation "a".

However, while sets and unary relations can be seen as mathematically equivalent, and there is even a third equivalent formalism, a function to [0,1], there is a difference in emphasis.

Thus, in some cases it may be more appropriate to use a property with a boolean range like this:

:BobsCar :isNew "true"^^xsd:boolean.

or

:BobsCar :newness "true"^^xsd:boolean.

(both property names are a bit awkward). I did not see this last modelling variant very often, however, except when modelling statistical data using the RDF Data Cube vocabulary.

I think this last way of modelling is less useful for instance data and more for ontologies because you can define:

:newness rdfs:domain :Car; rdfs:range xsd:boolean.

whereas

:Car rdfs:subClassOf [owl:unionOf (:NewThings :OldThings)].

requires OWL and is more complex, so that I expect it to be less supported by reasoners. Still, class membership looks more elegant and in line with the RDF philosophy to me, so I would recommend that in most cases.

1
James Fremen On

Probably trivial, but converting 'new' to an absolute date would seem to be less subjective and have more long-term value.

Bob has a car. Bob's car was built Sept. 12, 2016.