[HELP]: Error while defining Data Properties in Class Expression Editor

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

[HELP]: Error while defining Data Properties in Class Expression Editor

Darshi Shah

To Protégé User Support,

 

I keep encountering this error

Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.



--
Regards,
Darshi Shah


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

error defining numerical boundaries 2.PNG (137K) Download Attachment
error defining numerical boundaries 4.PNG (71K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [HELP]: Error while defining Data Properties in Class Expression Editor

Michael DeBellis-2
Darshi, I think this is a simple fix, you need to put the package prefix before the datatype. In this case I think it's xsd:integer so the expression should be:

“hasCalorificContentValue some xsd:integer[>= 400]”  

If you look in the Entities tab there should be a subtab in there called datatypes (at least there is on mine, I've customized my UI so sometimes it's not the same as the default but I think that is part of the default UI not something I added) and that lists all the builtin datatypes and their prefixes. Besides xsd there are some with owl prefixes and rdf but the most common one people use are the xsd ones. Also, if you use the "Data Properties" tab to create a data property and then go to specify the Range of the property you will see a list of all the builtin datatypes with their appropriate prefixes. 

BTW, one thing that caused me some grief when I was first learning Protege is that when you go to specify the value of a datatype on an individual the default will be the datatype of whatever value you most recently added. I.e., if you go to assign the hasAge datatype of a Person and set that to 18 with datatype xsd:integer and then go to specify the hasName value of that Person to be the string "John Smith" the default will still be xsd:integer unless you explicitly change it to xsd:string or whatever datatype is appropriate for the value you are setting. 

Michael

On Fri, Aug 31, 2018 at 1:43 AM Darshi Shah <[hidden email]> wrote:

To Protégé User Support,

 

I keep encountering this error

Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.



--
Regards,
Darshi Shah

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

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

Re: [HELP]: Error while defining Data Properties in Class Expression Editor

Darshi Shah
Hi Michael,

Thank you so much for such a detailed explanation. I really appreciate it. I am not at work right now, but will definitely try whatever you recommended when I get back.

I have 3 more questions for you:

1)  I am trying to use SPARQL, SWRL and SQWRL and aiming to compare the 3 of them and their querying efficiencies. However, I am having a lot of struggle in terms of the writing the syntax for querying and there are not a whole lot of resources online (at least I could not find) so is there a way you can provide some help with SPARQL, SWRL, SQWRL - a) when they are specifically used? b) syntax help, then that would be great! 

2) I merged Pizza and Wine ontologies that are available online and now I am trying to form relationships between Pizza Topping Spiciness Index and Wine recommendations based on that. Do you have any recommendations on how to do that specifically? So, each pizza or the pizza topping has a spiciness value assigned to it, which is either Hot, Medium or Mild so based on the spiciness value of the pizza or the pizza topping the customer picks, I want to have the ontology provide wine recommendations. I tried adding the types of wine as subclasses for Pizza and pizza toppings and also tried forming relationships between the individuals in the Pizza class and the Wine class, but they all resulted in inconsistent ontology. So, I really would like to know how to form this kind of specific relationship.

3) It seems like you have been working with Protege and ontologies I am assuming for quite a bit of time, so would you mind providing me where ontologies can really be useful, what the predicted future of them is and their relevance to the emerging technologies please? I am VERY new to this field and did not feel excited about working on the Ontology based project I was assigned, so just want to get some more information on that from someone who has in-depth knowledge and work experience with it.

Thank you so much again for all the help and support. I really appreciate it.


On Aug 31, 2018, at 8:10 PM, Michael DeBellis <[hidden email]> wrote:

Darshi, I think this is a simple fix, you need to put the package prefix before the datatype. In this case I think it's xsd:integer so the expression should be:

“hasCalorificContentValue some xsd:integer[>= 400]”  

If you look in the Entities tab there should be a subtab in there called datatypes (at least there is on mine, I've customized my UI so sometimes it's not the same as the default but I think that is part of the default UI not something I added) and that lists all the builtin datatypes and their prefixes. Besides xsd there are some with owl prefixes and rdf but the most common one people use are the xsd ones. Also, if you use the "Data Properties" tab to create a data property and then go to specify the Range of the property you will see a list of all the builtin datatypes with their appropriate prefixes. 

BTW, one thing that caused me some grief when I was first learning Protege is that when you go to specify the value of a datatype on an individual the default will be the datatype of whatever value you most recently added. I.e., if you go to assign the hasAge datatype of a Person and set that to 18 with datatype xsd:integer and then go to specify the hasName value of that Person to be the string "John Smith" the default will still be xsd:integer unless you explicitly change it to xsd:string or whatever datatype is appropriate for the value you are setting. 

Michael

On Fri, Aug 31, 2018 at 1:43 AM Darshi Shah <[hidden email]> wrote:
To Protégé User Support,

 

I keep encountering this error
Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.


-- 
Regards,
Darshi Shah

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


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

Re: [HELP]: Error while defining Data Properties in Class Expression Editor

Michael DeBellis-2
>  I am trying to use SPARQL, SWRL and SQWRL

I can't say much about SPARQL because I've only dabbled with it. My impression is that a good simple analogy is that SPARQL is to RDF/OWL as SQL is to relational databases, a way to make queries. Also, my impression is that SPARQL is good if you want to walk through the tree structures that RDF creates, that it's what I would consider sort of a "lower level" of abstraction compared to SWRL and SQWRL which operate more at the logical level. Also, that SPARQL is good for querying distributed data sources, so for example I think you could start at say DBPedia and then your query could also bring in results from other data sources at other sites.  But take that with a grain of salt, someone who knows more than I do may correct some of that. 

I can tell you more about SWRL and SQWRL. First here is a simple tutorial I developed for SWRL:  http://symbolicshacker.blogspot.com/2017/06/swrl-process-modeling-tutorial.html  I think there may be a new SWRL tutorial on the Protege web site, I suggest you look there as well. 

SWRL is a great rule language that takes advantage of the logical foundations of OWL and lets you write rules that can deduce things that couldn't be expressed in the DL language you use to define classes. The things that usually confuse new users are the restrictions caused by not supporting non-monotonic reasoning and the Open World assumption. Here is a great presentation about SWRL:  https://protege.stanford.edu/conference/2009/slides/SWRL2009ProtegeConference.pdf 

The syntax for SWRL and SQWRL are almost identical. The difference is that SQWRL is ONLY a query language. On the right hand side of a SWRL rule you can have statements that will assert new information into the ontology. On the right hand side of a SQWRL rule you have statements like sqwrl:select(?x, ?y,...) where the rule will print out every binding for the variables you include in the select statement. SQWRL also supports things like bags and sets which SWRL doesn't but again remember that is only for displaying information that is already there not for asserting new information that isn't in the ontology. I use SQWRL (and I think this is the most common use) to debug SWRL rules. In my tutorial there is an example of using SQWRL that way. 

I'll go back and look at your other questions and reply to them if I can shed some light on them as well. Good luck!

Michael

On Fri, Aug 31, 2018 at 7:52 AM Darshi Shah <[hidden email]> wrote:
Hi Michael,

Thank you so much for such a detailed explanation. I really appreciate it. I am not at work right now, but will definitely try whatever you recommended when I get back.

I have 3 more questions for you:

1)  I am trying to use SPARQL, SWRL and SQWRL and aiming to compare the 3 of them and their querying efficiencies. However, I am having a lot of struggle in terms of the writing the syntax for querying and there are not a whole lot of resources online (at least I could not find) so is there a way you can provide some help with SPARQL, SWRL, SQWRL - a) when they are specifically used? b) syntax help, then that would be great! 

2) I merged Pizza and Wine ontologies that are available online and now I am trying to form relationships between Pizza Topping Spiciness Index and Wine recommendations based on that. Do you have any recommendations on how to do that specifically? So, each pizza or the pizza topping has a spiciness value assigned to it, which is either Hot, Medium or Mild so based on the spiciness value of the pizza or the pizza topping the customer picks, I want to have the ontology provide wine recommendations. I tried adding the types of wine as subclasses for Pizza and pizza toppings and also tried forming relationships between the individuals in the Pizza class and the Wine class, but they all resulted in inconsistent ontology. So, I really would like to know how to form this kind of specific relationship.

3) It seems like you have been working with Protege and ontologies I am assuming for quite a bit of time, so would you mind providing me where ontologies can really be useful, what the predicted future of them is and their relevance to the emerging technologies please? I am VERY new to this field and did not feel excited about working on the Ontology based project I was assigned, so just want to get some more information on that from someone who has in-depth knowledge and work experience with it.

Thank you so much again for all the help and support. I really appreciate it.


On Aug 31, 2018, at 8:10 PM, Michael DeBellis <[hidden email]> wrote:

Darshi, I think this is a simple fix, you need to put the package prefix before the datatype. In this case I think it's xsd:integer so the expression should be:

“hasCalorificContentValue some xsd:integer[>= 400]”  

If you look in the Entities tab there should be a subtab in there called datatypes (at least there is on mine, I've customized my UI so sometimes it's not the same as the default but I think that is part of the default UI not something I added) and that lists all the builtin datatypes and their prefixes. Besides xsd there are some with owl prefixes and rdf but the most common one people use are the xsd ones. Also, if you use the "Data Properties" tab to create a data property and then go to specify the Range of the property you will see a list of all the builtin datatypes with their appropriate prefixes. 

BTW, one thing that caused me some grief when I was first learning Protege is that when you go to specify the value of a datatype on an individual the default will be the datatype of whatever value you most recently added. I.e., if you go to assign the hasAge datatype of a Person and set that to 18 with datatype xsd:integer and then go to specify the hasName value of that Person to be the string "John Smith" the default will still be xsd:integer unless you explicitly change it to xsd:string or whatever datatype is appropriate for the value you are setting. 

Michael

On Fri, Aug 31, 2018 at 1:43 AM Darshi Shah <[hidden email]> wrote:
To Protégé User Support,

 

I keep encountering this error
Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.


-- 
Regards,
Darshi Shah

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

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

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

Re: [HELP]: Error while defining Data Properties in Class Expression Editor

Michael DeBellis-2
In reply to this post by Darshi Shah
" I merged Pizza and Wine ontologies that are available online and now I am trying to form relationships between Pizza Topping Spiciness Index and Wine recommendations based on that. Do you have any recommendations on how to do that specifically? So, each pizza or the pizza topping has a spiciness value assigned to it, which is either Hot, Medium or Mild so based on the spiciness value of the pizza or the pizza topping the customer picks, I want to have the ontology provide wine recommendations. I tried adding the types of wine as subclasses for Pizza and pizza toppings and also tried forming relationships between the individuals in the Pizza class and the Wine class, but they all resulted in inconsistent ontology. So, I really would like to know how to form this kind of specific relationship.  "

This is more of a modeling question so it's hard to provide very specific advise. When you say you " tried adding the types of wine as subclasses for Pizza and pizza toppings " if I'm understanding you that seems like an incorrect way to model it. Remember that OWL is all based on Description Logic which is a subset of First Order Logic. If you aren't well versed in the basics of logic and set theory I suggest taking some time to review or learn the basics. If you look on the page I linked to from my blog with my SWRL tutorial on that page I have a PDF file that is a good overview of basic logic and set theory. It's from a very deep book on Linguistics but all I've included is the first chapter which is just an overview of set theory and logic.

Getting back to your example, in this case saying that Wine is a subclass of Pizza or PizzaTopping is saying that Wine is a subset of Pizza, i.e., that some kinds of Pizzas are Wines which of course isn't true. What I usually do is to create a top level class for the domain that the ontology covers, so for example PizzaDomain or RestaurantDomain. That is how I would model it, I would make Wine and Pizza subclasses of RestaurantDomain. 

I think you are on the right track in thinking about SWRL for this. I could see writing SWRL rules that would define which wines go with which Pizzas. This is totally made up but just to give you an example: 

MeatPizza(?p) ^ Spicy(?p) -> winePairing(?p, Zinfandel) 

This assumes you have classes MeatPizza and Spicy and an object property winePairing with domain Pizza and range Wine. Also, that Wine is an enumerated class  with individuals like Zinfandel, Merlot, etc. 

One thing to remember is when the reasoner turns your ontology mostly red and gives you an error message those error messages are usually pretty clear and worth looking at. They will often point you right to the problem in your definition of the ontology. Also, remember that for anything that the reasoner asserts there is a little "?" icon next to it that you can click and that will give you the deduction that led to the particular assertion. Again, those are usually pretty clear and easy to understand. 

Michael

On Fri, Aug 31, 2018 at 7:52 AM Darshi Shah <[hidden email]> wrote:
Hi Michael,

Thank you so much for such a detailed explanation. I really appreciate it. I am not at work right now, but will definitely try whatever you recommended when I get back.

I have 3 more questions for you:

1)  I am trying to use SPARQL, SWRL and SQWRL and aiming to compare the 3 of them and their querying efficiencies. However, I am having a lot of struggle in terms of the writing the syntax for querying and there are not a whole lot of resources online (at least I could not find) so is there a way you can provide some help with SPARQL, SWRL, SQWRL - a) when they are specifically used? b) syntax help, then that would be great! 

2) I merged Pizza and Wine ontologies that are available online and now I am trying to form relationships between Pizza Topping Spiciness Index and Wine recommendations based on that. Do you have any recommendations on how to do that specifically? So, each pizza or the pizza topping has a spiciness value assigned to it, which is either Hot, Medium or Mild so based on the spiciness value of the pizza or the pizza topping the customer picks, I want to have the ontology provide wine recommendations. I tried adding the types of wine as subclasses for Pizza and pizza toppings and also tried forming relationships between the individuals in the Pizza class and the Wine class, but they all resulted in inconsistent ontology. So, I really would like to know how to form this kind of specific relationship.

3) It seems like you have been working with Protege and ontologies I am assuming for quite a bit of time, so would you mind providing me where ontologies can really be useful, what the predicted future of them is and their relevance to the emerging technologies please? I am VERY new to this field and did not feel excited about working on the Ontology based project I was assigned, so just want to get some more information on that from someone who has in-depth knowledge and work experience with it.

Thank you so much again for all the help and support. I really appreciate it.


On Aug 31, 2018, at 8:10 PM, Michael DeBellis <[hidden email]> wrote:

Darshi, I think this is a simple fix, you need to put the package prefix before the datatype. In this case I think it's xsd:integer so the expression should be:

“hasCalorificContentValue some xsd:integer[>= 400]”  

If you look in the Entities tab there should be a subtab in there called datatypes (at least there is on mine, I've customized my UI so sometimes it's not the same as the default but I think that is part of the default UI not something I added) and that lists all the builtin datatypes and their prefixes. Besides xsd there are some with owl prefixes and rdf but the most common one people use are the xsd ones. Also, if you use the "Data Properties" tab to create a data property and then go to specify the Range of the property you will see a list of all the builtin datatypes with their appropriate prefixes. 

BTW, one thing that caused me some grief when I was first learning Protege is that when you go to specify the value of a datatype on an individual the default will be the datatype of whatever value you most recently added. I.e., if you go to assign the hasAge datatype of a Person and set that to 18 with datatype xsd:integer and then go to specify the hasName value of that Person to be the string "John Smith" the default will still be xsd:integer unless you explicitly change it to xsd:string or whatever datatype is appropriate for the value you are setting. 

Michael

On Fri, Aug 31, 2018 at 1:43 AM Darshi Shah <[hidden email]> wrote:
To Protégé User Support,

 

I keep encountering this error
Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.


-- 
Regards,
Darshi Shah

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

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

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

Re: [HELP]: Error while defining Data Properties in Class Expression Editor

Michael DeBellis-2
In reply to this post by Darshi Shah
" 3) It seems like you have been working with Protege and ontologies I am assuming for quite a bit of time, so would you mind providing me where ontologies can really be useful, what the predicted future of them is and their relevance to the emerging technologies please? I am VERY new to this field and did not feel excited about working on the Ontology based project I was assigned, so just want to get some more information on that from someone who has in-depth knowledge and work experience with it."

That's a very subjective question and I'm sure other people have very different opinions but I can never resist giving my opinions on these kinds of things so I'll say a few things. There is a great paper by Tim Berners Lee that defines what the Semantic Web (that's the overall vision that Protege and OWL are part of) is all about. It's a bit dated but still well worth reading. The original was in Scientific American but I think that version is behind a paywall now but here is the same content just not quite as pretty: 


I've spent a lot of my career building AI systems for businesses and when I first came across OWL and Protege it really impressed me.  I think Protege is one of the best freeware tools I've ever used and it is great for developing true domain models (as opposed to models that already have technology assumptions as IMO the models you create in UML do). I first came across Protege because I had a specific modeling problem. I wanted to use logic and set theory to model it but I couldn't find a good tool to do that so I settled on UML. Then I found Protege so I translated my UML model into OWL and when I did that I immediately found logical errors where I was saying things that Protege made me realize weren't consistent but those errors  weren't apparent in the UML version. BTW, there are some important differences between objects in the Semantic Web and in traditional OO programming. Here is a good white paper on that topic: https://www.w3.org/TR/sw-oosd-primer/ 

I think it's been used a lot in some domains especially genetic engineering to model genes but also in many other domains. I'm using it myself in my research in Evolutionary Psychology to model things like Altruism and what people call Theory of Mind but that's a very unusual application (as in I may be the ONLY one doing it right now!)

This is very subjective and I don't pay nearly as much attention to the world of IT now as I used to but my impression is that the Semantic Web hasn't taken off quite as much as I was expecting and I think the reason for that is Machine Learning.  OWL lets you add semantics to web sites. So rather than just having a link from page X to page Y you have a relation from X to Y and you know what kind of page (or resource) X and Y are and what the relation between them means. But doing that requires more work to create the pages or to rework the pages you already have. The promise of Machine Learning is that rather than do all that work you can have algorithms that analyze the text and classify the pages for you. I'm not saying they solve the same problem in fact IMO they don't. But from my time in the business world I know that people always go for what can show or promise results with the least amount of additional effort and in the shortest amount of time. That's why I think there has been more interest from companies like Microsoft and Google in ML than the Semantic Web. 

Just to be clear I'm not saying that ML is better/worse than Semantic Web. I think they both have a lot of potential it's just that IMO ML is getting a lot more attention these days. A good example are some of the discussions I've heard about IBM's Watson. People talk about Watson as an example of ML which it is. But (and this doesn't get nearly as much attention) it is just as much an example of the Semantic Web because one of the primary data sources for Watson was DBPedia which is one of the best examples of a practical real world Semantic Web system. I encourage you to check out the DBpedia page for some examples of what can be done with the OWL and the Semantic Web:  https://wiki.dbpedia.org/ 

I could go on forever but I'll end there. If you like abstract discussions about ontologies you might want to check out the Ontolog Forum: https://groups.google.com/forum/#!forum/ontolog-forum

Michael

On Fri, Aug 31, 2018 at 7:52 AM Darshi Shah <[hidden email]> wrote:
Hi Michael,

Thank you so much for such a detailed explanation. I really appreciate it. I am not at work right now, but will definitely try whatever you recommended when I get back.

I have 3 more questions for you:

1)  I am trying to use SPARQL, SWRL and SQWRL and aiming to compare the 3 of them and their querying efficiencies. However, I am having a lot of struggle in terms of the writing the syntax for querying and there are not a whole lot of resources online (at least I could not find) so is there a way you can provide some help with SPARQL, SWRL, SQWRL - a) when they are specifically used? b) syntax help, then that would be great! 

2) I merged Pizza and Wine ontologies that are available online and now I am trying to form relationships between Pizza Topping Spiciness Index and Wine recommendations based on that. Do you have any recommendations on how to do that specifically? So, each pizza or the pizza topping has a spiciness value assigned to it, which is either Hot, Medium or Mild so based on the spiciness value of the pizza or the pizza topping the customer picks, I want to have the ontology provide wine recommendations. I tried adding the types of wine as subclasses for Pizza and pizza toppings and also tried forming relationships between the individuals in the Pizza class and the Wine class, but they all resulted in inconsistent ontology. So, I really would like to know how to form this kind of specific relationship.

3) It seems like you have been working with Protege and ontologies I am assuming for quite a bit of time, so would you mind providing me where ontologies can really be useful, what the predicted future of them is and their relevance to the emerging technologies please? I am VERY new to this field and did not feel excited about working on the Ontology based project I was assigned, so just want to get some more information on that from someone who has in-depth knowledge and work experience with it.

Thank you so much again for all the help and support. I really appreciate it.


On Aug 31, 2018, at 8:10 PM, Michael DeBellis <[hidden email]> wrote:

Darshi, I think this is a simple fix, you need to put the package prefix before the datatype. In this case I think it's xsd:integer so the expression should be:

“hasCalorificContentValue some xsd:integer[>= 400]”  

If you look in the Entities tab there should be a subtab in there called datatypes (at least there is on mine, I've customized my UI so sometimes it's not the same as the default but I think that is part of the default UI not something I added) and that lists all the builtin datatypes and their prefixes. Besides xsd there are some with owl prefixes and rdf but the most common one people use are the xsd ones. Also, if you use the "Data Properties" tab to create a data property and then go to specify the Range of the property you will see a list of all the builtin datatypes with their appropriate prefixes. 

BTW, one thing that caused me some grief when I was first learning Protege is that when you go to specify the value of a datatype on an individual the default will be the datatype of whatever value you most recently added. I.e., if you go to assign the hasAge datatype of a Person and set that to 18 with datatype xsd:integer and then go to specify the hasName value of that Person to be the string "John Smith" the default will still be xsd:integer unless you explicitly change it to xsd:string or whatever datatype is appropriate for the value you are setting. 

Michael

On Fri, Aug 31, 2018 at 1:43 AM Darshi Shah <[hidden email]> wrote:
To Protégé User Support,

 

I keep encountering this error
Error: Encountered integer at line x column y. Expected one of: Datatype name not {

 

I am having trouble defining a numerical range (in integer) for one of the data properties, when I am trying to define the data property followed by the data value. For instance, while typing “hasCalorificContentValue some integer[>= 400]”, the border of the Class Expression Editor turns red and does not let me click ‘OK’ and proceed further.

 

The tutorial used was Edition 1.3 (A Practical Guide to Building OWL Ontologies Using Protégé 4 and CO-ODE Tools Edition 1.3; link: http://owl.cs.manchester.ac.uk/publications/talks-and-tutorials/protg-owl-tutorial/ ). Protégé version used is 5.2.0 on Windows 10 Enterprise (Version 1709).

 

Please refer to the screenshots.

 

I would really appreciate any kind of help from your end.


-- 
Regards,
Darshi Shah

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

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

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