Scott, thanks for the reply however I still cannot seem to get the results 
I expect, so maybe I can explain a little better this time

This following  is a sml:constructQuery which is part of a very simple 
sparql motion script which is called by a web client in order to retrieve a 
list of books. All SMotion scripts are held in a file scripts.sms.n3  and 
this model imports publishedBooks.rdf, along with many others, This script 
contains 3 modules.... importRdfFromWorkspace,ApplyConsrtuct and ReturnRdf 
, the sml:sourceFilePath is /Library/publishedBooks.rdf 

CONSTRUCT {
    ?book ?p ?o .
}
WHERE {
    ?book a publishedBooks:Book .
    ?book ?p ?o .
}
The script worked fine, but since adding the subClass and moving the two 
instances the SM Script now does not  return any results, If I change the 
above to

CONSTRUCT {
    ?book ?p ?o .
}
WHERE {
    ?book a publishedBooks:Electrical .
    ?book ?p ?o .
} 

then all is well again.

Hopefully you can see what I mean now. I have changed the inferecing setup 
to what you suggested, under the profile tab and under configureInferencing 
, but no joy in getting the correct entailment coming out the other end.

ie if instance a is of type b and b is a subclass of  c then a is entailed 
as being of type c

Thanks again for you continued and patient help

regards

John


On Thursday, 20 September 2012 23:51:00 UTC+1, Scott Henninger wrote:John; 
The need to set "Complete Mode" is an artifact of one of the few 
places where Composer's UI automatically does entailments.  Since the 
UI will recognizes that members-of-a-subclass-are-
>
> members-of-the- 
> class, then there isn't a reason to materialize the inferences in the 
> Inferences tab (I assume that is what you mean here).  If you were to 
> run this via a service - a SPARQLMotion script for example - you will 
> get all of the entailments by default. 
>
> I find the example a bit confusing. I take it you mean a SPIN rule. 
> Any SPIN rule that doesn't use ?this is suspect, and that is the case 
> here.  The way SPIN works is that it executes the rule against all 
> members of a class (and its subclasses) by binding ?this to the rule 
> and executing the query.  This localizes the query so it is only 
> executed against the instance. 
>
> Given that you place the query in the spin:rules property of 
> publishedBooks:Book.  You can remove the triple pattern {?book a 
> publishedBooks:Book}, which is superfluous because the rule will 
> automatically only apply to members of publishedBooks:Book. 
>
> But this is where I get confused with your example, because it seems 
> to just copy triples to itself - a null op, basically.  So let me try 
> a different example, if just to show how ?this works.  Assume that you 
> have members of foaf:Person.  The following rule would infer that all 
> book authors are members of the Author class: 
>
> CONSTRUCT 
> {  ?author a publishedBooks:Author 
> } 
> WHERE 
> {  ?this dc:creator ?author . 
> } 
>
> So I take it you have configured inferencing to run both OWLIM and 
> TopSPIN?  You can avoid that and run just one reasoner by selecting 
> the OWL 2 RL profile in Composer.  Go tot he Ontology home and select 
> the Profile sub-tab (see Help > User Interface Overview > Resource 
> Editor > Ontology Profile) and choose OWL 2 RL from the library.  This 
> will run OWL inferences and you can configure inferences to just run 
> TopSPIN and it will take care of both your customized rules and OWL 
> entailments. 
>
> -- Scott 
>
> On Sep 20, 4:02 pm, John Perdoni <[email protected]> wrote: 
> > Hi again, 
> > 
> > I thought I had a reasonable grasp on inferencing, but back to newbie 
> > status lol. 
> > 
> > I had a classhttp://example.com/library/publishedBooks#Bookwith 2 
> > instances which i ran the following script on 
> > 
> > CONSTRUCT { 
> >     ?book a publishedBooks:Book . 
> >     ?book ?p ?o .} 
> > 
> > WHERE { 
> >     ?book a publishedBooks:Book . 
> >     ?book ?p ?o . 
> > 
> > } 
> > 
> > All good up until now 
> > 
> > Thinking about the future I decided to add a subclass/es to try and 
> > classify the type of book  iehttp://
> example.com/library/publishedBooks#Electrical which is a 
> > rdfs:subClassOf example.com:Book and moved the instances to this 
> subClass 
> > 
> > This is where my so called knowledge (or lack of it) gets blown out of 
> the 
> > window as running the same rule now provides no results. 
> > 
> > I was under the impression that when running owl-max inferencing with 
> > TopSpin(Sparql rules) on the above two instances would infer the 
> following 
> > 
> > ie CONSTRUCT {?instance rdf:type ?book} 
> >    WHERE{?sub rdfs:subclassOf ?book. 
> >    ?instance rdf:type ?sub} 
> > 
> > and would result in 
> > 
> > ?instance a ?Book 
> > 
> > I can only achieve this result if I i tick the compleMode check box 
> under 
> > inferencing configuration, but this is not something I thought I should 
> do. 
> > 
> > Stangely this has never been an issue in the past and is not an issue if 
> i 
> > run owl-max inferencing with the same data on a Sesame repository 
> > 
> > Sorry if this yet again is lack of knowledge 
> > 
> > John 



On Thursday, 20 September 2012 23:51:00 UTC+1, Scott Henninger wrote:
>
> John; The need to set "Complete Mode" is an artifact of one of the few 
> places where Composer's UI automatically does entailments.  Since the 
> UI will recognizes that members-of-a-subclass-are-members-of-the- 
> class, then there isn't a reason to materialize the inferences in the 
> Inferences tab (I assume that is what you mean here).  If you were to 
> run this via a service - a SPARQLMotion script for example - you will 
> get all of the entailments by default. 
>
> I find the example a bit confusing. I take it you mean a SPIN rule. 
> Any SPIN rule that doesn't use ?this is suspect, and that is the case 
> here.  The way SPIN works is that it executes the rule against all 
> members of a class (and its subclasses) by binding ?this to the rule 
> and executing the query.  This localizes the query so it is only 
> executed against the instance. 
>
> Given that you place the query in the spin:rules property of 
> publishedBooks:Book.  You can remove the triple pattern {?book a 
> publishedBooks:Book}, which is superfluous because the rule will 
> automatically only apply to members of publishedBooks:Book. 
>
> But this is where I get confused with your example, because it seems 
> to just copy triples to itself - a null op, basically.  So let me try 
> a different example, if just to show how ?this works.  Assume that you 
> have members of foaf:Person.  The following rule would infer that all 
> book authors are members of the Author class: 
>
> CONSTRUCT 
> {  ?author a publishedBooks:Author 
> } 
> WHERE 
> {  ?this dc:creator ?author . 
> } 
>
> So I take it you have configured inferencing to run both OWLIM and 
> TopSPIN?  You can avoid that and run just one reasoner by selecting 
> the OWL 2 RL profile in Composer.  Go tot he Ontology home and select 
> the Profile sub-tab (see Help > User Interface Overview > Resource 
> Editor > Ontology Profile) and choose OWL 2 RL from the library.  This 
> will run OWL inferences and you can configure inferences to just run 
> TopSPIN and it will take care of both your customized rules and OWL 
> entailments. 
>
> -- Scott 
>
> On Sep 20, 4:02 pm, John Perdoni <[email protected]> wrote: 
> > Hi again, 
> > 
> > I thought I had a reasonable grasp on inferencing, but back to newbie 
> > status lol. 
> > 
> > I had a classhttp://example.com/library/publishedBooks#Bookwith 2 
> > instances which i ran the following script on 
> > 
> > CONSTRUCT { 
> >     ?book a publishedBooks:Book . 
> >     ?book ?p ?o .} 
> > 
> > WHERE { 
> >     ?book a publishedBooks:Book . 
> >     ?book ?p ?o . 
> > 
> > } 
> > 
> > All good up until now 
> > 
> > Thinking about the future I decided to add a subclass/es to try and 
> > classify the type of book  iehttp://
> example.com/library/publishedBooks#Electrical which is a 
> > rdfs:subClassOf example.com:Book and moved the instances to this 
> subClass 
> > 
> > This is where my so called knowledge (or lack of it) gets blown out of 
> the 
> > window as running the same rule now provides no results. 
> > 
> > I was under the impression that when running owl-max inferencing with 
> > TopSpin(Sparql rules) on the above two instances would infer the 
> following 
> > 
> > ie CONSTRUCT {?instance rdf:type ?book} 
> >    WHERE{?sub rdfs:subclassOf ?book. 
> >    ?instance rdf:type ?sub} 
> > 
> > and would result in 
> > 
> > ?instance a ?Book 
> > 
> > I can only achieve this result if I i tick the compleMode check box 
> under 
> > inferencing configuration, but this is not something I thought I should 
> do. 
> > 
> > Stangely this has never been an issue in the past and is not an issue if 
> i 
> > run owl-max inferencing with the same data on a Sesame repository 
> > 
> > Sorry if this yet again is lack of knowledge 
> > 
> > John 
>

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en


Reply via email to