user3431350
user3431350

Reputation: 21

LUBM benchmark classes

I have used Lehigh University Benchmark (LUBM) to test my application.
What I know about LUBM is that its ontology contains 43 classes.
But when I query over the classes I got 14 classes!
Also, when I used Sesame workbench and check the "Types in Repository " section I got 14th classes which are:

AssistantProfessor 
AssociateProfessor 
Course 
Department 
Fullprofessor 
GraduateCourse 
GraduateStudent 
Lecturer 
Publication 
ResearchAssistant
ResearchGroup 
TeachingAssistant 
UndergraduateStudent 
University 

Could any one explain to me the differences between them?

Edit: Problem partially solved but now How can I retrieve RDF instances from the upper level of Ontology (e.g. Employee, book, Article, Chair, college, Director, PostDoc, JournalArticle ..etc) or let's say all 43 classes because I can just retrieve instances for the lower classes (14th classes) and the following picture for retrieving the instances from ub:Department

enter image description here

Upvotes: 2

Views: 1502

Answers (2)

Mark Wallace
Mark Wallace

Reputation: 21

If you use UBA (the LUBM data generator), you get instance data, where instances are declared to be of certain types. E.g.

<http://www.Department0.University31.edu/FullProfessor4>
   rdf:type
      ub:FullProfessor

It turns out, when you run UBA, it only asserts instances into the 14 classes you mention.

The LUBM ontology actually defines 43 classes. These are classes that are available to be used in instance data sets.

In OpenRDF Sesame, when it lists "Types in Repository", it is apparently just showing those types which are actually "used" in the data. (I.e., there is at least 1 instance asserted to be of that type/class in the data.)

That is the difference between your two lists. When you look at the ontology, there are 43 classes defined (available for use), but when you look at actual instance data generated by LUBM UBA, only those 14 classes are directly used.

(NOTE: If you had a triple store with OWL reasoning turned on, the reasoner would assert the instances into more of the classes defined in the ontology.)

Upvotes: 2

Joshua Taylor
Joshua Taylor

Reputation: 85883

You didn't mention what data you're using, so we can't be sure that you're actually using the correct data, or even know what version of it you're using. The OWL ontology can be downloaded from the Lehigh University Benchmark (LUBM), where the OWL version of the ontology is univ-bench.owl.

Based on that data, you can use a query like this to find out how many OWL classes there are::

prefix owl: <http://www.w3.org/2002/07/owl#>
select (count(?class) as ?numClasses) where { ?class a owl:Class }
--------------
| numClasses |
==============
| 43         |
--------------

I'm not familiar with the Sesame workbench, so I'm not sure how it's counting types, but it's easy to see that different ways of counting types can lead to different results. For instance, if we only count the types of which there are instances, we only get six classes (and they're the OWL meta-classes, so this isn't particularly useful):

select distinct ?class where { ?x a ?class }
--------------------------
| class                  |
==========================
| owl:Class              |
| owl:TransitiveProperty |
| owl:ObjectProperty     |
| owl:Ontology           |
| owl:DatatypeProperty   |
| owl:Restriction        |
--------------------------

Now, that's what happens if you're just querying on the ontology itself. The ontology only provides the definitions of the vocabulary that you might use to describe some actual situation. But where can you get descriptions of actual (or fictitious) situations? Note that at SWAT Projects - the Lehigh University Benchmark (LUBM) there's a link below the Ontology download:

Data Generator(UBA):

This tool generates syntetic OWL or DAML+OIL data over the Univ-Bench ontology in the unit of a university. These data are repeatable and customizable, by allowing user to specify seed for random number generation, the number of universities, and the starting index of the universities. * What do the data look like?

If you follow the "what do the data look like" link, you'll get another link to an actual sample file,

That actually has some data in it. You can run a query like the following at sparql.org's query processor and get some useful results:

select ?individual ?class 
from <http://swat.cse.lehigh.edu/projects/lubm/University0_0.owl>
where {
  ?individual a ?class 
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------
| individual                                                                  | class                                                                       |
=============================================================================================================================================================
| <http://www.Department0.University0.edu/AssociateProfessor9>                | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#AssociateProfessor>   |
| <http://www.Department0.University0.edu/GraduateStudent127>                 | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateStudent>      |
| <http://www.Department0.University0.edu/UndergraduateStudent98>             | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
| <http://www.Department0.University0.edu/UndergraduateStudent182>            | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
| <http://www.Department0.University0.edu/GraduateStudent1>                   | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#TeachingAssistant>    |
| <http://www.Department0.University0.edu/AssistantProfessor4/Publication4>   | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#Publication>          |
| <http://www.Department0.University0.edu/UndergraduateStudent271>            | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
| <http://www.Department0.University0.edu/UndergraduateStudent499>            | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
| <http://www.Department0.University0.edu/UndergraduateStudent502>            | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
| <http://www.Department0.University0.edu/GraduateCourse61>                   | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#GraduateCourse>       |
| <http://www.Department0.University0.edu/AssociateProfessor10>               | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#AssociateProfessor>   |
| <http://www.Department0.University0.edu/UndergraduateStudent404>            | <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#UndergraduateStudent> |
…

I think that to get the kind of results you're looking for, you need to download this data, or download a version of the UBA test data generators and generate some of your own data.

Upvotes: 2

Related Questions