Revision: 1551
http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1551&view=rev
Author: jenslehmann
Date: 2008-12-12 15:42:11 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
added transformation to negation normal form, such that inclusion axioms can be learned with FastInstanceChecker
Modified Paths:
--------------
trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java
Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java
===================================================================
--- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-12-12 13:09:10 UTC (rev 1550)
+++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-12-12 15:42:11 UTC (rev 1551)
@@ -29,8 +29,10 @@
import org.dllearner.core.owl.Description;
import org.dllearner.core.owl.Individual;
import org.dllearner.core.owl.Negation;
+import org.dllearner.reasoning.FastInstanceChecker;
import org.dllearner.utilities.Helper;
import org.dllearner.utilities.datastructures.SetManipulation;
+import org.dllearner.utilities.owl.ConceptTransformation;
/**
* The aim of this learning problem is to find an appropriate inclusion axiom
@@ -191,6 +193,11 @@
*/
@Override
public Score computeScore(Description concept) {
+ // FastInstanceChecker supports only negation normal form, so we have to make
+ // sure to convert the description before
+ if(reasoner instanceof FastInstanceChecker) {
+ return definitionLP.computeScore(ConceptTransformation.transformToNegationNormalForm(new Negation(concept)));
+ }
return definitionLP.computeScore(new Negation(concept));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|