[protege-owl] Re: to find a OWLClass that matches a substring

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

[protege-owl] Re: to find a OWLClass that matches a substring

walid.bayounes

you can download protege from the website  standford

Reply | Threaded
Open this post in threaded view
|

[protege-owl] SV: Re: to find a OWLClass that matches a substring

Amelie Marseille [MSc BIX]
Thanks for this answer but, sorry may be I was not clear.
 
I am using the protege API as a library of my own program. With that, i created a JenaOWLModel. On that model I created some objects OWLNamedClass. Now, I want to do find a OWL class that contains a given substring in its name or in its labels by using java code (not the protege graphical interface).
 
I know that i can have a class if I know its exact name by using getOWLNamedClass(clss_name). But how to do if I know only a part of its name, or its label ?
 
Thank you,
 
Amelie.

________________________________

Fra: [hidden email] på vegne av walid.bayounes
Sendt: to 27/07/2006 11:04
Til: [hidden email]
Emne: [protege-owl] Re: to find a OWLClass that matches a substring



you can download protege from the website  standford


winmail.dat (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: SV: Re: to find a OWLClass that matches a substring

starred
Hi,

sorry I don't remember exactly which code to invoke, but probably the best thing to do is to look into the classes used by the search tab. Jena API too have no class/method for handling searches like the one you're looking for, but the search tab put this functionality in Protégé.

Cheers,

Armando

--------------------------------------------------

Ing. Armando Stellato
AI Research Group,
Dept. of Computer Science, Systems and Production
University of Roma, Tor Vergata
Via del Politecnico 1 00133 ROMA (ITALY)
tel: +39 06 7259 7718/7334 (office);
     +39 06 7259 7332 (lab)
fax: +39 06 7259 7460
e_mail: [hidden email]

--------------------------------------------------  

> -----Original Message-----
> From: [hidden email] [mailto:protege-owl-
> [hidden email]] On Behalf Of Amelie Marseille [MSc BIX]
> Sent: Thursday, July 27, 2006 1:06 PM
> To: [hidden email]
> Subject: [protege-owl] SV: Re: to find a OWLClass that matches a substring
>
> Thanks for this answer but, sorry may be I was not clear.
>
> I am using the protege API as a library of my own program. With that, i
> created a JenaOWLModel. On that model I created some objects OWLNamedClass.
> Now, I want to do find a OWL class that contains a given substring in its
> name or in its labels by using java code (not the protege graphical
> interface).
>
> I know that i can have a class if I know its exact name by using
> getOWLNamedClass(clss_name). But how to do if I know only a part of its
> name, or its label ?
>
> Thank you,
>
> Amelie.
>
> ________________________________
>
> Fra: [hidden email] på vegne av walid.bayounes
> Sendt: to 27/07/2006 11:04
> Til: [hidden email]
> Emne: [protege-owl] Re: to find a OWLClass that matches a substring
>
>
>
> you can download protege from the website  standford


-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: to find a OWLClass that matches a substring

Nikolaj Berntsen

>>-----Original Message-----
>>From: [hidden email] [mailto:protege-owl-
>>[hidden email]] On Behalf Of Amelie Marseille [MSc BIX]
>>Sent: Thursday, July 27, 2006 1:06 PM
>>To: [hidden email]
>>Subject: [protege-owl] SV: Re: to find a OWLClass that matches a substring
>>
>>Thanks for this answer but, sorry may be I was not clear.
>>
>>I am using the protege API as a library of my own program. With that, i
>>created a JenaOWLModel. On that model I created some objects OWLNamedClass.
>>Now, I want to do find a OWL class that contains a given substring in its
>>name or in its labels by using java code (not the protege graphical
>>interface).
>>    
>>
I just started with SPARQL (http://www.w3.org/TR/rdf-sparql-query/)
myself a couple of days ago. Jena has support for sparql thru ARQ
(http://jena.sourceforge.net/ARQ/Tutorial/index.html), and I believe you
create a query that will find the classess you need. It just took me
around a day to get my RDF into a database backed Jena model and make
some successful queries, so I think you should be able to do so likewise
pretty quickly.

Cheers,
/\/

--
Cheers,
/\/ikolaj Berntsen
--
Mobile People A/S
Toldbodgade 31, 2 sal, DK-1253 Copenhagen K
T: +45 7025 2722 F: 70 25 27 23 M: +45 3054 2207

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: to find a OWLClass that matches a substring

starred
It depends on what you need...

I needed exactly the same thing as Amelie and I was working (for other reasons) with a jena model got from protégé.

First of all (if I remember correctly), the jena distributed with Protégé OWL (it is not the last version) does not support precompiled queries, so, if you need to do a lot of queries which are only parameterized in the name of the class to be searched for, maybe you are not facing good performances.

Also, I tried with precompiled queries (using new jena) and I must say, again, if you need to do a lot of consecutive searches it is not the most performing solution.

If you just need to get this function, but don't need to reiterate it a lot of times, maybe ARQ is ok.

Another possibility (depending on your application needs) is to use other resources, for example, indexing with Lucene... you could, in this way, consider the classes as documents and add to them all of their labels (so fulfilling your second request on labels...).

Cheers,

Armando

--------------------------------------------------

Ing. Armando Stellato
AI Research Group,
Dept. of Computer Science, Systems and Production
University of Roma, Tor Vergata
Via del Politecnico 1 00133 ROMA (ITALY)
tel: +39 06 7259 7718/7334 (office);
     +39 06 7259 7332 (lab)
fax: +39 06 7259 7460
e_mail: [hidden email]

--------------------------------------------------  

> -----Original Message-----
> From: [hidden email] [mailto:protege-owl-
> [hidden email]] On Behalf Of Nikolaj Berntsen
> Sent: Thursday, July 27, 2006 3:13 PM
> To: [hidden email]
> Subject: [protege-owl] Re: to find a OWLClass that matches a substring
>
>
> >>-----Original Message-----
> >>From: [hidden email] [mailto:protege-owl-
> >>[hidden email]] On Behalf Of Amelie Marseille [MSc BIX]
> >>Sent: Thursday, July 27, 2006 1:06 PM
> >>To: [hidden email]
> >>Subject: [protege-owl] SV: Re: to find a OWLClass that matches a
> substring
> >>
> >>Thanks for this answer but, sorry may be I was not clear.
> >>
> >>I am using the protege API as a library of my own program. With that, i
> >>created a JenaOWLModel. On that model I created some objects
> OWLNamedClass.
> >>Now, I want to do find a OWL class that contains a given substring in
> its
> >>name or in its labels by using java code (not the protege graphical
> >>interface).
> >>
> >>
> I just started with SPARQL (http://www.w3.org/TR/rdf-sparql-query/)
> myself a couple of days ago. Jena has support for sparql thru ARQ
> (http://jena.sourceforge.net/ARQ/Tutorial/index.html), and I believe you
> create a query that will find the classess you need. It just took me
> around a day to get my RDF into a database backed Jena model and make
> some successful queries, so I think you should be able to do so likewise
> pretty quickly.
>
> Cheers,
> /\/
>
> --
> Cheers,
> /\/ikolaj Berntsen
> --
> Mobile People A/S
> Toldbodgade 31, 2 sal, DK-1253 Copenhagen K
> T: +45 7025 2722 F: 70 25 27 23 M: +45 3054 2207
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: to find a OWLClass that matches a substring

Nikolaj Berntsen
Armando Stellato wrote:

>It depends on what you need...
>
>I needed exactly the same thing as Amelie and I was working (for other reasons) with a jena model got from protégé.
>
>First of all (if I remember correctly), the jena distributed with Protégé OWL (it is not the last version) does not support precompiled queries, so, if you need to do a lot of queries which are only parameterized in the name of the class to be searched for, maybe you are not facing good performances.
>
>Also, I tried with precompiled queries (using new jena) and I must say, again, if you need to do a lot of consecutive searches it is not the most performing solution.
>
>If you just need to get this function, but don't need to reiterate it a lot of times, maybe ARQ is ok.
>  
>
Thanks for sharing that experience.

Do you know if it is a problem of the db backend implementation
(assuming you used that, not the memory model) or of the SPARQL
implementation?

I wonder whether Sesame from Openrdf (http://www.openrdf.org/about.jsp)
is a better alternative?

Cheers,
/\/ikolaj

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

Reply | Threaded
Open this post in threaded view
|

[protege-owl] Re: to find a OWLClass that matches a substring

starred
Hi Nikolaj,

no, sorry, I used the memory model :-)


--------------------------------------------------

Ing. Armando Stellato
AI Research Group,
Dept. of Computer Science, Systems and Production
University of Roma, Tor Vergata
Via del Politecnico 1 00133 ROMA (ITALY)
tel: +39 06 7259 7718/7334 (office);
     +39 06 7259 7332 (lab)
fax: +39 06 7259 7460
e_mail: [hidden email]

--------------------------------------------------  

> -----Original Message-----
> From: [hidden email] [mailto:protege-owl-
> [hidden email]] On Behalf Of Nikolaj Berntsen
> Sent: Friday, July 28, 2006 7:57 AM
> To: [hidden email]
> Subject: [protege-owl] Re: to find a OWLClass that matches a substring
>
> Armando Stellato wrote:
>
> >It depends on what you need...
> >
> >I needed exactly the same thing as Amelie and I was working (for other
> reasons) with a jena model got from protégé.
> >
> >First of all (if I remember correctly), the jena distributed with Protégé
> OWL (it is not the last version) does not support precompiled queries, so,
> if you need to do a lot of queries which are only parameterized in the
> name of the class to be searched for, maybe you are not facing good
> performances.
> >
> >Also, I tried with precompiled queries (using new jena) and I must say,
> again, if you need to do a lot of consecutive searches it is not the most
> performing solution.
> >
> >If you just need to get this function, but don't need to reiterate it a
> lot of times, maybe ARQ is ok.
> >
> >
> Thanks for sharing that experience.
>
> Do you know if it is a problem of the db backend implementation
> (assuming you used that, not the memory model) or of the SPARQL
> implementation?
>
> I wonder whether Sesame from Openrdf (http://www.openrdf.org/about.jsp)
> is a better alternative?
>
> Cheers,
> /\/ikolaj
>
> -------------------------------------------------------------------------
> To unsubscribe go to http://protege.stanford.edu/community/subscribe.html

-------------------------------------------------------------------------
To unsubscribe go to http://protege.stanford.edu/community/subscribe.html