Hi all, I'm a newbie in using ontology, and I got some difficluties in building ontologies with weighted predicates. For example, I want to say that a concept a is similar to a concept b with an float:x certainty. I have found some solutions using reification such in this post: http://stackoverflow.com/questions/3660087/weighted-rdf-predicate-owlobjectproperty

However I was wondering if it is possible and how to add this kind of objectptoperty: ObjectProperty: likeScale Domain: LikeLevel Range: xsd:int

As far as I konw, object proprety is to link individuals and can not have as range a data type. I'm using OWLAPI, and I didn't find any solution to do the above object property.

Can anyone help me with this.

Thank you very much.

asked 19 Dec '11, 16:37

Hichem's gravatar image

accept rate: 0%

edited 13 Jun '13, 14:26

Signified's gravatar image

Signified ♦


Which solution to choose may depend on your scenario. Do you want to "tag" existing relationships between resources with likeliness values, i.e., do you already have some data that you want to extend by likeliness values, without hurting the original data (too much)? Or do you want to build up a dataset of likeliness relationships from scratch, i.e., the likeliness values will be inherently part of the resulting knowledge base?

(20 Dec '11, 04:43) Michael Schn... ♦ Michael%20Schneider's gravatar image

object proprety is to link individuals and can not have as range a data type.

You're looking for DatatypeProperty.

(20 Dec '11, 13:06) Signified ♦ Signified's gravatar image

Thank you all for your precious help and advices. I'm going to try these solutions and I will let you know about my progress.

(20 Dec '11, 15:17) Hichem Hichem's gravatar image


I'm going to tackle the question on a broader, conceptual level. There are a few options for "weighted predicates" (~aka. "n-ary predicates" or perhaps even "quads"):

Select a static set of predicates with different weights:

:ConceptA :similar52 :ConceptB .
:ConceptA :similar37 :ConceptC .

or more coarse buckets of values:

:ConceptA :verySimilar :ConceptB .
:ConceptA :somewhatSimilar :ConceptC .

Standard RDF reification:

:ConceptA :similar :ConceptB .
:ConceptA :similar :ConceptC .
[ rdf:subject :ConceptA ; rdf:predicate :similar ; 
      rdf:object :ConceptB ; :weight 52 ]
[ rdf:subject :ConceptA ; rdf:predicate :similar ; 
      rdf:object :ConceptC ; :weight 37 ]

Standard n-ary predicates:

:ConceptA :similarConcept [ rdf:value :ConceptB ; :weight 52 ]
:ConceptA :similarConcept [ rdf:value :ConceptC ; :weight 37 ]

EDIT: Predicate-based reification. (A bit of a curve-ball.)

:ConceptA :similarAB :ConceptB .
:similarAB rdfs:subPropertyOf :weightedSimilarity ;
      :weight 52 .

"Emulated" n-ary predicate modelling (as per @Fabian's answer):

:ConceptA :similarity :ConceptAConceptB .
:ConceptB :similarity :ConceptAConceptB .
:ConceptAConceptB a :ConceptSimilarity ; 
    :element :ConceptA ; 
    :element ConceptB ; 
    :weight 52 .

Reification beyond triples (e.g., named graphs}

GRAPH :weight52 { :ConceptA :similar :ConceptB . }
GRAPH :weightDescriptions { :weight52 :weight 52 . }
permanent link

answered 20 Dec '11, 13:05

Signified's gravatar image

Signified ♦
accept rate: 37%

edited 25 Jul '12, 12:25


awesome answer! a 21st century knowledge engineer has to accept that somebody, somewhere, is going to try every one of these, as well as some others.

(20 Dec '11, 13:48) database_animal ♦ database_animal's gravatar image

I guess that each of the above approaches has its own advantages and disadvantages, so seeing them all proliferate would not be that strange.

FWIW, my own personal favourite is the fourth, more direct modelling. Intuitively, people seem predisposed not to consider intangibles as resources/entities (events, addresses, relationships, etc.), but doing so often leads to the most intuitive results.

(20 Dec '11, 14:35) Signified ♦ Signified's gravatar image

Nice. And I found this one which seems less complete: Defining N-ary Relations on the Semantic Web W3C Working Group Note 12 April 2006 http://www.w3.org/TR/swbp-n-aryRelations/

And about the rdf:value

(22 Dec '11, 02:20) Fabian Cretton Fabian%20Cretton's gravatar image

One disadvantage of the solution 3 is that it is asymmetrical in the way it is written: :ConceptA is a node on its own, but :ConceptB is part of a complex resource together with a similarity weight. There should be a good reason for this sort of asymmetry.

(22 Dec '11, 05:14) Michael Schn... ♦ Michael%20Schneider's gravatar image

4 is also my fav. One might consider having distinct properties ":element1" and ":element2". An advantage of 4 is that it gives some control over the format of weight relationships by using property restrictions with the :ConceptSimilarity class: There must be exactly one value for each of property ":element1" and ":element2", and the values have to come from certain classes, and the :weight property must have a single value of type xsd:double. No need for global restrictions on the properties, so one can dedicated classes ":PeopleSimilarity", ":VehicleSimilatiry", with the same properties.

(22 Dec '11, 05:23) Michael Schn... ♦ Michael%20Schneider's gravatar image

In addition to the given answers you may have a look at the following ontologies and vocabularies:

  • The Similarity Ontology - a general purpose ontology for modelling (reified) similarity statements
  • The Weighting Ontology - an ontology that consists of a general purpose weight concept (an application of the interpretation property pattern)
  • The Property Reification Vocabulary - a vocabulary for describing the property reification ontology design pattern, i.e. semantic relations from shortcut relations to property reification class instances
permanent link

answered 20 Dec '11, 14:24

zazi's gravatar image

accept rate: 13%

a question about the Property Reification Vocabulary: here they use properties as object of triples:
ex:ReadReification a prv:PropertyReification ;
prv:shortcut ex:hasRead ;
prv:reification_class ex:ReadingEvent ;
prv:subject_property ex:reader ;
prv:object_property ex:book .

which in OWL 1.0 would be "OWL full" and in OWL 2.0 would be some "punning", is that right ?

Does it have any implication that one should be aware of ?

(21 Dec '11, 02:23) Fabian Cretton Fabian%20Cretton's gravatar image

@Fabian: your interpretation maybe goes a bit into the wrong direction. The Property Reification Vocabulary (PRV) can be viewed as a knowledge representation language on the level of RDF(S) or OWL, and, hence, should be utilised by inference engines to derive (new) knowledge. A prv:PropetyReification instance should be re-utilised in a rule (template).

(28 Dec '11, 06:28) zazi zazi's gravatar image

@zazi thanks for your comment. So what is my wrong interpretation here ? Does it only depend on how the reasoner is written ? and could you give an exemple of the rule (template) you talk about ? thanks

(02 Jan '12, 02:02) Fabian Cretton Fabian%20Cretton's gravatar image

@Fabian: PRV can be seen as an addition to RDF(S), OWL, etc., so I wouldn't categorize this vocabulary into "OWL full" nor "punning", both are utilised in another context. So your reasoning engine has to know how to handle such property reification definitions (e.g. via a SPIN or N3 rule). Re. a property reification definition example: you just posted one above :)

PS: my Master thesis contains a chapter about PRV as well (see, e.g., http://smiy.org/2011/07/17/semantic-federation-of-music-and-music-related-information-for-establishing-a-personal-music-knowledge-base/)

(02 Jan '12, 06:44) zazi zazi's gravatar image

You might consider using a representation other than RDF if you need to deal with a large number of weighted predicates. Hypergraph databases, for instance, are especially designed to support weighted predicates.

I recently did a project that involved a calculation roughly like PageRank over nearly a quadrillion weighted links inferred from a billion Linked Data triples. It took many optimizations to accomplish this quickly with modest hardware, and one of them was representing weighted links with the SPARQL 1.1 CSV result format which looks like

permanent link

answered 21 Dec '11, 09:00

database_animal's gravatar image

database_animal ♦
accept rate: 15%

If I am not mistaken, this is a typical example where you could design a Class instead of a Property:

aSimilaritiy rdf:type Similarity
a partOfSimilarity aSimilarity
b partOfSimilarity aSimilarity

There you have created the information for "similarTo"

and thus you can add any other information:
aSimilarity hasWeight 2

permanent link

answered 20 Dec '11, 02:14

Fabian%20Cretton's gravatar image

Fabian Cretton
accept rate: 2%

Thank you for your answers.

to Michael: I want to automaticlly build an ontology from scratch using likeliness relationships.

To Fabien: this may be usefull but I don't know if it works for the following example:

Let's say that we have a database with annotation (tags for each document). We want to model the co-appearance frequency of these tags. Thus we will be able to say that 'tag1' appears with 'tag2' with the following frequency. I'm not sure that using your solution it would be poosible to model such information, because the weighting is on the Class and not on an instance of the Class aSimilarity.

If I'm wrong, thank you to show me the right way.

Thank you.

permanent link

answered 20 Dec '11, 10:22

Hichem's gravatar image

accept rate: 0%

edited 20 Dec '11, 10:22

Fabian was referring to having an instance of the class Similarity for each set of similar things.

Adapted to your example (:TagPair <-> :Similarity):

:TagPair a owl:Class . # (or rdfs:Class as appropriate)
:Tag1Tag2 a :TagPair .
:Tag1Tag2 :tag :tag1 .
:Tag1Tag2 :tag :tag2 .
:Tag1Tag2 :co-occurrences 12 .
(20 Dec '11, 13:10) Signified ♦ Signified's gravatar image

Looking at some of the Similarity approaches detailed here, am I missing something, or isn't this one for SKOS?

permanent link

answered 22 Dec '11, 05:44

William%20Greenly's gravatar image

William Greenly
accept rate: 13%

How does SKOS solve this problem:

I want to say that a concept a is similar to a concept b with an float:x certainty


(22 Dec '11, 07:00) Michael Schn... ♦ Michael%20Schneider's gravatar image

In a sense yes, but SKOS has no support for continuous similarity: only coarse/discrete properties.

(22 Dec '11, 14:59) Signified ♦ Signified's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 19 Dec '11, 16:37

question was seen: 3,425 times

last updated: 13 Jun '13, 14:26