please help a poor, lost newbie

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

please help a poor, lost newbie

Michael Rusch-2
I'm a developer currently working on two software projects, both of
which use fairly simple ontologies of terms.  On example is an ontology
of file formats.  I have coded up my own solution for storing and
querying these ontologies, but it is non-standard, hard to maintain,
ugly, etc.

I stumbled across Protege, and it struck me that it could be very easy
to maintain the types of ontologies that I'm using, and a little playing
around with Protege Frames suggested it would probably work very well.

The problem is that then I have this thing in Protege with no way to
work with it in my application.  Here's an example of the kind of thing
I'd like to do:

I have one ontology in which classes in the ontology represent a
specific subset of classes and interfaces in my application.  I have
another where each class is a method of accessing some sort of data
store.  I then have a number of strategies for storing data in those
data stores.  Then, I want to be able to say something like the
copy-file strategy accepts HasFilename objects and stores them in a
filesystem-data-store, or something along those lines.  I can stick all
this into the ontology no problem, but then I want to be able to ask,
but then when I have an object whose concrete class implements the
HasFilename interface (which is a class in the ontology, of course), and
a set of data store instances, one of which is a filesystem-data-store,
I want it to be able to find out that I can use the copy-file strategy
to store that.

It seems to me that this "querying" is what "reasoning" is, right?  But,
then I have the problem that trying to work with Protege OWL kind of
made my head spin, and then reasoner stuff and reasoner API was totally
intractable to me.  I can get very simple queries like "can you infer
that X is a Y", but I have no idea how to ask these more complicated
questions.

So, I'm a bit lost.  I have to think that these kinds of problems are
the sorts of things people solve every day, so I'd like to avoid
re-inventing the wheel.

I guess my question is:
1. Can anybody make suggestions as to how I would want to use the
various tools to be able to achieve this kind of functionality?
2. If Protege is going to be my editing tool, am I stuck with
Protege-OWL (which would presumably mean I need to use the other mailing
list, right?)
3. Any other suggestions?  Are the tutorials I should be reading, forums
I should be using, etc.?

Thanks,
Michael
_______________________________________________
protege-discussion mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

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

How to store a datataype property value in a varibale

jad al

 

 

Friends,

 

This may sound easy for you but I am having a hard time storing a date type or object type property to a variable.

 

I wrote the following python code:

 

 

 

 

   cKey  =owlModlel.getOWLIndividual(cKey)# To get the instance that has the Value

   myhostCPUMHz =cKey.getPropertyValue("hostCPUMHz")

   print myhostCPUMHzthe result:

 

TypeError: getPropertyValue(): 1st arg can't be coerced to edu.stanford.smi.protegex.owl.model.RDFProperty

 

 

 

Thank you,

 

 

 


Windows Live™ Hotmail®: Search, add, and share the web’s latest sports videos. Check it out.
_______________________________________________
protege-discussion mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

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

Re: please help a poor, lost newbie

Olivier Dameron
In reply to this post by Michael Rusch-2
On Mon, 27 Jul 2009 16:33:19 -0500, Michael Rusch <[hidden email]>
wrote:

>  guess my question is:
> 1. Can anybody make suggestions as to how I would want to use the
> various tools to be able to achieve this kind of functionality?

If all the information you need is "already there" explicitely in your
ontology (i.e. you do not have necessary and sufficient definition for
example), a first solution would be to use the protege api or the
protege-owl api. The second solution would be to represent your
ontology in owl and use sparql for your queries (again, provided you
only need simple querying with no reasoning). The third solution would
be to represent your ontology in owl again, and to use a reasoner if
you need more advanced features (and some of the owl peculiarities
such as the open world assumption do not get in your way).

According to your description, my guess would be solution 2.

Also, with solution 2 and solution 3, you can use protégé-owl as you
editor and as a tool for debugging (like working out your sparql
queries or your classification), and then use another smaller library
in your final application

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

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

Re: please help a poor, lost newbie

Jonathan Carter-8
In reply to this post by Michael Rusch-2
Hi Michael,

I think I went through a similar experience a couple of years ago when I first started using Protege. I think quite early on, it's important to look at some of the documentation on the Protege site/wiki about whether you should be using Frames or OWL. They are different and you work with them differently and your scenario will more naturally fit one or the other. You can convert projects from one format to the other, so it's not a complete show-stopper if you find that, actually, you ought to be using the other style for managing your ontology.

I also found the OWL a little harder to get into than Frames at first and so spent more time with that but luckily when I reviewed the Protege guidance on the site, it seemed that Frames was the right approach for my use-case. Obviously, some of the tools that are available only work with OWL but you can use things like Jess and Algernon with Frames, to define rules that these plugins use to perform inference on the contents of your knowledge base along the lines of the scenario you described ("if X and Y and Z then copy-file strategy applies").

In terms of how I'm using Protege, we've created a meta model for describing an Enterprise Architecture, using the Protege Classes and Slots. You populate your architecture model by creating Instances of the classes. This makes it very straight-forward to manage the ontology. You can then explore the model by navigating the instances, using the Query tab or by using the Protege API to interact with the knowledge base.
We've also created a web-based reporting environment that operates on an XML export of the Protege project (classes and instances). This web-based environment provides drill-down reports that make it easy for anyone to explore the knowledge base and make complex queries without having to understand Protege or the meta model. We've built a simple plugin for sending the XML version of the knowledge base to the reporting web application.

It's in these web-based reports that we ask the complex questions that may have to navigate a complex sequence of instances and relationships between them - but you define that once and then anyone can make the query.

I would take some time to explore the pros and cons of both Frames and OWL and see which fits your needs best in terms of how you capture your ontology and how you manage it. Querying tools exist for both approaches but don't make the decision on which approach to take purely on which plugins look the best.

Hope this helps a bit

Regards

Jonathan
_______________________________________

Jonathan Carter - Head of Technical Architecture
Enterprise Architecture Solutions Ltd
_______________________________________


Proud sponsors of The Essential Project.
The free open-source Enterprise Architecture Management Platform
www.enterprise-architecture.org
_______________________________________

On 27 Jul 2009, at 22:33, Michael Rusch wrote:

I'm a developer currently working on two software projects, both of which use fairly simple ontologies of terms.  On example is an ontology of file formats.  I have coded up my own solution for storing and querying these ontologies, but it is non-standard, hard to maintain, ugly, etc.

I stumbled across Protege, and it struck me that it could be very easy to maintain the types of ontologies that I'm using, and a little playing around with Protege Frames suggested it would probably work very well.

The problem is that then I have this thing in Protege with no way to work with it in my application.  Here's an example of the kind of thing I'd like to do:

I have one ontology in which classes in the ontology represent a specific subset of classes and interfaces in my application.  I have another where each class is a method of accessing some sort of data store.  I then have a number of strategies for storing data in those data stores.  Then, I want to be able to say something like the copy-file strategy accepts HasFilename objects and stores them in a filesystem-data-store, or something along those lines.  I can stick all this into the ontology no problem, but then I want to be able to ask, but then when I have an object whose concrete class implements the HasFilename interface (which is a class in the ontology, of course), and a set of data store instances, one of which is a filesystem-data-store, I want it to be able to find out that I can use the copy-file strategy to store that.

It seems to me that this "querying" is what "reasoning" is, right?  But, then I have the problem that trying to work with Protege OWL kind of made my head spin, and then reasoner stuff and reasoner API was totally intractable to me.  I can get very simple queries like "can you infer that X is a Y", but I have no idea how to ask these more complicated questions.

So, I'm a bit lost.  I have to think that these kinds of problems are the sorts of things people solve every day, so I'd like to avoid re-inventing the wheel.

I guess my question is:
1. Can anybody make suggestions as to how I would want to use the various tools to be able to achieve this kind of functionality?
2. If Protege is going to be my editing tool, am I stuck with Protege-OWL (which would presumably mean I need to use the other mailing list, right?)
3. Any other suggestions?  Are the tutorials I should be reading, forums I should be using, etc.?

Thanks,
Michael
_______________________________________________
protege-discussion mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

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


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

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