From: <jen...@us...> - 2011-12-01 14:21:58
|
Revision: 3461 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3461&view=rev Author: jenslehmann Date: 2011-12-01 14:21:48 +0000 (Thu, 01 Dec 2011) Log Message: ----------- fixed bug in CELOE Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java trunk/examples/nlp2rdf/sample/sample2.conf Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-12-01 13:21:18 UTC (rev 3460) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/celoe/CELOE.java 2011-12-01 14:21:48 UTC (rev 3461) @@ -244,7 +244,7 @@ } // singleSuggestionMode = configurator.getSingleSuggestionMode(); - + /* // create refinement operator if(operator == null) { operator = new RhoDRDown(); @@ -255,6 +255,22 @@ ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); ((RhoDRDown)operator).init(); + */ + // create a refinement operator and pass all configuration + // variables to it + if(operator == null) { + // we use a default operator and inject the class hierarchy for now + operator = new RhoDRDown(); + ((RhoDRDown)operator).setStartClass(startClass); + ((RhoDRDown)operator).setReasoner(reasoner); + ((RhoDRDown)operator).init(); + } + // TODO: find a better solution as this is quite difficult to debug + ((RhoDRDown)operator).setSubHierarchy(classHierarchy); + ((RhoDRDown)operator).setObjectPropertyHierarchy(reasoner.getObjectPropertyHierarchy()); + ((RhoDRDown)operator).setDataPropertyHierarchy(reasoner.getDatatypePropertyHierarchy()); + + // operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); baseURI = reasoner.getBaseURI(); prefixes = reasoner.getPrefixes(); Modified: trunk/examples/nlp2rdf/sample/sample2.conf =================================================================== --- trunk/examples/nlp2rdf/sample/sample2.conf 2011-12-01 13:21:18 UTC (rev 3460) +++ trunk/examples/nlp2rdf/sample/sample2.conf 2011-12-01 14:21:48 UTC (rev 3461) @@ -30,6 +30,7 @@ lp.negativeExamples = {"nif:offset_81_107_The+eaten+apple+was+", "nif:offset_108_132_The+apple+ate+the+ap", "nif:offset_133_160_The+boy+will+eat+the"} // create a refinement operator and configure it + op.type = "rho" op.useNegation = false op.useAllConstructor = false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |