Hi Irene,
OWL and SHACL are different languages with different semantics. You can use OWL and SHACL separately, but their terms don't mean anything to one another. If you want to use something similar to owl:allValuesFrom in SHACL, look at sh:datatype and sh:class.
Holger
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/89d3bec0-016d-4696-80a0-73fa467cdf98o%40googlegroups.com.
p3point_validation:Melanoma
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:subClassOf owl:Thing ;
sh:values [
sh:filterShape [
sh:property [
sh:path p3point_validation:point_dermfeatures ;
sh:in (
p3point_validation:Atypical
p3point_validation:Asymmetry
p3point_validation:Blue_white_structure
) ;
sh:maxCount 3 ;
sh:minCount 2 ;
] ;
] ;
sh:nodes [
sh:path p3point_validation:Patient ;
] ;
] ;
.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
Hi Emily,
the definition below doesn't look correct: you can only use
sh:values rules in a property shape, not in a class or node shape.
Also, any such rule would need to be attached to the class Patient
because you want to apply it to all instances of that class to
infer an additional triple. It may work better if you have
something like
:Patient
sh:rule [
a sh:TripleRule ;
sh:subject sh:this;
sh:predicate rdf:type ;
sh:object p3point_validation:Patient ;
sh:condition [
# your sh:filterShape, i.e. start with sh:property
sh:property
[
sh:path p3point_validation:point_dermfeatures ;
sh:in (
p3point_validation:Atypical
p3point_validation:Asymmetry
p3point_validation:Blue_white_structure
) ;
sh:maxCount
3 ; # Are those constraints really needed?
sh:minCount 2 ;
] ;
]
]
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/300044d2-bec1-49a5-85d2-c2de44bfd74fo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/300044d2-bec1-49a5-85d2-c2de44bfd74fo%40googlegroups.com.
Oh I guess I made a copy and paste mistake. Change the line to
sh:object p3point_validation:Melanoma because that's the rdf:type
you want to infer?
Holger
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d5d89d89-0fb2-4af6-883d-a453c5f6257do%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d5d89d89-0fb2-4af6-883d-a453c5f6257do%40googlegroups.com.
p3point_validation:Patient a owl:Class, sh:NodeShape
sh:rule [
a sh:TripleRule ;
sh:subject sh:this;
sh:predicate rdf:type ;
sh:objectp3point_validation:Melanoma;
sh:condition [
sh:property [
sh:path p3point_validation:point_dermfeatures ;
sh:in (
p3point_validation:Atypical
p3point_validation:Asymmetry
p3point_validation:Blue_white_structure
) ;
sh:minCount 2 ;
] ;
]
]
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/49c2c4eb-85dc-4009-b52d-a4c73a3e2e74o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/49c2c4eb-85dc-4009-b52d-a4c73a3e2e74o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/475dcb32-2794-4c11-8955-cbd64bb1a9c7o%40googlegroups.com.
p3point_validation:Patient
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:subClassOf rdfs:Resource ;
sh:rule [
rdf:type sh:TripleRule ;
sh:condition [
sh:property [
sh:path <http://example.org/3point_validation#Diagnosis:Melanoma> ;
sh:in (
p3point_validation:Atypical
p3point_validation:Asymmetry
p3point_validation:Blue_white_structure
) ;
sh:maxCount 3 ;
sh:minCount 2 ;
] ;
] ;
sh:object p3point_validation:Melanoma ;
sh:predicate rdf:type ;
sh:subject sh:this ;
] ;
.
Here is the SPARQL query:SELECT *
WHERE {
?Patient a schema: Patient .
(?Patient schema: Diagnosis) tosh:values ?Diagnosis .
}
Appreciate a lot!
Best,
Emily
在 2020年6月30日星期二 UTC-5下午5:34:47,Irene Polikoff写道:To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/475dcb32-2794-4c11-8955-cbd64bb1a9c7o%40googlegroups.com.
On Jul 8, 2020, at 12:04 AM, Emily Zhang <zxy10...@gmail.com> wrote:
Hi Irene,
Great suggestions on creating a property for "Diagnosis". I've done that but I am not exactly sure: 1) If I want to infer a patient has Melanoma, should Melanoma be an instance under the property "Diagnosis”?
2) You mentioned "I need to run it on a graph that has data and it must include your model and rules.", I am not really familiar with the concept "graph" in the Top Braid Composer.
3) For the inferred results, since you mentioned I don't have to use tosh:value for sparql in this case, I was expecting to "run inference" against the instance of "Patient" and got a returned label for " Melanoma"? But there was still nothing returned. The inference run successfully,
4) I even tried to add sparql query attached below, the "execute SPARQL" button was grey somehow.Here is the source code I used:p3point_validation:Patient
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:subClassOf rdfs:Resource ;
sh:rule [
rdf:type sh:TripleRule ;
sh:condition [
sh:property [
sh:path <http://example.org/3point_validation#Diagnosis:Melanoma> ;
sh:in (
p3point_validation:Atypical
p3point_validation:Asymmetry
p3point_validation:Blue_white_structure
) ;
sh:maxCount 3 ;
sh:minCount 2 ;
] ;
] ;
sh:object p3point_validation:Melanoma ;
sh:predicate rdf:type ;
sh:subject sh:this ;
] ;
.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/74a5ec44-6f12-4c0d-a591-2d2d0c343e44o%40googlegroups.com.
Hi Irene,

To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/74a5ec44-6f12-4c0d-a591-2d2d0c343e44o%40googlegroups.com.
On Jul 9, 2020, at 12:55 AM, Emily Zhang <zxy10...@gmail.com> wrote:
Hi Irene,Thanks for the reply! The documents were really helpful! I think I understand the concept "graph" now. I've attached my answers to some of your questions below.
1. What do you mean by “under”. How can an instance be under a property?
So clearly, property shouldn't have instance. I wasn't sure what is the relationship between "diagnosis" and "melanoma" when you give this comment: "create a new property e.g., :diagnosis and infer :diagnosis :Melanoma". Is "melanoma" a label of the property "diagnosis"?2. How do your data triples look like?Is your data graph separate from the graph containing your model and the rule or are they together? If they are separate, does your data graph owl:imports your shapes graph?By "data triples", my understanding is the classes, properties I defined in a graph, which in my case in "shacl.ttl". I've attached a screenshot of all the classes, properties I've created so far.And they are all in the same graph. My rule was defined in the "source code" of "patient" class.
<Screenshot 2020-07-08 23.47.20.png>
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/78ca7f0c-baeb-4391-b7af-dc529fde5c72o%40googlegroups.com.
<Screenshot 2020-07-08 23.47.20.png>
Irene
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/78ca7f0c-baeb-4391-b7af-dc529fde5c72o%40googlegroups.com.
<Screenshot 2020-07-08 23.47.20.png>
On Jul 12, 2020, at 10:42 PM, Emily Zhang <zxy10...@gmail.com> wrote:
Hi Irene,
I was trying to learn the key concepts while managing to finish this task. I've read all the tutorials I could find before I start posting on this forum. I wish there are documents that explain how TopBraid Composer works in a more general way. For example, you said "I should never modify shacl.ttl", I guess I won't learn that from any tutorials or classes. Even if I am familiar with all the RDF concepts, I still wouldn't know that.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/64aeb414-0b53-40af-9528-1fba08d35ad0o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/64aeb414-0b53-40af-9528-1fba08d35ad0o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d3ebf7e8-8e53-4bb3-9274-0fecf08c205bo%40googlegroups.com.
Emily,
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d3ebf7e8-8e53-4bb3-9274-0fecf08c205bo%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/d4f13872-c673-42c2-b8d5-9783651dcf35o%40googlegroups.com.