[protege-owl] Queries???

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Queries???

Leonardo Jacques da Silva
Hi,

I'm interested in to make some queries to my ontology, but I don't know how to do that.
For example, I want to query if "DOG (an individual) EATS (an object property) GRASS" (another individual) and I want to receive true or false as answer.
Does anyone know if there is any method from API JENA or PROTEGE-OWL API that can do something like that?

Thanks a lot!!!!


--
Leonardo Jacques
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Queries???

Tania Tudorache
Leonardo,

You may want to look at SPARQL for executing queries at triples level:
http://protege.stanford.edu/plugins/owl/sparql.html

And there are also other plugins for querying and inference listed here:
http://protege.cim3.net/cgi-bin/wiki.pl?ProtegePluginsLibraryByTopic#nid3R8

I'm not sure whether SPARQL can return true or false to your example
query, but I think JessTab should be able to.

Tania


Leonardo Jacques da Silva wrote:

> Hi,
>
> I'm interested in to make some queries to my ontology, but I don't
> know how to do that.
> For example, I want to query if "DOG (an individual) EATS (an object
> property) GRASS" (another individual) and I want to receive true or
> false as answer.
> Does anyone know if there is any method from API JENA or PROTEGE-OWL
> API that can do something like that?
>
> Thanks a lot!!!!
>
>
> --
> Leonardo Jacques
> ------------------------------------------------------------------------
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Queries???

Leonardo Jacques da Silva
Thanks Tania!!!
I will take a look at JessTab.

On 11/15/06, Tania Tudorache <[hidden email]> wrote:
Leonardo,

You may want to look at SPARQL for executing queries at triples level:
http://protege.stanford.edu/plugins/owl/sparql.html

And there are also other plugins for querying and inference listed here:
http://protege.cim3.net/cgi-bin/wiki.pl?ProtegePluginsLibraryByTopic#nid3R8

I'm not sure whether SPARQL can return true or false to your example
query, but I think JessTab should be able to.

Tania


Leonardo Jacques da Silva wrote:

> Hi,
>
> I'm interested in to make some queries to my ontology, but I don't
> know how to do that.
> For example, I want to query if "DOG (an individual) EATS (an object
> property) GRASS" (another individual) and I want to receive true or
> false as answer.
> Does anyone know if there is any method from API JENA or PROTEGE-OWL
> API that can do something like that?
>
> Thanks a lot!!!!
>
>
> --
> Leonardo Jacques
> ------------------------------------------------------------------------
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
>

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03



--
Leonardo Jacques
_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Inferencing on instances.

Kostas Vavliakis

Hello,

 

I am developing an ontology about art paintings, I would like to classify my instances with a reasoner.

 

For example, if there is an instance named MonaLisa, that belongs to the class Painting and has a property hasCreator to the instance LeonardoDaVinci that belong to the class Creators (MonaLisa -> hasCreator -> LeonardoDaVinci) . How can I define with Protégé/OWL that all instances which have as creator LeonardoDaVinci should be inferred as instances of class ValuedItems too?

 

I guess this is easy if we declared everything as classes and not instances. In that case just adding a necessary and sufficient condition to the Class ValuedItems like: (hasCreator has LeonardoDaVinci) would work. But since values such as MonaLisa and LeonardoDaVinci are more like instances and not classes I would like to know if such type of inferencing is possible for instances.

 

Thanks,

 

Kostas

 

 


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

Re: [protege-owl] Inferencing on instances.

Martin O'Connor

You can use SWRL to reason with individuals. cf.
http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab

Martin

Vavliakis Kostas wrote:

> Hello,
>
>  
>
> I am developing an ontology about art paintings, I would like to
> classify my instances with a reasoner.
>
>  
>
> For example, if there is an instance named MonaLisa, that belongs to
> the class Painting and has a property hasCreator to the instance
> LeonardoDaVinci that belong to the class Creators (MonaLisa ->
> hasCreator -> LeonardoDaVinci) . How can I define with Protégé/OWL
> that all instances which have as creator LeonardoDaVinci should be
> inferred as instances of class ValuedItems too?
>
>  
>
> I guess this is easy if we declared everything as classes and not
> instances. In that case just adding a necessary and sufficient
> condition to the Class ValuedItems like: (hasCreator has
> LeonardoDaVinci) would work. But since values such as MonaLisa and
> LeonardoDaVinci are more like instances and not classes I would like
> to know if such type of inferencing is possible for instances.
>
>  
>
> Thanks,
>
>  
>
> Kostas
>
>  
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>protege-owl mailing list
>[hidden email]
>https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
>Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  
>

_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Reasoner can infer that MonaLisa is a ValuedItem

Julia Dmitrieva
Hello Kostas and Martin

I have make the ontology with you Paintings example,
and reasoner Fact can infer that MonaLisa is ValuedItem:
In my example MonaLisa is just a painting,
and Leonardo is a FamousPainter.
ValuedItem is defined as intersection of Painting and Restr (hasCreator
FamousPainter).

Reasoner can work with individuals

Here is my ontology:
<?xml version="1.0"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns="http://www.owl-ontologies.com/Ontology1163616880.owl#"
  xml:base="http://www.owl-ontologies.com/Ontology1163616880.owl">
  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:ID="FamousPainter">
    <rdfs:subClassOf>
      <owl:Class rdf:ID="Painter"/>
    </rdfs:subClassOf>
  </owl:Class>
  <owl:Class rdf:ID="ValuedItem">
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <owl:equivalentClass>
      <owl:Class>
        <owl:intersectionOf rdf:parseType="Collection">
          <owl:Class rdf:ID="Painting"/>
          <owl:Restriction>
            <owl:onProperty>
              <owl:ObjectProperty rdf:ID="hasCreator"/>
            </owl:onProperty>
            <owl:someValuesFrom rdf:resource="#FamousPainter"/>
          </owl:Restriction>
        </owl:intersectionOf>
      </owl:Class>
    </owl:equivalentClass>
  </owl:Class>
  <owl:Class rdf:about="#Painting">
    <rdfs:subClassOf rdf:resource="http://www.w3.org/2002/07/owl#Thing"/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="#hasCreator"/>
        </owl:onProperty>
        <owl:someValuesFrom rdf:resource="#Painter"/>
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>
  <owl:ObjectProperty rdf:about="#hasCreator">
    <rdfs:domain rdf:resource="#Painting"/>
    <rdfs:range rdf:resource="#Painter"/>
  </owl:ObjectProperty>
  <FamousPainter rdf:ID="Leonardo"/>
  <Painting rdf:ID="MonaLisa">
    <hasCreator rdf:resource="#Leonardo"/>
  </Painting>
</rdf:RDF>

<!-- Created with Protege (with OWL Plugin 2.2, Build 339)  
http://protege.stanford.edu -->
With best regards,
Julia
Martin O'Connor schreef:

> You can use SWRL to reason with individuals. cf.
> http://protege.cim3.net/cgi-bin/wiki.pl?SWRLTab
>
> Martin
>
> Vavliakis Kostas wrote:
>
>  
>> Hello,
>>
>>  
>>
>> I am developing an ontology about art paintings, I would like to
>> classify my instances with a reasoner.
>>
>>  
>>
>> For example, if there is an instance named MonaLisa, that belongs to
>> the class Painting and has a property hasCreator to the instance
>> LeonardoDaVinci that belong to the class Creators (MonaLisa ->
>> hasCreator -> LeonardoDaVinci) . How can I define with Protégé/OWL
>> that all instances which have as creator LeonardoDaVinci should be
>> inferred as instances of class ValuedItems too?
>>
>>  
>>
>> I guess this is easy if we declared everything as classes and not
>> instances. In that case just adding a necessary and sufficient
>> condition to the Class ValuedItems like: (hasCreator has
>> LeonardoDaVinci) would work. But since values such as MonaLisa and
>> LeonardoDaVinci are more like instances and not classes I would like
>> to know if such type of inferencing is possible for instances.
>>
>>  
>>
>> Thanks,
>>
>>  
>>
>> Kostas
>>
>>  
>>
>>  
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> protege-owl mailing list
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>>
>> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>>  
>>
>>    
>
> _______________________________________________
> protege-owl mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-owl
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 
>  


_______________________________________________
protege-owl mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-owl

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03