Hi Joe,

there are two differences between running TopSPIN from TBC and by running it 
from SPARQLMotion using sml:ApplyTopSPIN that come to my mind:

1) The file in TBC may contain trivial inferences, i.e. additional 
rdfs:subClassOf triples that TBC adds to make sure that each named class has at 
least one named superclass. Your rules may have fewer matches as a result of 
that.

2) If the SPIN file declares local SPIN functions and magic properties, and the 
file is not a .spin. or .sms. file, then the locally defined functions will not 
be visible at script execution time.

Without knowing details, my guess is that 2) is the source of your problem (it 
can be reproduced by running TopSPIN on the KennedysSPIN demo - :age will not 
be inferred because it uses the helper function :getCurrentYear). The 
underlying issue is that the Jena SPARQL engine operates on a single global 
function registry. TBC has a trick to hook into that mechanism to make sure 
that - in addition to the functions defined in .spin.* and .sms. files, all 
functions from the currently open file will be visible. If SPARQL queries hit 
functions that are undefined, the FILTER and LET assignments may simply fail 
and you won't get results.

The work-around is to convert your file to .spin. files so that the system can 
add all locally defined SPIN functions to the global registry at start-up time. 
I will see if I can make sml:ApplyTopSPIN smarter so that it does that 
automatically, but I may run into multi-threading problems when run on TBL. 
Better don't plan on that feature :)

Thanks,
Holger



On Nov 19, 2009, at 9:46 AM, Joseph Shea wrote:

> Hello all. I am running into some strange results when I use the
> ApplyTopSpin module in TBC....mainly that it does not work. When I
> manually "Run Inference", I get the expected resulting triples.
> However, when I use "ApplyTopSpin" in a SparqlMotion script and write
> out the inferred triples to a TDB file, the resulting inferred triples
> are not there. This has been tested in both 3.1 and 3.2. Does the
> ApplyTopSpin module function differently from "Run Inferences" in TBC?
> 
> Joe Shea
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Composer Users" group.
> 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-composer-users?hl=.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
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-composer-users?hl=.


Reply via email to