NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

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

NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Gokul
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Michael DeBellis-2
Gokul, there are some basic errors in your ontology with the definition of your object and data properties. 

First you seem to be punning the names of some of your properties. Punning is when you use the same name for two different objects. It's only used when you want to refer to a class as an individual, otherwise it will generate an error or at the last unpredictable behavior. On image 6 you show a list of data properties with names like calcium, phosphorous,... However, on image 2 you have your class hierarchy which includes classes names calcium, phosphorous, etc. I'm surprised this didn't generate an error (did you run the reasoner?) but even if it didn't it is not a standard practice and will at best yield unpredictable results. If you want a property that relates say the percentage of calcium in a soil sample use a property name like calciumPercentage but don't use the same names for properties and classes. 

Second, on image 2 you have the range of the object property grow_at as being the Intersection of calcium and magnesium and phosphorous and potassium. Remember in OWL you always need to think in terms of set theory. So the intersection of sets A, B, and C is the set of all objects that are in A and B and C. I.e., you are saying the range for grow_at must be an individual that is an instance of calcium AND magnesium AND phosphorous AND potassium. This is a common new user mistake. What I think you want is to simply take the superclass of magnesium, phosphorous, etc. which in your ontology seems to be organic_matter. If you say the range of an object property is a class then any subclass of that class is also part of the range. Note, in this case the way you specified it won't generate an error, there are times when you may want to specify that the range of an object property is the intersection of two different classes but it's rare.

Third on image 6 you have the domain of calcium (the property) as "calcium some xsd:float" Again, I'm surprised this didn't generate an error when you ran the reasoner but even setting aside that you are using the same name for a class and a property that is a strange way to define a domain. Typically the domain and range for an object property are just the names of classes. The domain is the class of all things that can have that property asserted about them and the range is the class of all the things that can be asserted as the related object. So if I had an ontology where Man and Woman were classes and I had a property called hasWife the domain would be Man and the range would be Woman and the inverse property would be hasHusband with the domain of Woman and range of Man. Note: you can use more complex class expressions as the domain or range but at least in my experience the times when you really need to do that are rare. 

Also, FYI, the standard is to capitalize the first word in every definition of a class name rather than use spaces. So OrganicMatter would be a more standard way to write the class name than organic_matter. And properties should be named with the first letter lower case and then any other words upper case, so consistOf rather than consist_of.  Doing it the other way won't cause an error but following the standard will make your ontology more understandable to people who regularly use OWL. 

I don't know enough about SPARQL to say why you aren't getting the expected output but given the unusual definitions I'm not at all surprised. My suggestions (if you aren't already doing this) is to make sure you've done and understood the Pizza tutorial and always run the Reasoner and make sure there are no errors before you try SPARQL queries. Hope that is helpful.

Michael


_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Lorenz B.
In reply to this post by Gokul
Just sharing a bunch of image links makes it most likely impossible to help.

And given that you're using 3rd party Ontop plugin makes it even harder. We neither know your mappings nor the tables from which the instance data is supposed to come from...

<http://protege-project.136.n4.nabble.com/file/t376923/Untitled1.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled2.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled3.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled4.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled5.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled6.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled7.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled8.jpg> 
<http://protege-project.136.n4.nabble.com/file/t376923/Untitled10.jpg> 


SIR/MADAM

MY ONTOLOGY OUTPUT JUST APPEAR TO BE BLANK. I WANT MY OUTPUT TO BE LIKE THE
FOLLOWING.
IF CALCIUM, PHOSPHORUS, MAGNESIUM AND POTASSIUM ARE WITHIN THE RANGE THEN
OUTPUT MUST BE GOOD YIELD. KINDLY GUIDE ME.

REGARDS
GOKUL



--
Sent from: http://protege-project.136.n4.nabble.com/Protege-User-f4659818.html
_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user

-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Gokul
In reply to this post by Gokul
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Michael DeBellis-2
Gokul, you fixed one of the problems but not all of them. You still have the range for the growAt property as the intersection of potassium, calcium, phosphorous, and magnesium. That means that any object you assert as the value of growAt must be an instance of  potassium, AND an instance of calcium, AND...  The same for consistOf, you have the range as the Intersection of temperature, air, soil, humidity, and location. 

I think what you want in both cases is to find the most common superclass for the various classes and make THAT the range. So for growAt I think you want the range to be organic_matter just as the domain is. If you make the range organic_matter then you are saying it's the UNION (rather than INTERSECTION) of all the subclsses of organic_matter. I.e., anything that is in any of the subsets of organic_matter, so an instance of calcium OR an instance of potassium OR...

Also, you have the domain for the data property calciumpercent as "calciumpercent some xsd:float". Two problems with this, one is that you seem to be using the same name for a class and a property which is not supported. I see that it says "Reasoner active" so I assume you have run the reasoner. I'm surprised this didn't generate an error but it's definitely not supported and won't do what you want it to. The domain (for an object or data property) is typically just a single class, the most general class that the property can be asserted to. I'm not sure what you are trying to specify with the statement  "calciumpercent some xsd:float" but I think all you need there is just the name of a class such as Soil or OrganicMatter, whatever class is the most general class that can have a calciumpercent.

Also, the semantics of your ontology seem confusing to me. I don't know your domain but it seems odd to assert (as in image 8) that calcium is an instance of OrganicMatter and that calcium growAt calcium or that calcium has a calciumpercent value (if it's calcium isn't it 100% calcium?). But note that when you say calcium growAt calcium that is contradicting your assertion that the range for growAt is the intersection of potassium, calcium, phosphorous, and magnesium because calcium is just calcium and you are saying anything that is in the range of growAt has to be all those elements, i.e., it has to be potassium, phosphorous, etc. as well as calcium. 

Michael




_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Gokul
Sir

Still i didn't get my output. Can you provide your valuable time and connect me through TEAM VIEWER and correct my error to get output. I kindly request you to do the needful.


Regards
Gokul 

_______________________________________________
protege-user mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-user
Reply | Threaded
Open this post in threaded view
|

Re: NOT GETING OUTPUT - Ontop SPARQL APPEAR TO BE BLANK

Lorenz B.
First of all, please reply only to the mailing list! thank you.

Secondly, I don't think that anybody here can give you full support in modeling your domain of interest.
Usually, companies pay money for people resp. experts doing this ...

For me, it sounds a bit like you're missing fundamental things.
And it remains unclear if you read the last mail from Michael DeBellis which provided so much useful information and content.
And questions ...

To cite just one part:

You still have the range for the growAt property as the intersection of potassium, calcium, phosphorous, and magnesium. That means that any object you assert as the value of growAt must be an instance of  potassium, AND an instance of calcium, AND...  The same for consistOf, you have the range as the Intersection of temperature, air, soil, humidity, and location. 
So, did you understand this? Do you know what an intersection is? Modeling in OWL needs definitely some background in logics. Ideally, you'd also read and understand documents about the semantics of OWL. This is crucial to understand deductive reasoning in OWL.
So asking again, do you understand the difference between multiple ranges (aka intersection A and B and C) vs a single class expression as the union of those classes (A or B or C) ?

I also don't know the purpose of consistOf, but having a range location sounds strange, or not? Having a range temperature, also a bit unclear to me. But sure, I don't know the domain so I might be wrong here


Anyways, we don't know the rest of your ontology, given that you just showed some pictures which is more or less useless. Nobody could open it in Protege, nobody could modify it in Protege, nobody could test it in Protege, ...


Please ask specific questions and please try to address the hints you got so far - ideally, you also read some resources about OWL. Even the W3C recommendation contains information for users new to OWL. And there are also books, blogs, etc
Recently available and for free e.g. "An Introduction to Ontology Engineering” [1]



Sir

Still i didn't get my output. Can you provide your valuable time and connect me through TEAM VIEWER and correct my error to get output. I kindly request you to do the needful.


Regards
Gokul 
-- 
Lorenz Bühmann
AKSW group, University of Leipzig
Group: http://aksw.org - semantic web research center

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