From: <jen...@us...> - 2011-08-31 18:05:20
|
Revision: 3199 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3199&view=rev Author: jenslehmann Date: 2011-08-31 18:05:10 +0000 (Wed, 31 Aug 2011) Log Message: ----------- finally converted all configurators in DL-Learner Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyOEHeuristicRuntime.java trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java trunk/components-core/src/main/java/org/dllearner/core/AbstractAxiomLearningAlgorithm.java trunk/components-core/src/main/java/org/dllearner/core/AbstractComponent.java trunk/components-core/src/main/java/org/dllearner/kb/OWLAPIOntology.java trunk/components-core/src/main/java/org/dllearner/kb/OWLFile.java trunk/components-core/src/main/java/org/dllearner/kb/sparql/SparqlKnowledgeSource.java trunk/components-core/src/main/java/org/dllearner/learningproblems/ClassLearningProblem.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosNegLPStrict.java trunk/components-core/src/main/java/org/dllearner/learningproblems/PosOnlyLP.java trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLP.java trunk/components-core/src/main/java/org/dllearner/learningproblems/fuzzydll/FuzzyPosNegLPStandard.java trunk/components-core/src/main/java/org/dllearner/reasoning/DIGReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/FastRetrievalReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/PelletReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/ProtegeReasoner.java trunk/components-core/src/main/java/org/dllearner/reasoning/fuzzydll/FuzzyOWLAPIReasoner.java trunk/components-core/src/main/java/org/dllearner/refinementoperators/RhoDRDown.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains.java trunk/components-core/src/test/java/org/dllearner/test/FuzzyDLLTest_Trains_noFuzzyIndividuals.java trunk/components-ext/src/main/java/org/dllearner/algorithm/qtl/QTL.java trunk/scripts/src/main/java/org/dllearner/scripts/OWLAPIReasonerIncremental.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/GeneralMatcher.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/LearnOSMClasses.java trunk/scripts/src/main/java/org/dllearner/scripts/matching/Stanley.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/Configurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmDisjunctiveConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyOWLAPIReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyPosNegLPStandardConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/GPConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ISLEConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/KBFileConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/OWLFileConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PelletReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosNegLPStandardConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/PosOnlyLPConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ProtegeReasonerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/RandomGuesserConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/RefinementOperatorConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlEndpointKSConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java trunk/components-core/src/main/java/org/dllearner/core/configurators/package.html Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/el/ELLearningAlgorithmDisjunctive.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -19,22 +19,25 @@ package org.dllearner.algorithms.el; -import java.util.*; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TreeSet; import org.apache.log4j.Logger; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.Configurator; -import org.dllearner.core.configurators.ELLearningAlgorithmDisjunctiveConfigurator; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.options.CommonConfigOptions; 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; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; import org.dllearner.learningproblems.PosNegLP; @@ -80,7 +83,6 @@ public class ELLearningAlgorithmDisjunctive extends AbstractCELA { private static Logger logger = Logger.getLogger(ELLearningAlgorithmDisjunctive.class); - private ELLearningAlgorithmDisjunctiveConfigurator configurator; String baseURI; Map<String,String> prefixes; @@ -113,11 +115,12 @@ private double bestCurrentScore = 0; private long treeStartTime; // minimum score a tree must have to be part of the solution - private double minimumTreeScore = -1; + private double minimumTreeScore = -1; + + private boolean instanceBasedDisjoints; public ELLearningAlgorithmDisjunctive(PosNegLP problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); - configurator = new ELLearningAlgorithmDisjunctiveConfigurator(this); } public static String getName() { @@ -137,24 +140,18 @@ options.add(new StringConfigOption("startClass", "the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class)")); options.add(CommonConfigOptions.getInstanceBasedDisjoints()); return options; - } + } - public Configurator getConfigurator() { - return configurator; - } - @Override public void init() throws ComponentInitException { heuristic = new DisjunctiveHeuristic(); candidates = new TreeSet<SearchTreeNode>(heuristic); trees = new TreeSet<ELDescriptionTree>(new ELDescriptionTreeComparator()); - if(configurator.getStartClass() != null) { - startClass = new NamedClass(configurator.getStartClass()); - } else { + if(startClass == null) { startClass = Thing.instance; } - operator = new ELDown2(reasoner, configurator.getInstanceBasedDisjoints()); + operator = new ELDown2(reasoner, instanceBasedDisjoints); // noise = configurator.getNoisePercentage()/(double)100; @@ -425,6 +422,22 @@ */ public SearchTreeNode getStartNode() { return startNode; + } + + public Description getStartClass() { + return startClass; + } + + public void setStartClass(Description startClass) { + this.startClass = startClass; + } + + public boolean isInstanceBasedDisjoints() { + return instanceBasedDisjoints; + } + + public void setInstanceBasedDisjoints(boolean instanceBasedDisjoints) { + this.instanceBasedDisjoints = instanceBasedDisjoints; } } Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyCELOE.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -19,11 +19,7 @@ package org.dllearner.algorithms.fuzzydll; -import java.io.BufferedWriter; import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; import java.text.DecimalFormat; import java.util.Collection; import java.util.Iterator; @@ -35,14 +31,12 @@ import java.util.TreeSet; import org.apache.log4j.Logger; -import org.dllearner.algorithms.celoe.OEHeuristicRuntime; import org.dllearner.core.AbstractCELA; +import org.dllearner.core.AbstractLearningProblem; +import org.dllearner.core.AbstractReasonerComponent; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.FuzzyClassExpressionLearningAlgorithm; -import org.dllearner.core.AbstractLearningProblem; -import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.FuzzyCELOEConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigOptions; import org.dllearner.core.options.ConfigOption; @@ -61,7 +55,6 @@ import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.fuzzydll.FuzzyPosNegLP; import org.dllearner.learningproblems.fuzzydll.FuzzyPosNegLPStandard; -import org.dllearner.refinementoperators.FuzzyRhoDRDown; import org.dllearner.refinementoperators.OperatorInverter; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyOEHeuristicRuntime.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyOEHeuristicRuntime.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/fuzzydll/FuzzyOEHeuristicRuntime.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -21,7 +21,6 @@ import java.util.Comparator; -import org.dllearner.core.configurators.FuzzyCELOEConfigurator; import org.dllearner.utilities.owl.ConceptComparator; /** Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/gp/GP.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -24,15 +24,14 @@ import java.util.Collection; import java.util.Comparator; import java.util.LinkedList; +import java.util.Map.Entry; import java.util.Random; import java.util.Set; -import java.util.Map.Entry; import org.dllearner.algorithms.hybridgp.Psi; import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.GPConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/isle/ISLE.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -32,12 +32,11 @@ import org.apache.log4j.Logger; import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.algorithms.celoe.OENode; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.ISLEConfigurator; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigOptions; import org.dllearner.core.options.ConfigOption; @@ -74,7 +73,6 @@ public class ISLE extends AbstractCELA { private static Logger logger = Logger.getLogger(CELOE.class); - private ISLEConfigurator configurator; private boolean isRunning = false; private boolean stop = false; @@ -131,14 +129,19 @@ private int expressionTests = 0; private int minHorizExp = 0; private int maxHorizExp = 0; + + private double noisePercentage = 0.0; + + private int maxNrOfResults = 10; + + private boolean filterDescriptionsFollowingFromKB = true; + + private long maxExecutionTimeInSeconds = 10; + + private boolean reuseExistingDescription = false; - public ISLEConfigurator getConfigurator() { - return configurator; - } - public ISLE(AbstractLearningProblem problem, AbstractReasonerComponent reasoner) { super(problem, reasoner); - configurator = new ISLEConfigurator(this); } public static Collection<Class<? extends AbstractLearningProblem>> supportedLearningProblems() { @@ -186,23 +189,31 @@ startClass = Thing.instance; - singleSuggestionMode = configurator.getSingleSuggestionMode(); +// singleSuggestionMode = configurator.getSingleSuggestionMode(); // create refinement operator - operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); +// operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); + // create refinement operator + if(operator == null) { + operator = new RhoDRDown(); + ((RhoDRDown)operator).setStartClass(startClass); + ((RhoDRDown)operator).setSubHierarchy(classHierarchy); + ((RhoDRDown)operator).setReasoner(reasoner); + ((RhoDRDown)operator).init(); + } baseURI = reasoner.getBaseURI(); prefixes = reasoner.getPrefixes(); - bestEvaluatedDescriptions = new EvaluatedDescriptionSet(configurator.getMaxNrOfResults()); + bestEvaluatedDescriptions = new EvaluatedDescriptionSet(maxNrOfResults); isClassLearningProblem = (learningProblem instanceof ClassLearningProblem); // we put important parameters in class variables - noise = configurator.getNoisePercentage()/100d; - maxDepth = configurator.getMaxDepth(); + noise = noisePercentage/100d; +// maxDepth = configurator.getMaxDepth(); // (filterFollowsFromKB is automatically set to false if the problem // is not a class learning problem - filterFollowsFromKB = configurator.getFilterDescriptionsFollowingFromKB() + filterFollowsFromKB = filterDescriptionsFollowingFromKB && isClassLearningProblem; // actions specific to ontology engineering @@ -218,7 +229,7 @@ // superfluous to add super classes in this case) if(isEquivalenceProblem) { Set<Description> existingDefinitions = reasoner.getAssertedDefinitions(classToDescribe); - if(configurator.getReuseExistingDescription() && (existingDefinitions.size() > 0)) { + if(reuseExistingDescription && (existingDefinitions.size() > 0)) { // the existing definition is reused, which in the simplest case means to // use it as a start class or, if it is already too specific, generalise it @@ -624,7 +635,7 @@ } private boolean terminationCriteriaSatisfied() { - return stop || ((System.nanoTime() - nanoStartTime) >= (configurator.getMaxExecutionTimeInSeconds()*1000000000l)); + return stop || ((System.nanoTime() - nanoStartTime) >= (maxExecutionTimeInSeconds*1000000000l)); } private void reset() { Modified: trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/refinement/ROLearner.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -36,7 +36,6 @@ import org.dllearner.core.AbstractCELA; import org.dllearner.core.AbstractLearningProblem; import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.ROLearnerConfigurator; import org.dllearner.core.options.BooleanConfigOption; import org.dllearner.core.options.CommonConfigMappings; import org.dllearner.core.options.CommonConfigOptions; @@ -63,12 +62,6 @@ public class ROLearner extends AbstractCELA { - private ROLearnerConfigurator configurator; - - public ROLearnerConfigurator getConfigurator(){ - return configurator; - } - private static Logger logger = Logger .getLogger(AbstractCELA.class); @@ -213,7 +206,6 @@ public ROLearner(PosNegLP learningProblem, AbstractReasonerComponent reasoningService) { super(learningProblem, reasoningService); this.learningProblem = learningProblem; - this.configurator = new ROLearnerConfigurator(this); baseURI = reasoningService.getBaseURI(); } Modified: trunk/components-core/src/main/java/org/dllearner/core/AbstractAxiomLearningAlgorithm.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AbstractAxiomLearningAlgorithm.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/AbstractAxiomLearningAlgorithm.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -28,7 +28,6 @@ import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.IntegerEditor; -import org.dllearner.core.configurators.Configurator; import org.dllearner.core.owl.Axiom; import org.dllearner.kb.SparqlEndpointKS; import org.dllearner.kb.sparql.ExtendedQueryEngineHTTP; @@ -38,8 +37,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.hp.hpl.jena.query.Query; -import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; @@ -116,11 +113,6 @@ return returnList; } - - public Configurator getConfigurator() { - // TODO Auto-generated method stub - return null; - } protected ResultSet executeSelectQuery(String query) { logger.info("Sending query\n{} ...", query); Modified: trunk/components-core/src/main/java/org/dllearner/core/AbstractComponent.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/AbstractComponent.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/AbstractComponent.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -22,7 +22,6 @@ import java.util.Collection; import java.util.LinkedList; -import org.dllearner.core.configurators.Configurator; import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.DoubleConfigOption; Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,226 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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 java.net.URL; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractReasonerComponent; -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; -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(AbstractReasonerComponent reasoningService, URL 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 URL -**/ -public URL getClassToDescribe() { -return (URL) 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") ; -} -/** -* useApproximations whether to use stochastic approximations for computing accuracy. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseApproximations() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "useApproximations") ; -} -/** -* approxAccuracy accuracy of the approximation (only for expert use). -* mandatory: false| reinit necessary: true -* default value: 0.05 -* @return double -**/ -public double getApproxAccuracy() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "approxAccuracy") ; -} -/** -* accuracyMethod Specifies, which method/function to use for computing accuracy.. -* mandatory: false| reinit necessary: true -* default value: standard -* @return String -**/ -public String getAccuracyMethod() { -return (String) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "accuracyMethod") ; -} -/** -* checkConsistency Specify whether to check consistency for solution candidates. This is convenient for user interfaces, but can be performance intensive.. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getCheckConsistency() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "checkConsistency") ; -} -/** -* maxExecutionTimeInSeconds algorithm will stop after specified seconds. -* mandatory: false| reinit necessary: true -* default value: 10 -* @return int -**/ -public int getMaxExecutionTimeInSeconds() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "maxExecutionTimeInSeconds") ; -} -/** -* betaSC Higher values of beta rate recall higher than precision or in other words, covering the instances of the class to describe is more important even at the cost of covering additional instances. The actual implementation depends on the selected heuristic. This values is used only for super class learning.. -* mandatory: false| reinit necessary: true -* default value: 3.0 -* @return double -**/ -public double getBetaSC() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "betaSC") ; -} -/** -* betaEq Higher values of beta rate recall higher than precision or in other words, covering the instances of the class to describe is more important even at the cost of covering additional instances. The actual implementation depends on the selected heuristic. This values is used only for equivalence class learning.. -* mandatory: false| reinit necessary: true -* default value: 1.0 -* @return double -**/ -public double getBetaEq() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(classLearningProblem, "betaEq") ; -} - -/** -* @param classToDescribe class of which a description should be learned. -* mandatory: true| reinit necessary: false -* default value: null -**/ -public void setClassToDescribe(URL 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; -} -/** -* @param useApproximations whether to use stochastic approximations for computing accuracy. -* mandatory: false| reinit necessary: true -* default value: true -**/ -public void setUseApproximations(boolean useApproximations) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "useApproximations", useApproximations); -reinitNecessary = true; -} -/** -* @param approxAccuracy accuracy of the approximation (only for expert use). -* mandatory: false| reinit necessary: true -* default value: 0.05 -**/ -public void setApproxAccuracy(double approxAccuracy) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "approxAccuracy", approxAccuracy); -reinitNecessary = true; -} -/** -* @param accuracyMethod Specifies, which method/function to use for computing accuracy.. -* mandatory: false| reinit necessary: true -* default value: standard -**/ -public void setAccuracyMethod(String accuracyMethod) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "accuracyMethod", accuracyMethod); -reinitNecessary = true; -} -/** -* @param checkConsistency Specify whether to check consistency for solution candidates. This is convenient for user interfaces, but can be performance intensive.. -* mandatory: false| reinit necessary: true -* default value: true -**/ -public void setCheckConsistency(boolean checkConsistency) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "checkConsistency", checkConsistency); -reinitNecessary = true; -} -/** -* @param maxExecutionTimeInSeconds algorithm will stop after specified seconds. -* mandatory: false| reinit necessary: true -* default value: 10 -**/ -public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); -reinitNecessary = true; -} -/** -* @param betaSC Higher values of beta rate recall higher than precision or in other words, covering the instances of the class to describe is more important even at the cost of covering additional instances. The actual implementation depends on the selected heuristic. This values is used only for super class learning.. -* mandatory: false| reinit necessary: true -* default value: 3.0 -**/ -public void setBetaSC(double betaSC) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "betaSC", betaSC); -reinitNecessary = true; -} -/** -* @param betaEq Higher values of beta rate recall higher than precision or in other words, covering the instances of the class to describe is more important even at the cost of covering additional instances. The actual implementation depends on the selected heuristic. This values is used only for equivalence class learning.. -* mandatory: false| reinit necessary: true -* default value: 1.0 -**/ -public void setBetaEq(double betaEq) { -ComponentManager.getInstance().applyConfigEntry(classLearningProblem, "betaEq", betaEq); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/Configurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/Configurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/Configurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,27 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public interface Configurator{ -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/DIGReasonerConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,117 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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 java.util.Set; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractKnowledgeSource; -import org.dllearner.reasoning.DIGReasoner; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class DIGReasonerConfigurator implements Configurator { - -private boolean reinitNecessary = false; -private DIGReasoner dIGReasoner; - -/** -* @param dIGReasoner see DIGReasoner -**/ -public DIGReasonerConfigurator(DIGReasoner dIGReasoner){ -this.dIGReasoner = dIGReasoner; -} - -/** -* @param knowledgeSource see knowledgeSource -* @return DIGReasoner -**/ -public static DIGReasoner getDIGReasoner(Set<AbstractKnowledgeSource> knowledgeSource) { -DIGReasoner component = ComponentManager.getInstance().reasoner(DIGReasoner.class, knowledgeSource); -return component; -} - -/** -* reasonerUrl URL of the DIG reasoner. -* mandatory: false| reinit necessary: true -* default value: null -* @return String -**/ -public String getReasonerUrl() { -return (String) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner, "reasonerUrl") ; -} -/** -* writeDIGProtocol specifies whether or not to write a protocoll of send and received DIG requests. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getWriteDIGProtocol() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner, "writeDIGProtocol") ; -} -/** -* digProtocolFile the file to store the DIG protocol. -* mandatory: false| reinit necessary: true -* default value: log/digProtocol.txt -* @return String -**/ -public String getDigProtocolFile() { -return (String) ComponentManager.getInstance().getConfigOptionValue(dIGReasoner, "digProtocolFile") ; -} - -/** -* @param reasonerUrl URL of the DIG reasoner. -* mandatory: false| reinit necessary: true -* default value: null -**/ -public void setReasonerUrl(String reasonerUrl) { -ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "reasonerUrl", reasonerUrl); -reinitNecessary = true; -} -/** -* @param writeDIGProtocol specifies whether or not to write a protocoll of send and received DIG requests. -* mandatory: false| reinit necessary: true -* default value: false -**/ -public void setWriteDIGProtocol(boolean writeDIGProtocol) { -ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "writeDIGProtocol", writeDIGProtocol); -reinitNecessary = true; -} -/** -* @param digProtocolFile the file to store the DIG protocol. -* mandatory: false| reinit necessary: true -* default value: log/digProtocol.txt -**/ -public void setDigProtocolFile(String digProtocolFile) { -ComponentManager.getInstance().applyConfigEntry(dIGReasoner, "digProtocolFile", digProtocolFile); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,84 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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.el.ELLearningAlgorithm; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractLearningProblem; -import org.dllearner.core.LearningProblemUnsupportedException; -import org.dllearner.core.AbstractReasonerComponent; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class ELLearningAlgorithmConfigurator implements Configurator { - -private boolean reinitNecessary = false; -private ELLearningAlgorithm eLLearningAlgorithm; - -/** -* @param eLLearningAlgorithm see ELLearningAlgorithm -**/ -public ELLearningAlgorithmConfigurator(ELLearningAlgorithm eLLearningAlgorithm){ -this.eLLearningAlgorithm = eLLearningAlgorithm; -} - -/** -* @param reasoningService see reasoningService -* @param learningProblem see learningProblem -* @throws LearningProblemUnsupportedException see -* @return ELLearningAlgorithm -**/ -public static ELLearningAlgorithm getELLearningAlgorithm(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ -ELLearningAlgorithm component = ComponentManager.getInstance().learningAlgorithm(ELLearningAlgorithm.class, learningProblem, reasoningService); -return component; -} - -/** -* instanceBasedDisjoints Specifies whether to use real disjointness checks or instance based ones (no common instances) in the refinement operator.. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getInstanceBasedDisjoints() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(eLLearningAlgorithm, "instanceBasedDisjoints") ; -} - -/** -* @param instanceBasedDisjoints Specifies whether to use real disjointness checks or instance based ones (no common instances) in the refinement operator.. -* mandatory: false| reinit necessary: true -* default value: true -**/ -public void setInstanceBasedDisjoints(boolean instanceBasedDisjoints) { -ComponentManager.getInstance().applyConfigEntry(eLLearningAlgorithm, "instanceBasedDisjoints", instanceBasedDisjoints); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmDisjunctiveConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmDisjunctiveConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/ELLearningAlgorithmDisjunctiveConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,120 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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.el.ELLearningAlgorithmDisjunctive; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractLearningProblem; -import org.dllearner.core.LearningProblemUnsupportedException; -import org.dllearner.core.AbstractReasonerComponent; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class ELLearningAlgorithmDisjunctiveConfigurator implements Configurator { - -private boolean reinitNecessary = false; -private ELLearningAlgorithmDisjunctive eLLearningAlgorithmDisjunctive; - -/** -* @param eLLearningAlgorithmDisjunctive see ELLearningAlgorithmDisjunctive -**/ -public ELLearningAlgorithmDisjunctiveConfigurator(ELLearningAlgorithmDisjunctive eLLearningAlgorithmDisjunctive){ -this.eLLearningAlgorithmDisjunctive = eLLearningAlgorithmDisjunctive; -} - -/** -* @param reasoningService see reasoningService -* @param learningProblem see learningProblem -* @throws LearningProblemUnsupportedException see -* @return ELLearningAlgorithmDisjunctive -**/ -public static ELLearningAlgorithmDisjunctive getELLearningAlgorithmDisjunctive(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ -ELLearningAlgorithmDisjunctive component = ComponentManager.getInstance().learningAlgorithm(ELLearningAlgorithmDisjunctive.class, learningProblem, reasoningService); -return component; -} - -/** -* noisePercentage the (approximated) percentage of noise within the examples. -* mandatory: false| reinit necessary: true -* default value: 0.0 -* @return double -**/ -public double getNoisePercentage() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(eLLearningAlgorithmDisjunctive, "noisePercentage") ; -} -/** -* startClass the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class). -* mandatory: false| reinit necessary: true -* default value: null -* @return String -**/ -public String getStartClass() { -return (String) ComponentManager.getInstance().getConfigOptionValue(eLLearningAlgorithmDisjunctive, "startClass") ; -} -/** -* instanceBasedDisjoints Specifies whether to use real disjointness checks or instance based ones (no common instances) in the refinement operator.. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getInstanceBasedDisjoints() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(eLLearningAlgorithmDisjunctive, "instanceBasedDisjoints") ; -} - -/** -* @param noisePercentage the (approximated) percentage of noise within the examples. -* mandatory: false| reinit necessary: true -* default value: 0.0 -**/ -public void setNoisePercentage(double noisePercentage) { -ComponentManager.getInstance().applyConfigEntry(eLLearningAlgorithmDisjunctive, "noisePercentage", noisePercentage); -reinitNecessary = true; -} -/** -* @param startClass the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class). -* mandatory: false| reinit necessary: true -* default value: null -**/ -public void setStartClass(String startClass) { -ComponentManager.getInstance().applyConfigEntry(eLLearningAlgorithmDisjunctive, "startClass", startClass); -reinitNecessary = true; -} -/** -* @param instanceBasedDisjoints Specifies whether to use real disjointness checks or instance based ones (no common instances) in the refinement operator.. -* mandatory: false| reinit necessary: true -* default value: true -**/ -public void setInstanceBasedDisjoints(boolean instanceBasedDisjoints) { -ComponentManager.getInstance().applyConfigEntry(eLLearningAlgorithmDisjunctive, "instanceBasedDisjoints", instanceBasedDisjoints); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,118 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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 java.net.URL; -import java.util.Set; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractKnowledgeSource; -import org.dllearner.reasoning.FastInstanceChecker; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class FastInstanceCheckerConfigurator implements Configurator { - -private boolean reinitNecessary = false; -private FastInstanceChecker fastInstanceChecker; - -/** -* @param fastInstanceChecker see FastInstanceChecker -**/ -public FastInstanceCheckerConfigurator(FastInstanceChecker fastInstanceChecker){ -this.fastInstanceChecker = fastInstanceChecker; -} - -/** -* @param knowledgeSource see knowledgeSource -* @return FastInstanceChecker -**/ -public static FastInstanceChecker getFastInstanceChecker(Set<AbstractKnowledgeSource> knowledgeSource) { -FastInstanceChecker component = ComponentManager.getInstance().reasoner(FastInstanceChecker.class, knowledgeSource); -return component; -} - -/** -* reasonerType FaCT++, HermiT, OWLlink or Pellet to dematerialize. -* mandatory: false| reinit necessary: true -* default value: pellet -* @return String -**/ -public String getReasonerType() { -return (String) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "reasonerType") ; -} -/** -* owlLinkURL the URL to the remote OWLlink server. -* mandatory: false| reinit necessary: true -* default value: http://localhost:8080/ -* @return URL -**/ -public URL getOwlLinkURL() { -return (URL) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "owlLinkURL") ; -} -/** -* defaultNegation Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class.. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getDefaultNegation() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fastInstanceChecker, "defaultNegation") ; -} - -/** -* @param reasonerType FaCT++, HermiT, OWLlink or Pellet to dematerialize. -* mandatory: false| reinit necessary: true -* default value: pellet -**/ -public void setReasonerType(String reasonerType) { -ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "reasonerType", reasonerType); -reinitNecessary = true; -} -/** -* @param owlLinkURL the URL to the remote OWLlink server. -* mandatory: false| reinit necessary: true -* default value: http://localhost:8080/ -**/ -public void setOwlLinkURL(URL owlLinkURL) { -ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "owlLinkURL", owlLinkURL); -reinitNecessary = true; -} -/** -* @param defaultNegation Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class.. -* mandatory: false| reinit necessary: true -* default value: true -**/ -public void setDefaultNegation(boolean defaultNegation) { -ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "defaultNegation", defaultNegation); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,65 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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 java.util.Set; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractKnowledgeSource; -import org.dllearner.reasoning.FastRetrievalReasoner; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class FastRetrievalReasonerConfigurator implements Configurator { - -private boolean reinitNecessary = false; -@SuppressWarnings("unused") - -private FastRetrievalReasoner fastRetrievalReasoner; - -/** -* @param fastRetrievalReasoner see FastRetrievalReasoner -**/ -public FastRetrievalReasonerConfigurator(FastRetrievalReasoner fastRetrievalReasoner){ -this.fastRetrievalReasoner = fastRetrievalReasoner; -} - -/** -* @param knowledgeSource see knowledgeSource -* @return FastRetrievalReasoner -**/ -public static FastRetrievalReasoner getFastRetrievalReasoner(Set<AbstractKnowledgeSource> knowledgeSource) { -FastRetrievalReasoner component = ComponentManager.getInstance().reasoner(FastRetrievalReasoner.class, knowledgeSource); -return component; -} - - - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Deleted: trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java 2011-08-31 17:55:07 UTC (rev 3198) +++ trunk/components-core/src/main/java/org/dllearner/core/configurators/FuzzyCELOEConfigurator.java 2011-08-31 18:05:10 UTC (rev 3199) @@ -1,500 +0,0 @@ -/** - * Copyright (C) 2007-2011, 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.fuzzydll.FuzzyCELOE; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.AbstractLearningProblem; -import org.dllearner.core.LearningProblemUnsupportedException; -import org.dllearner.core.AbstractReasonerComponent; -import org.dllearner.core.configurators.RefinementOperatorConfigurator; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -@SuppressWarnings("all") -public class FuzzyCELOEConfigurator extends RefinementOperatorConfigurator implements Configurator { - -private boolean reinitNecessary = false; -private FuzzyCELOE fuzzyCELOE; - -/** -* @param fuzzyCELOE see FuzzyCELOE -**/ -public FuzzyCELOEConfigurator(FuzzyCELOE fuzzyCELOE){ -this.fuzzyCELOE = fuzzyCELOE; -} - -/** -* @param reasoningService see reasoningService -* @param learningProblem see learningProblem -* @throws LearningProblemUnsupportedException see -* @return FuzzyCELOE -**/ -public static FuzzyCELOE getFuzzyCELOE(AbstractLearningProblem learningProblem, AbstractReasonerComponent reasoningService) throws LearningProblemUnsupportedException{ -FuzzyCELOE component = ComponentManager.getInstance().learningAlgorithm(FuzzyCELOE.class, learningProblem, reasoningService); -return component; -} - -/** -* useAllConstructor specifies whether the universal concept constructor is used in the learning algorithm. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseAllConstructor() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useAllConstructor") ; -} -/** -* useExistsConstructor specifies whether the existential concept constructor is used in the learning algorithm. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseExistsConstructor() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useExistsConstructor") ; -} -/** -* useHasValueConstructor specifies whether the hasValue constructor is used in the learning algorithm. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getUseHasValueConstructor() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useHasValueConstructor") ; -} -/** -* useDataHasValueConstructor specifies whether the hasValue constructor is used in the learning algorithm in combination with data properties. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getUseDataHasValueConstructor() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useDataHasValueConstructor") ; -} -/** -* valueFrequencyThreshold specifies how often an object must occur as value in order to be considered for hasValue restrictions. -* mandatory: false| reinit necessary: true -* default value: 3 -* @return int -**/ -public int getValueFrequencyThreshold() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "valueFrequencyThreshold") ; -} -/** -* useCardinalityRestrictions specifies whether CardinalityRestrictions is used in the learning algorithm. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseCardinalityRestrictions() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useCardinalityRestrictions") ; -} -/** -* cardinalityLimit Gives the maximum number used in cardinality restrictions.. -* mandatory: false| reinit necessary: true -* default value: 5 -* @return int -**/ -public int getCardinalityLimit() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "cardinalityLimit") ; -} -/** -* useNegation specifies whether negation is used in the learning algorothm. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getUseNegation() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useNegation") ; -} -/** -* useBooleanDatatypes specifies whether boolean datatypes are used in the learning algorothm. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseBooleanDatatypes() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useBooleanDatatypes") ; -} -/** -* useDoubleDatatypes specifies whether double datatypes are used in the learning algorothm. -* mandatory: false| reinit necessary: true -* default value: true -* @return boolean -**/ -public boolean getUseDoubleDatatypes() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "useDoubleDatatypes") ; -} -/** -* maxExecutionTimeInSeconds algorithm will stop after specified seconds. -* mandatory: false| reinit necessary: true -* default value: 10 -* @return int -**/ -public int getMaxExecutionTimeInSeconds() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "maxExecutionTimeInSeconds") ; -} -/** -* noisePercentage the (approximated) percentage of noise within the examples. -* mandatory: false| reinit necessary: true -* default value: 0.0 -* @return double -**/ -public double getNoisePercentage() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "noisePercentage") ; -} -/** -* terminateOnNoiseReached specifies whether to terminate when noise criterion is met. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getTerminateOnNoiseReached() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "terminateOnNoiseReached") ; -} -/** -* maxDepth maximum depth of description. -* mandatory: false| reinit necessary: true -* default value: 7 -* @return int -**/ -public int getMaxDepth() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "maxDepth") ; -} -/** -* maxNrOfResults Sets the maximum number of results one is interested in. (Setting this to a lower value may increase performance as the learning algorithm has to store/evaluate/beautify less descriptions).. -* mandatory: false| reinit necessary: true -* default value: 10 -* @return int -**/ -public int getMaxNrOfResults() { -return (Integer) ComponentManager.getInstance().getConfigOptionValue(fuzzyCELOE, "maxNrOfResults") ; -} -/** -* maxClassDescriptionTests The maximum number of candidate hypothesis the algorithm is allowed to test (0 = no limit). The algorithm will stop afterwards. (The real number of tests can be slightly higher, because this criterion usually won't be checked after each single test.). -* mandatory: false| reinit necessary: true -* default value: 0 -* @return int -**/ -public int getMaxClassDescr... [truncated message content] |