From: <jen...@us...> - 2009-02-06 16:00:18
|
Revision: 1587 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1587&view=rev Author: jenslehmann Date: 2009-02-06 16:00:14 +0000 (Fri, 06 Feb 2009) Log Message: ----------- learning algorithm for ontology engineering started Modified Paths: -------------- trunk/lib/components.ini trunk/src/dl-learner/org/dllearner/core/Score.java trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java trunk/src/dl-learner/org/dllearner/scripts/evaluation/ELOperatorBenchmark.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java Modified: trunk/lib/components.ini =================================================================== --- trunk/lib/components.ini 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/lib/components.ini 2009-02-06 16:00:14 UTC (rev 1587) @@ -16,6 +16,7 @@ org.dllearner.learningproblems.PosNegInclusionLP org.dllearner.learningproblems.PosOnlyDefinitionLP org.dllearner.learningproblems.PosOnlyInclusionLP +org.dllearner.learningproblems.ClassLearningProblem # learning algorithms org.dllearner.algorithms.RandomGuesser org.dllearner.algorithms.BruteForceLearner @@ -24,4 +25,5 @@ org.dllearner.algorithms.gp.GP org.dllearner.algorithms.DBpediaNavigationSuggestor org.dllearner.algorithms.SimpleSuggestionLearningAlgorithm -org.dllearner.algorithms.el.ELLearningAlgorithm \ No newline at end of file +org.dllearner.algorithms.el.ELLearningAlgorithm +org.dllearner.algorithms.celoe.CELOE Added: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,107 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.algorithms.celoe; + +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.configurators.Configurator; +import org.dllearner.core.owl.Description; +import org.dllearner.learningproblems.ClassLearningProblem; + +/** + * The CELOE (Class Expression Learner for Ontology Engineering) algorithm. + * It adapts and extends the standard supervised learning algorithm for the + * ontology engineering use case. + * + * @author Jens Lehmann + * + */ +public class CELOE extends LearningAlgorithm { + + public CELOE(ClassLearningProblem problem, ReasonerComponent reasoner) { + super(problem, reasoner); + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#getCurrentlyBestDescription() + */ + @Override + public Description getCurrentlyBestDescription() { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#getCurrentlyBestEvaluatedDescription() + */ + @Override + public EvaluatedDescription getCurrentlyBestEvaluatedDescription() { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#isRunning() + */ + @Override + public boolean isRunning() { + // TODO Auto-generated method stub + return false; + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#start() + */ + @Override + public void start() { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.dllearner.core.LearningAlgorithm#stop() + */ + @Override + public void stop() { + // TODO Auto-generated method stub + + } + + /* (non-Javadoc) + * @see org.dllearner.core.Component#getConfigurator() + */ + @Override + public Configurator getConfigurator() { + // TODO Auto-generated method stub + return null; + } + + /* (non-Javadoc) + * @see org.dllearner.core.Component#init() + */ + @Override + public void init() throws ComponentInitException { + // TODO Auto-generated method stub + + } + +} Added: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,30 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.algorithms.celoe; + +/** + * A node in the search tree of the ontology engineering algorithm. + * + * @author Jens Lehmann + * + */ +public class OENode { + +} Modified: trunk/src/dl-learner/org/dllearner/core/Score.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/Score.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/core/Score.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -28,6 +28,10 @@ * The score class is used to store how well a class description did * on a learning problem. * + * TODO: If possible this class should be abstracted further. The current + * implementation requires positive and negative examples, i.e. does not + * allow arbitrary learning problems. + * * @author Jens Lehmann * */ Added: trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,69 @@ +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package org.dllearner.core.configurators; + +import org.dllearner.algorithms.celoe.CELOE; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasonerComponent; + +/** +* automatically generated, do not edit manually. +* run org.dllearner.scripts.ConfigJavaGenerator to update +**/ +public class CELOEConfigurator implements Configurator { + +private boolean reinitNecessary = false; +@SuppressWarnings("unused") + +private CELOE cELOE; + +/** +* @param cELOE see CELOE +**/ +public CELOEConfigurator(CELOE cELOE){ +this.cELOE = cELOE; +} + +/** +* @param reasoningService see reasoningService +* @param learningProblem see learningProblem +* @throws LearningProblemUnsupportedException see +* @return CELOE +**/ +public static CELOE getCELOE(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ +CELOE component = ComponentManager.getInstance().learningAlgorithm(CELOE.class, learningProblem, reasoningService); +return component; +} + + + +/** +* true, if this component needs reinitializsation. +* @return boolean +**/ +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,102 @@ +/** + * Copyright (C) 2007-2008, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package org.dllearner.core.configurators; + +import org.dllearner.core.ComponentManager; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.learningproblems.ClassLearningProblem; + +/** +* automatically generated, do not edit manually. +* run org.dllearner.scripts.ConfigJavaGenerator to update +**/ +public class ClassLearningProblemConfigurator implements Configurator { + +private boolean reinitNecessary = false; +@SuppressWarnings("unused") + +private ClassLearningProblem classLearningProblem; + +/** +* @param classLearningProblem see ClassLearningProblem +**/ +public ClassLearningProblemConfigurator(ClassLearningProblem classLearningProblem){ +this.classLearningProblem = classLearningProblem; +} + +/** +* @param reasoningService see reasoningService +* @param classToDescribe class of which a description should be learned +* @return ClassLearningProblem +**/ +public static ClassLearningProblem getClassLearningProblem(ReasonerComponent reasoningService, String classToDescribe) { +ClassLearningProblem component = ComponentManager.getInstance().learningProblem(ClassLearningProblem.class, reasoningService); +ComponentManager.getInstance().applyConfigEntry(component, "classToDescribe", classToDescribe); +return component; +} + +/** +* classToDescribe class of which a description should be learned. +* mandatory: true| reinit necessary: false +* default value: null +* @return String +**/ +public String getClassToDescribe() { +return (String) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "classToDescribe") ; +} +/** +* type Whether to learn an equivalence class or super class axiom.. +* mandatory: false| reinit necessary: true +* default value: equivalence +* @return String +**/ +public String getType() { +return (String) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "type") ; +} + +/** +* @param classToDescribe class of which a description should be learned. +* mandatory: true| reinit necessary: false +* default value: null +**/ +public void setClassToDescribe(String classToDescribe) { +ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "classToDescribe", classToDescribe); +} +/** +* @param type Whether to learn an equivalence class or super class axiom.. +* mandatory: false| reinit necessary: true +* default value: equivalence +**/ +public void setType(String type) { +ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "type", type); +reinitNecessary = true; +} + +/** +* true, if this component needs reinitializsation. +* @return boolean +**/ +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -26,6 +26,7 @@ import org.dllearner.algorithms.DBpediaNavigationSuggestor; import org.dllearner.algorithms.RandomGuesser; import org.dllearner.algorithms.SimpleSuggestionLearningAlgorithm; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.algorithms.el.ELLearningAlgorithm; import org.dllearner.algorithms.gp.GP; import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; @@ -38,6 +39,7 @@ import org.dllearner.kb.OWLAPIOntology; import org.dllearner.kb.OWLFile; import org.dllearner.kb.sparql.SparqlKnowledgeSource; +import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.PosNegDefinitionLP; import org.dllearner.learningproblems.PosNegDefinitionLPStrict; import org.dllearner.learningproblems.PosNegInclusionLP; @@ -120,6 +122,15 @@ } /** +* @param classToDescribe class of which a description should be learned +* @param reasoningService see ReasoningService +* @return a component ready for initialization ClassLearningProblem +**/ +public static ClassLearningProblem getClassLearningProblem(ReasonerComponent reasoningService, String classToDescribe) { +return ClassLearningProblemConfigurator.getClassLearningProblem(reasoningService, classToDescribe); +} + +/** * @param positiveExamples positive examples * @param negativeExamples negative examples * @param reasoningService see ReasoningService @@ -211,6 +222,16 @@ * @param learningProblem see LearningProblem * @param reasoningService see ReasoningService * @throws LearningProblemUnsupportedException see +* @return a component ready for initialization CELOE +**/ +public static CELOE getCELOE(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException { +return CELOEConfigurator.getCELOE(learningProblem, reasoningService); +} + +/** +* @param learningProblem see LearningProblem +* @param reasoningService see ReasoningService +* @throws LearningProblemUnsupportedException see * @return a component ready for initialization ELLearningAlgorithm **/ public static ELLearningAlgorithm getELLearningAlgorithm(LearningProblem learningProblem, ReasonerComponent reasoningService) throws LearningProblemUnsupportedException { Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -26,13 +26,13 @@ import org.dllearner.core.LearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; -import org.dllearner.utilities.Files; +import org.dllearner.core.configurators.RefinementOperatorConfigurator; /** * automatically generated, do not edit manually. * run org.dllearner.scripts.ConfigJavaGenerator to update **/ -public class ROLearnerConfigurator extends Files implements Configurator { +public class ROLearnerConfigurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; @SuppressWarnings("unused") Added: trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.core.configurators; + +/** + * Common options of refinement operators. + * + * @author Jens Lehmann + * + */ +public abstract class RefinementOperatorConfigurator { + + + +} Added: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,114 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.learningproblems; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.Set; + +import org.dllearner.core.LearningProblem; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.configurators.ClassLearningProblemConfigurator; +import org.dllearner.core.options.ConfigOption; +import org.dllearner.core.options.StringConfigOption; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; + +/** + * The problem of learning the description of an existing class + * in an OWL ontology. + * + * @author Jens Lehmann + * + */ +public class ClassLearningProblem extends LearningProblem { + + private NamedClass classToDescribe; + private Set<Individual> classInstances; + private boolean equivalence = true; + private ClassLearningProblemConfigurator configurator; + + @Override + public ClassLearningProblemConfigurator getConfigurator(){ + return configurator; + } + + public ClassLearningProblem(ReasonerComponent reasoner) { + super(reasoner); + } + + public static Collection<ConfigOption<?>> createConfigOptions() { + Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); + options.add(new StringConfigOption("classToDescribe", "class of which a description should be learned", null, true, false)); + StringConfigOption type = new StringConfigOption("type", "Whether to learn an equivalence class or super class axiom.","equivalence"); + type.setAllowedValues(new String[] {"equivalence", "superClass"}); + options.add(type); + return options; + } + + @Override + public void init() { + classToDescribe = new NamedClass(configurator.getClassToDescribe()); + classInstances = reasoner.getIndividuals(classToDescribe); + equivalence = (configurator.getType().equals("equivalence")); + } + + /** + * Computes the fraction of the instances of the class to learn, which + * is covered by the given description. + * @param description The description for which to compute coverage. + * @return The class coverage (between 0 and 1). + */ +// public double getCoverage(Description description) { +// int instancesCovered = 0; +// for(Individual instance : classInstances) { +// if(reasoner.hasType(description, instance)) { +// instancesCovered++; +// } +// } +// return instancesCovered/(double)classInstances.size(); +// } + + @Override + public ClassScore computeScore(Description description) { + Set<Individual> retrieval = reasoner.getIndividuals(description); + + int instancesCovered = 0; + int instancesProtused = 0; + + for(Individual ind : retrieval) { + if(classInstances.contains(ind)) { + instancesCovered++; + } else { + instancesProtused++; + } + } + + double coverage = instancesCovered/(double)classInstances.size(); + double protusion = instancesCovered/(double)(instancesCovered + instancesProtused); + + return new ClassScore(coverage, protusion); + } + + public boolean isEquivalenceProblem() { + return equivalence; + } +} Added: trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -0,0 +1,94 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.learningproblems; + +import java.util.Set; + +import org.dllearner.core.Score; +import org.dllearner.core.owl.Individual; + +/** + * The score of a class in ontology engineering. + * + * @author Jens Lehmann + * + */ +public class ClassScore extends Score { + + private double coverage; + private double protusion; + + public ClassScore(double coverage, double protusion) { + this.coverage = coverage; + this.protusion = protusion; + } + + /** + * @return the coverage + */ + public double getCoverage() { + return coverage; + } + + /** + * @return the protusion + */ + public double getProtusion() { + return protusion; + } + + // methods required by score class (not used in this context) + + @Override + public double getAccuracy() { + throw new UnsupportedOperationException(); + } + + @Override + public Set<Individual> getCoveredNegatives() { + throw new UnsupportedOperationException(); + } + + @Override + public Set<Individual> getCoveredPositives() { + throw new UnsupportedOperationException(); + } + + @Override + public Score getModifiedLengthScore(int newLength) { + throw new UnsupportedOperationException(); + } + + @Override + public Set<Individual> getNotCoveredNegatives() { + throw new UnsupportedOperationException(); + } + + @Override + public Set<Individual> getNotCoveredPositives() { + throw new UnsupportedOperationException(); + } + + @Override + public double getScore() { + throw new UnsupportedOperationException(); + } + +} Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -36,6 +36,7 @@ import org.apache.log4j.Logger; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.ExampleBasedROLComponentConfigurator; +import org.dllearner.core.configurators.RefinementOperatorConfigurator; import org.dllearner.core.options.CommonConfigOptions; import org.dllearner.core.owl.BooleanValueRestriction; import org.dllearner.core.owl.DataRange; @@ -186,6 +187,12 @@ this.rs = reasoningService; } + public RhoDRDown(ReasonerComponent reasoner, ClassHierarchy subHierarchy, RefinementOperatorConfigurator configurator) { + this.rs = reasoner; + this.subHierarchy = subHierarchy; + // TODO add more options from configurator object + } + // TODO constructor which takes a RhoDRDownConfigurator object; // this should be an interface implemented e.g. by ExampleBasedROLComponentConfigurator; // the goal is to use the configurator system while still being flexible enough to Modified: trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -31,6 +31,7 @@ import java.util.SortedSet; import java.util.TreeSet; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.core.Component; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; @@ -39,6 +40,7 @@ import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.ROLearnerConfigurator; +import org.dllearner.core.configurators.RefinementOperatorConfigurator; import org.dllearner.core.options.ConfigOption; import org.dllearner.utilities.Files; @@ -56,18 +58,18 @@ private static final SortedSet<String> DONOTDELETE = new TreeSet<String>(Arrays.asList(new String[]{ ".svn", - ".svn", + "RefinementOperatorConfigurator.java", })); // currently it targets the configurators for private static final SortedSet<String> EXTENDSREFINEMENTOPERATOR = new TreeSet<String>(Arrays.asList(new String[]{ ROLearnerConfigurator.class.getSimpleName(), - ROLearnerConfigurator.class.getSimpleName(), + CELOE.class.getSimpleName(), })); @SuppressWarnings("unchecked") - private static final Class EXTENDSREFINEMENTOPERATORCLASS = Files.class; + private static final Class EXTENDSREFINEMENTOPERATORCLASS = RefinementOperatorConfigurator.class; private static final boolean INCLUDE_UNUSED = false; Modified: trunk/src/dl-learner/org/dllearner/scripts/evaluation/ELOperatorBenchmark.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/evaluation/ELOperatorBenchmark.java 2009-02-06 10:21:58 UTC (rev 1586) +++ trunk/src/dl-learner/org/dllearner/scripts/evaluation/ELOperatorBenchmark.java 2009-02-06 16:00:14 UTC (rev 1587) @@ -80,6 +80,7 @@ // real world ontology tests // String base = "/home/jl/promotion/ontologien/el_benchmark/"; String[] onts = new String[] { + "go", // is ok at length 10 "galen2", // is ok at length 8 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |