0

In my ontology i have an instances named beethoven, how can I say that my beethoven instance is the same as this beethoven

http://dbpedia.org/page/Ludwig_van_Beethoven

I know that I have to use owl:sameAs predicate, but the thing is when I click on sameAs predicate, protege just give me a list of already existing instances. However, I'm asking about an instance from an ontology on the web.

What I was thinking of is maybe I have to import that ontology, but thing about it, if i want to sue dbpedia, do i really have to import the whole dbpedia to my machine?

Im sure there is something easier and that's why I'm asking you guys

Thanks in advance

Update 1

After reading this answer

Extend DBpedia entity in Protege ontology

I created an instance of the type THINKG in my protege and gave it the exact same URI (which is http://dbpedia.org/page/Ludwig_van_Beethoven ), and said that my beethoven instance is owl:sameAs this new instance, would that be enough?

Update2

I tried to query my ontology after the things that I have listed in update1, and I noticed this:

this query:

select ?z where 
{
    mo:Beethoven owl:sameAs ?z
}

returns empty result

However, this query:

select ?z where 
{
    dbpedia:Ludwig_van_Beethoven owl:sameAs ?z
}

returns my beethoven instance like this: enter image description here

how can the dbpedia:beethoven is the same as mo:beethoven, but the other way around, knowing that I said mo:beethoven is owl:sameAs dbpedia:beethoven not the other way around

Community
  • 1
  • 1
Ania David
  • 1,168
  • 1
  • 15
  • 36

1 Answers1

0

This is one of the important differences between RDF and OWL. RDF is just a bunch of triples. The triples:

:LVBeethoven owl:sameAs :LudwigVanBeethoven

and

:LudwigVanBeethoven owl:sameAs :LVBeethoven

are different triples. RDF graphs are just sets of triples.

OWL, on the other hand, is a logic, concerned with axioms and inferences. owl:sameAs is the equality predicate for OWL individuals, and equality predicates are symmetric (among other things). That means that from A owl:sameAs B an OWL reasoner can infer that B owl:sameAs A. So, if you have a reasoner attached to your SPARQL endpoint, you'll be able to query for either A owl:sameAs ?x or ?x owl:sameAs A and get B as a result. You can do some limited forms of OWL reasoning in SPARQL. In this case, you could use a property path to follow an owl:sameAs link in either direction:

select ?z where 
{
    mo:Beethoven (owl:sameAs|^owl:sameAs) ?z
}

For some more examples, see Using SPARQL for limited RDFS and OWL reasoning.

Community
  • 1
  • 1
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353