Difference between revisions of "NSByGrounding"

From Knoesis wiki
Jump to: navigation, search
(Ontologies)
(Ontologies)
Line 101: Line 101:
 
   <td><font size="4" face="Times New Roman">No mod</font></td></td></tr>
 
   <td><font size="4" face="Times New Roman">No mod</font></td></td></tr>
  
<tr valign="top">
 
  <td><font size="4" face="Times New Roman">Eco</font></td>
 
  <td><font size="4" face="Times New Roman">339</font></td>
 
  <td><font size="4" face="Times New Roman">2</font></td>
 
  <td><font size="4" face="Times New Roman">8</font></td>
 
  <td><font size="4" face="Times New Roman">45</font></td>
 
  <td><font size="4" face="Times New Roman">482</font>
 
</td>  <td><font isze="4" face="Times New Roman">[http://reliant.teknowledge.com/DAML/Economy.owl]</font></td>
 
  <td><font size="4" face="Times New Roman">No mod</font></td></tr>
 
  
  

Revision as of 22:22, 14 June 2011

Nominal Schema Reasoning by Grounding

This page contains the implementations of nominal schema reasoning using naive and smart grounding.

Introduction

In this page we include the empirical evaluation of several ontologies selected from the TONES repository (reference?). For each experiment one or more axioms containing nominal schemas were added to each ontology. Occurences of nominal schemas are grounded with all possible combinations of individuals contained in the knowledge bases. After the grounding reasoning times (using Pellet after grounding) are averaged over 100 runs, and load time is reported separately. We are particularly interested in finding what are the limits of lhis implementation varying both the number of different nominal schemas and their number of occurrences per axiom.

Testing was performed using a 64-bit Windows 7 computer with an Intel(R) Core(TM) i5 CPU processor. A java JDK 1.5 version, allocating 3GB as the minimun for the java heap and 3.5GB as the maximun, was used for each experiment.

Naive Implementation

Although not very time-efficient this implementation will serve as a baseline for development and testing of more optimised algorithms, and also shows that even the grounding approach can be used for small use cases or for initial testing.

The section includes testing data obtained from different experimets showing the feasibility of this implementation when the number of different nominal schemas per axiom is low.

Java code to ground axioms containing nominal schemas to a given ontology is also included. After the grounding reasoning tasks can be performed with the ontology using any reasoner available just as usual(the java program was built for testing purposes only and therefore it is not an optimised generic algorithm).

Ontologies

We present in this section the metrics of the ontologies used for the Naive implementation

</td>


</table>

Testing results

This section contains two tables showing the reasoning time results for the ontologies when axioms with different combinations of nominal schemas are added.

Adding one axiom to each Ontology

For every experiment only one axiom was added to each ontology varying the number of different nominal schemas and their number of appearances.

Ontology Classes Annotation P. Data P. Object P. Individuals URI Modifications
Fam 4 0 1 11 5 [1] No mod
Swe 189 1 6 25 22 [2] 20 individuals added
Bui 686 15 0 24 42 [3] 40 individuals added
Wor 1842 6 0 31 80 [4] 80 individuals added
Tra 445 2 4 89 183 [5] No mod
FTr 22 2 6 52 368 [6] No mod
Ontology Plain 1 different ns 2 different ns 3 different ns
Name Ontology 2 app 8 app 2 app 4 app 2 app
Fam (5) 0.01 0.00 0.01 0.00 0.01 0.01 0.01 0.00 0.01 0.00 0.04 0.02
Swe (22) 3.58 0.08 3.73 0.07 3.73 0.11 3.85 0.10 3.88 0.11 10.86 1.11
Bui (42) 2.7 0.16 2.5 0.15 2.47 0.15 2.75 0.26 3.05 0.36 1'14 6.68
Wor (82) 0.11 0.04 0.12 0.05 1.48 0.87 1.1 0.55 1.88 1.03 197'12 5'15
Tra (183) 0.05 0.03 0.05 0.02 0.05 0.02 5.76 1.76 9.9 3.73 OOM OOM
FTr (368) 0.03 4.28 0.05 5.32 0.09 5.51 35.53 42.73 1'18 9'30 OOM OOM
Eco (368) 0.04 0.24 0.07 0.02 0.10 0.04 56.59 13.67 53.32 35.35 OOM OOM

Adding several axioms to each Ontology

For every experiment several axioms was added to each ontology including 1 or 2 different nominal schemas each.

</td>

<tr valign="top">

 <td>Eco</td>
 <td>339</td>
 <td>2</td>
 <td>8</td>
 <td>45</td>
 <td>482

</td> <td>[8]</td>

 <td>No mod</td></tr>


</table>

Testing results

This section contains two tables showing the reasoning time results for the ontologies when axioms with different combinations of nominal schemas are added.

Adding one axiom to each Ontology

For every experiment only one axiom was added to each ontology varying the number of different nominal schemas and their number of appearances.

Name No axioms added 20 axioms, 1 ns 10 axioms, 2 ns
Fam (5) 0.01 0.00 0.01 0.00 0.02 0.01
Swe (22) 3.58 0.08 3.42 0.08 3.73 0.28
Bui (42) 2.7 0.16 2.69 0.25 5.7 3.21
Wor (80) 0.11 0.04 0.23 0.28 12.42 6.88
Tra (183) 0.05 0.03 0.32 0.15 1' 43.54' 43.63
FTr (368) 0.03 4.28 0.52 11.33 OOM OOM
FTr (368) 0.04 0.24 0.65 0.3 OOM OOM
FTr 22 2 6 52 368 [7] No mod
Ontology Plain 1 different ns 2 different ns 3 different ns URI
Name Ontology 2 app 8 app 2 app 4 app 2 app URI
Fam (5) 0.01 0.00 0.01 0.00 0.01 0.01 0.01 0.00 0.01 0.00 0.04 0.02 [9]
Swe (22) 3.58 0.08 3.73 0.07 3.73 0.11 3.85 0.10 3.88 0.11 10.86 1.11 [10]
Bui (42) 2.7 0.16 2.5 0.15 2.47 0.15 2.75 0.26 3.05 0.36 1'14 6.68 [11]
Wor (82) 0.11 0.04 0.12 0.05 1.48 0.87 1.1 0.55 1.88 1.03 197'12 5'15 phenotype xp/worm phenotype xp.obo
Tra (183) 0.05 0.03 0.05 0.02 0.05 0.02 5.76 1.76 9.9 3.73 OOM OOM [12]
FTr (368) 0.03 4.28 0.05 5.32 0.09 5.51 35.53 42.73 1'18 9'30 OOM OOM [13]
Eco (368) 0.04 0.24 0.07 0.02 0.10 0.04 56.59 13.67 53.32 35.35 OOM OOM [14]

Code and Tutorial

This section presents java code to ground axioms with nominal schema for a given ontology. OWL API library needs to be added to the classpath for this task.

Create the frame

First the user needs to write down the frame containing the axiom we want to ground to the knowledge base and store in a .owl file. It can be created with any text editor and then modifying the text extension from ".txt" to ".owl". This file should be placed in the same folder as our ontology.

Example of frame containing one axiom with one nominal schema and two appearances:

[

rdf:type owl:Class;
rdfs:subClassOf :frameClass1;
owl:intersectionOf(
[ rdf:type owl:Restriction;
owl:onProperty :property1;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v1” ]
]
[ rdf:type owl:Restriction;
owl:onProperty :property2;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v1” ]
]
)

].

The blank node [ rdf:type owl:ObjectVariable; owl:variableId "v1"] represents the nominal schema that will be grounded with all individuals in the ontology.

Example of frame containing one axiom with two nominal schemas and two appearances each:

[

rdf:type owl:Class;
rdfs:subClassOf :frameClass1;
owl:intersectionOf(
[ rdf:type owl:Restriction;
owl:onProperty :property1;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v1” ]
]
[ rdf:type owl:Restriction;
owl:onProperty :property2;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v1” ]
]
[ rdf:type owl:Restriction;
owl:onProperty :property3;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v2” ]
]
[ rdf:type owl:Restriction;
owl:onProperty :property4;
owl:someValuesFrom [ rdf:type owl:ObjectVariable; owl:variableId ”v2” ]
)

].

For this second example the program will ground all possible pair combinations for the nominal schemas "v1" and "v2". The number of groundings is equal to the number of individuals raised to the second power (two different nominal schemas!).

Remark: all classes, properties, and namespaces in the frame need to be defined in the ontology for a correct performance of the reasoner after the grounding.

Grounding the axioms

The program will start and prompt the user for the folder's path where we have stored the frame and the ontology and then for the names of these. After execution a new file with appear with the same name as the ontology followed with the word "Grounded.owl". The new file contains all axioms in the previous ontology with all possible grounded combinations of individuals for the defined frame. To ground several nominal schemas to the ontology we just have to run the program several times with the desired frames.

The program is only available for Turtle Syntax. A converter of OWL syntax is available in: [15]