One other piece of data, when I open File3 (see below) using TBE (localhost), the displayed counts in the "Select Class to Begin" widget (default app) are accurate - they match what you see from a SPARQL count query.
On Tue, Apr 10, 2012 at 8:27 AM, Tim Smith <[email protected]> wrote: > Thanks for the help! > > The source for this data is a collection of spreadsheets that have been > mapped to an existing ontology using a set of SPARQLMotion scripts. > > Here's what I have found after examining a subset of the data that > demonstrates the problem: > > There are no subclass relationships and no instances with multiple types. > > No inferencing has been performed. > > As an example, there are two files imported into a third "empty" file > (File3). There is a class "Schema". In the third file, class view shows > 30 instances of Schema. SPARQL shows 24. Looking at File1 and File2 > individually shows 6 and 24 instances, repectively, in the classes view AND > using SPARQL. This is what one would expect from the Class view for File3. > > However, the 6 instances in File1 are also in File2 (this happens when > importing spreadsheets that overlap) for a net of 24 distinct instances. > > I suspect, to be efficient, the Class view just adds them up across > imports and ignores duplicates. > > Also, thanks for pointing out the use of ?this within the workspace. > Seems like I knew that once but had forgotten - that is a very handy > feature! > > > > > On Mon, Apr 9, 2012 at 7:27 PM, Holger Knublauch > <[email protected]>wrote: > >> I believe if an instance has multiple types that are subclasses of each >> other, then it will be counted twice. The operation would be too expensive >> otherwise because we would need to remember duplicates etc. So if you have >> >> Person >> - MalePerson >> >> and >> >> Tim a Person >> Tim a MalePerson >> >> then it will show up as two instances of Person. But since having the >> first triple asserted is redundant, I believe it's easy to work around such >> cases by deleting the asserted extra triples. >> >> Holger >> >> >> >> On 4/10/2012 9:23, Scott Henninger wrote: >> >>> Hello, Tim; Yes, there are places where the count in the Classes View >>> does not always match the actual number of instances. We have >>> addressed some of those issues in the past, and can look into this if >>> you can let us know what action causes the count to not align. What >>> kind of a data source do you have? Is it before or after running >>> inferences? Also, is the behavior new to 3.6B or does it also occur in >>> 3.5.x? >>> >>> Doing the count for class instances can be an expensive operation, so >>> there may be other considerations. For example, in some cases >>> inferences are not added to the class instance count. But in general, >>> the count should be accurate, and I'm not aware of places where the >>> actual count is expected to be lower than that shown in the classes >>> view, so we would be interested in hearing more about what may cause >>> this to happen. >>> >>> You have already discovered the most accurate way to determine the >>> count - with a SPARQL query. One could generalize this a bit so you >>> can use it on any class: >>> >>> SELECT COUNT(?x) >>> WHERE >>> { ?x a ?this . >>> } >>> >>> Enter this into the SPARQL view and click on nodes in the Classes >>> view. The query will update to the count each time a class is chosen >>> and appears in the Form view. Works pretty nicely as a check to see >>> if the instance count is up-to-date. >>> >>> -- Scott >>> >>> On Apr 9, 2:17 pm, Tim Smith<[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I've noticed (in 3.6B) that the instance count in the classes view is a >>>> bit >>>> higher than the instance count found using a query like: >>>> >>>> SELECT COUNT (?x) >>>> WHERE { >>>> ?x a<Class Name> >>>> >>>> } >>>> >>>> I have intentionally selected the preference to show only direct >>>> instances >>>> and there are no subclasses anyway. >>>> >>>> Any reason they should be different? >>>> >>>> If I export all of the instances shown in the instance view, the number >>>> of >>>> instances in the exported file matches what the SPARQL query returns. >>>> >>>> This is very confusing when you are showing people data and the numbers >>>> don't match! >>>> >>>> Thanks for your input, >>>> >>>> Tim >>>> >>> >> -- >> 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 and SPIN. >> To post to this group, send email to >> topbraid-users@googlegroups.**com <[email protected]> >> To unsubscribe from this group, send email to >> topbraid-users+unsubscribe@**googlegroups.com<topbraid-users%[email protected]> >> For more options, visit this group at >> http://groups.google.com/**group/topbraid-users?hl=en<http://groups.google.com/group/topbraid-users?hl=en> >> > > -- 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 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
