From: <ku...@us...> - 2008-09-08 11:45:13
|
Revision: 1173 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1173&view=rev Author: kurzum Date: 2008-09-08 11:45:09 +0000 (Mon, 08 Sep 2008) Log Message: ----------- intermediate commit Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/kb/KBFile.java trunk/src/dl-learner/org/dllearner/kb/OWLAPIOntology.java trunk/src/dl-learner/org/dllearner/kb/OWLFile.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/core/configurators/ trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyDefinitionLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/core/configuration/ Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-09-08 09:24:41 UTC (rev 1172) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -44,7 +44,7 @@ import org.dllearner.core.config.IntegerConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; import org.dllearner.core.config.StringConfigOption; -import org.dllearner.core.configuration.ExampleBasedROLComponentConfigurator; +import org.dllearner.core.configurators.ExampleBasedROLComponentConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.ObjectProperty; Added: trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -0,0 +1,88 @@ +/** + * 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.BruteForceLearner; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasoningService; + +/** +* automatically generated, do not edit manually +**/ +public class BruteForceLearnerConfigurator { + +private boolean reinitNecessary = false; +private BruteForceLearner BruteForceLearner; + +public BruteForceLearnerConfigurator (BruteForceLearner BruteForceLearner){ +this.BruteForceLearner = BruteForceLearner; +} + +/** +**/ +public static BruteForceLearner getBruteForceLearner (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException{ +BruteForceLearner component = ComponentManager.getInstance().learningAlgorithm(BruteForceLearner.class, learningProblem, reasoningService ); +return component; +} + +/** +* option name: maxLength +* maximum length of generated concepts +* default value: 7 +**/ +public int getMaxLength ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(BruteForceLearner, "maxLength") ; +} +/** +* option name: returnType +* Specifies the type which the solution has to belong to (if already) known. This means we inform the learning algorithm that the solution is a subclass of this type. +* default value: null +**/ +public String getReturnType ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(BruteForceLearner, "returnType") ; +} + +/** +* option name: maxLength +* maximum length of generated concepts +* default value: 7 +**/ +public void setMaxLength ( int maxLength) { +ComponentManager.getInstance().applyConfigEntry(BruteForceLearner, "maxLength", maxLength); +reinitNecessary = true; +} +/** +* option name: returnType +* Specifies the type which the solution has to belong to (if already) known. This means we inform the learning algorithm that the solution is a subclass of this type. +* default value: null +**/ +public void setReturnType ( String returnType) { +ComponentManager.getInstance().applyConfigEntry(BruteForceLearner, "returnType", returnType); +reinitNecessary = true; +} + +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -0,0 +1,172 @@ +/** + * 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 java.util.Set; +import org.dllearner.algorithms.BruteForceLearner; +import org.dllearner.algorithms.DBpediaNavigationSuggestor; +import org.dllearner.algorithms.RandomGuesser; +import org.dllearner.algorithms.gp.GP; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasoningService; +import org.dllearner.core.configurators.BruteForceLearnerConfigurator; +import org.dllearner.core.configurators.DBpediaNavigationSuggestorConfigurator; +import org.dllearner.core.configurators.DIGReasonerConfigurator; +import org.dllearner.core.configurators.ExampleBasedROLComponentConfigurator; +import org.dllearner.core.configurators.FastInstanceCheckerConfigurator; +import org.dllearner.core.configurators.FastRetrievalReasonerConfigurator; +import org.dllearner.core.configurators.GPConfigurator; +import org.dllearner.core.configurators.KBFileConfigurator; +import org.dllearner.core.configurators.OWLAPIReasonerConfigurator; +import org.dllearner.core.configurators.OWLFileConfigurator; +import org.dllearner.core.configurators.PosNegDefinitionLPConfigurator; +import org.dllearner.core.configurators.PosNegInclusionLPConfigurator; +import org.dllearner.core.configurators.PosOnlyDefinitionLPConfigurator; +import org.dllearner.core.configurators.ROLearnerConfigurator; +import org.dllearner.core.configurators.RandomGuesserConfigurator; +import org.dllearner.core.configurators.SparqlKnowledgeSourceConfigurator; +import org.dllearner.kb.KBFile; +import org.dllearner.kb.OWLFile; +import org.dllearner.kb.sparql.SparqlKnowledgeSource; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.learningproblems.PosNegInclusionLP; +import org.dllearner.learningproblems.PosOnlyDefinitionLP; +import org.dllearner.reasoning.DIGReasoner; +import org.dllearner.reasoning.FastInstanceChecker; +import org.dllearner.reasoning.FastRetrievalReasoner; +import org.dllearner.reasoning.OWLAPIReasoner; + +/** +* automatically generated, do not edit manually +**/ +public class ComponentFactory { + +/** +* @param filename pointer to the KB file on local file system +**/ +public static KBFile getKBFile (String filename ) { +return KBFileConfigurator.getKBFile(filename); +} + +/** +* @param url URL pointing to the OWL file +**/ +public static OWLFile getOWLFile (String url ) { +return OWLFileConfigurator.getOWLFile(url); +} + +/** +* @param instances relevant instances e.g. positive and negative examples in a learning problem +**/ +public static SparqlKnowledgeSource getSparqlKnowledgeSource (Set<String> instances ) { +return SparqlKnowledgeSourceConfigurator.getSparqlKnowledgeSource(instances); +} + +/** +**/ +public static DIGReasoner getDIGReasoner (KnowledgeSource knowledgeSource ) { +return DIGReasonerConfigurator.getDIGReasoner(knowledgeSource); +} + +/** +**/ +public static FastInstanceChecker getFastInstanceChecker (KnowledgeSource knowledgeSource ) { +return FastInstanceCheckerConfigurator.getFastInstanceChecker(knowledgeSource); +} + +/** +**/ +public static FastRetrievalReasoner getFastRetrievalReasoner (KnowledgeSource knowledgeSource ) { +return FastRetrievalReasonerConfigurator.getFastRetrievalReasoner(knowledgeSource); +} + +/** +**/ +public static OWLAPIReasoner getOWLAPIReasoner (KnowledgeSource knowledgeSource ) { +return OWLAPIReasonerConfigurator.getOWLAPIReasoner(knowledgeSource); +} + +/** +* @param positiveExamples positive examples +* @param negativeExamples negative examples +**/ +public static PosNegDefinitionLP getPosNegDefinitionLP (ReasoningService reasoningService, Set<String> positiveExamples, Set<String> negativeExamples ) { +return PosNegDefinitionLPConfigurator.getPosNegDefinitionLP(reasoningService, positiveExamples, negativeExamples); +} + +/** +* @param positiveExamples positive examples +* @param negativeExamples negative examples +**/ +public static PosNegInclusionLP getPosNegInclusionLP (ReasoningService reasoningService, Set<String> positiveExamples, Set<String> negativeExamples ) { +return PosNegInclusionLPConfigurator.getPosNegInclusionLP(reasoningService, positiveExamples, negativeExamples); +} + +/** +* @param positiveExamples positive examples +**/ +public static PosOnlyDefinitionLP getPosOnlyDefinitionLP (ReasoningService reasoningService, Set<String> positiveExamples ) { +return PosOnlyDefinitionLPConfigurator.getPosOnlyDefinitionLP(reasoningService, positiveExamples); +} + +/** +**/ +public static BruteForceLearner getBruteForceLearner (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return BruteForceLearnerConfigurator.getBruteForceLearner(learningProblem, reasoningService); +} + +/** +**/ +public static DBpediaNavigationSuggestor getDBpediaNavigationSuggestor (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return DBpediaNavigationSuggestorConfigurator.getDBpediaNavigationSuggestor(learningProblem, reasoningService); +} + +/** +**/ +public static RandomGuesser getRandomGuesser (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return RandomGuesserConfigurator.getRandomGuesser(learningProblem, reasoningService); +} + +/** +**/ +public static GP getGP (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return GPConfigurator.getGP(learningProblem, reasoningService); +} + +/** +**/ +public static ExampleBasedROLComponent getExampleBasedROLComponent (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return ExampleBasedROLComponentConfigurator.getExampleBasedROLComponent(learningProblem, reasoningService); +} + +/** +**/ +public static ROLearner getROLearner (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException { +return ROLearnerConfigurator.getROLearner(learningProblem, reasoningService); +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DBpediaNavigationSuggestorConfigurator.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -0,0 +1,501 @@ +/** + * 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 java.util.Set; +import org.dllearner.algorithms.DBpediaNavigationSuggestor; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasoningService; + +/** +* automatically generated, do not edit manually +**/ +public class DBpediaNavigationSuggestorConfigurator { + +private boolean reinitNecessary = false; +private DBpediaNavigationSuggestor DBpediaNavigationSuggestor; + +public DBpediaNavigationSuggestorConfigurator (DBpediaNavigationSuggestor DBpediaNavigationSuggestor){ +this.DBpediaNavigationSuggestor = DBpediaNavigationSuggestor; +} + +/** +**/ +public static DBpediaNavigationSuggestor getDBpediaNavigationSuggestor (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException{ +DBpediaNavigationSuggestor component = ComponentManager.getInstance().learningAlgorithm(DBpediaNavigationSuggestor.class, learningProblem, reasoningService ); +return component; +} + +/** +* option name: writeSearchTree +* specifies whether to write a search tree +* default value: false +**/ +public boolean getWriteSearchTree ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "writeSearchTree") ; +} +/** +* option name: searchTreeFile +* file to use for the search tree +* default value: log/searchTree.txt +**/ +public String getSearchTreeFile ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "searchTreeFile") ; +} +/** +* option name: replaceSearchTree +* specifies whether to replace the search tree in the log file after each run or append the new search tree +* default value: false +**/ +public boolean getReplaceSearchTree ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "replaceSearchTree") ; +} +/** +* option name: heuristic +* specifiy the heuristic to use +* default value: lexicographic +**/ +public String getHeuristic ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "heuristic") ; +} +/** +* option name: applyAllFilter +* usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) +* default value: true +**/ +public boolean getApplyAllFilter ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "applyAllFilter") ; +} +/** +* option name: applyExistsFilter +* usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) +* default value: true +**/ +public boolean getApplyExistsFilter ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "applyExistsFilter") ; +} +/** +* option name: useTooWeakList +* try to filter out too weak concepts without sending them to the reasoner +* default value: true +**/ +public boolean getUseTooWeakList ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useTooWeakList") ; +} +/** +* option name: useOverlyGeneralList +* try to find overly general concept without sending them to the reasoner +* default value: true +**/ +public boolean getUseOverlyGeneralList ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useOverlyGeneralList") ; +} +/** +* option name: useShortConceptConstruction +* shorten concept to see whether they already exist +* default value: true +**/ +public boolean getUseShortConceptConstruction ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useShortConceptConstruction") ; +} +/** +* option name: horizontalExpansionFactor +* horizontal expansion factor (see publication for description) +* default value: 0.6 +**/ +public double getHorizontalExpansionFactor ( ) { +return (Double) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "horizontalExpansionFactor") ; +} +/** +* option name: improveSubsumptionHierarchy +* simplify subsumption hierarchy to reduce search space (see publication for description) +* default value: true +**/ +public boolean getImproveSubsumptionHierarchy ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "improveSubsumptionHierarchy") ; +} +/** +* option name: allowedConcepts +* concepts the algorithm is allowed to use +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getAllowedConcepts ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "allowedConcepts") ; +} +/** +* option name: ignoredConcepts +* concepts the algorithm must ignore +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getIgnoredConcepts ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "ignoredConcepts") ; +} +/** +* option name: allowedRoles +* roles the algorithm is allowed to use +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getAllowedRoles ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "allowedRoles") ; +} +/** +* option name: ignoredRoles +* roles the algorithm must ignore +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getIgnoredRoles ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "ignoredRoles") ; +} +/** +* option name: useAllConstructor +* specifies whether the universal concept constructor is used in the learning algorithm +* default value: true +**/ +public boolean getUseAllConstructor ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useAllConstructor") ; +} +/** +* option name: useExistsConstructor +* specifies whether the existential concept constructor is used in the learning algorithm +* default value: true +**/ +public boolean getUseExistsConstructor ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useExistsConstructor") ; +} +/** +* option name: useCardinalityRestrictions +* specifies whether CardinalityRestrictions is used in the learning algorithm +* default value: true +**/ +public boolean getUseCardinalityRestrictions ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useCardinalityRestrictions") ; +} +/** +* option name: useNegation +* specifies whether negation is used in the learning algorothm +* default value: true +**/ +public boolean getUseNegation ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useNegation") ; +} +/** +* option name: useBooleanDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public boolean getUseBooleanDatatypes ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "useBooleanDatatypes") ; +} +/** +* option name: maxExecutionTimeInSeconds +* algorithm will stop after specified seconds +* default value: 0 +**/ +public int getMaxExecutionTimeInSeconds ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "maxExecutionTimeInSeconds") ; +} +/** +* option name: minExecutionTimeInSeconds +* algorithm will run at least specified seconds +* default value: 0 +**/ +public int getMinExecutionTimeInSeconds ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "minExecutionTimeInSeconds") ; +} +/** +* option name: guaranteeXgoodDescriptions +* algorithm will run until X good (100%) concept descritpions are found +* default value: 1 +**/ +public int getGuaranteeXgoodDescriptions ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "guaranteeXgoodDescriptions") ; +} +/** +* option name: logLevel +* determines the logLevel for this component, can be {TRACE, DEBUG, INFO} +* default value: DEBUG +**/ +public String getLogLevel ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "logLevel") ; +} +/** +* option name: noisePercentage +* the (approximated) percentage of noise within the examples +* default value: 0.0 +**/ +public double getNoisePercentage ( ) { +return (Double) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "noisePercentage") ; +} +/** +* option name: startClass +* the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) +* default value: null +**/ +public String getStartClass ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DBpediaNavigationSuggestor, "startClass") ; +} + +/** +* option name: writeSearchTree +* specifies whether to write a search tree +* default value: false +**/ +public void setWriteSearchTree ( boolean writeSearchTree) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "writeSearchTree", writeSearchTree); +reinitNecessary = true; +} +/** +* option name: searchTreeFile +* file to use for the search tree +* default value: log/searchTree.txt +**/ +public void setSearchTreeFile ( String searchTreeFile) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "searchTreeFile", searchTreeFile); +reinitNecessary = true; +} +/** +* option name: replaceSearchTree +* specifies whether to replace the search tree in the log file after each run or append the new search tree +* default value: false +**/ +public void setReplaceSearchTree ( boolean replaceSearchTree) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "replaceSearchTree", replaceSearchTree); +reinitNecessary = true; +} +/** +* option name: heuristic +* specifiy the heuristic to use +* default value: lexicographic +**/ +public void setHeuristic ( String heuristic) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "heuristic", heuristic); +reinitNecessary = true; +} +/** +* option name: applyAllFilter +* usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) +* default value: true +**/ +public void setApplyAllFilter ( boolean applyAllFilter) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "applyAllFilter", applyAllFilter); +reinitNecessary = true; +} +/** +* option name: applyExistsFilter +* usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) +* default value: true +**/ +public void setApplyExistsFilter ( boolean applyExistsFilter) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "applyExistsFilter", applyExistsFilter); +reinitNecessary = true; +} +/** +* option name: useTooWeakList +* try to filter out too weak concepts without sending them to the reasoner +* default value: true +**/ +public void setUseTooWeakList ( boolean useTooWeakList) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useTooWeakList", useTooWeakList); +reinitNecessary = true; +} +/** +* option name: useOverlyGeneralList +* try to find overly general concept without sending them to the reasoner +* default value: true +**/ +public void setUseOverlyGeneralList ( boolean useOverlyGeneralList) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useOverlyGeneralList", useOverlyGeneralList); +reinitNecessary = true; +} +/** +* option name: useShortConceptConstruction +* shorten concept to see whether they already exist +* default value: true +**/ +public void setUseShortConceptConstruction ( boolean useShortConceptConstruction) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useShortConceptConstruction", useShortConceptConstruction); +reinitNecessary = true; +} +/** +* option name: horizontalExpansionFactor +* horizontal expansion factor (see publication for description) +* default value: 0.6 +**/ +public void setHorizontalExpansionFactor ( double horizontalExpansionFactor) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "horizontalExpansionFactor", horizontalExpansionFactor); +reinitNecessary = true; +} +/** +* option name: improveSubsumptionHierarchy +* simplify subsumption hierarchy to reduce search space (see publication for description) +* default value: true +**/ +public void setImproveSubsumptionHierarchy ( boolean improveSubsumptionHierarchy) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "improveSubsumptionHierarchy", improveSubsumptionHierarchy); +reinitNecessary = true; +} +/** +* option name: allowedConcepts +* concepts the algorithm is allowed to use +* default value: null +**/ +public void setAllowedConcepts ( Set<String> allowedConcepts) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "allowedConcepts", allowedConcepts); +reinitNecessary = true; +} +/** +* option name: ignoredConcepts +* concepts the algorithm must ignore +* default value: null +**/ +public void setIgnoredConcepts ( Set<String> ignoredConcepts) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "ignoredConcepts", ignoredConcepts); +reinitNecessary = true; +} +/** +* option name: allowedRoles +* roles the algorithm is allowed to use +* default value: null +**/ +public void setAllowedRoles ( Set<String> allowedRoles) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "allowedRoles", allowedRoles); +reinitNecessary = true; +} +/** +* option name: ignoredRoles +* roles the algorithm must ignore +* default value: null +**/ +public void setIgnoredRoles ( Set<String> ignoredRoles) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "ignoredRoles", ignoredRoles); +reinitNecessary = true; +} +/** +* option name: useAllConstructor +* specifies whether the universal concept constructor is used in the learning algorithm +* default value: true +**/ +public void setUseAllConstructor ( boolean useAllConstructor) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useAllConstructor", useAllConstructor); +reinitNecessary = true; +} +/** +* option name: useExistsConstructor +* specifies whether the existential concept constructor is used in the learning algorithm +* default value: true +**/ +public void setUseExistsConstructor ( boolean useExistsConstructor) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useExistsConstructor", useExistsConstructor); +reinitNecessary = true; +} +/** +* option name: useCardinalityRestrictions +* specifies whether CardinalityRestrictions is used in the learning algorithm +* default value: true +**/ +public void setUseCardinalityRestrictions ( boolean useCardinalityRestrictions) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useCardinalityRestrictions", useCardinalityRestrictions); +reinitNecessary = true; +} +/** +* option name: useNegation +* specifies whether negation is used in the learning algorothm +* default value: true +**/ +public void setUseNegation ( boolean useNegation) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useNegation", useNegation); +reinitNecessary = true; +} +/** +* option name: useBooleanDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public void setUseBooleanDatatypes ( boolean useBooleanDatatypes) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "useBooleanDatatypes", useBooleanDatatypes); +reinitNecessary = true; +} +/** +* option name: maxExecutionTimeInSeconds +* algorithm will stop after specified seconds +* default value: 0 +**/ +public void setMaxExecutionTimeInSeconds ( int maxExecutionTimeInSeconds) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); +reinitNecessary = true; +} +/** +* option name: minExecutionTimeInSeconds +* algorithm will run at least specified seconds +* default value: 0 +**/ +public void setMinExecutionTimeInSeconds ( int minExecutionTimeInSeconds) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "minExecutionTimeInSeconds", minExecutionTimeInSeconds); +reinitNecessary = true; +} +/** +* option name: guaranteeXgoodDescriptions +* algorithm will run until X good (100%) concept descritpions are found +* default value: 1 +**/ +public void setGuaranteeXgoodDescriptions ( int guaranteeXgoodDescriptions) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "guaranteeXgoodDescriptions", guaranteeXgoodDescriptions); +reinitNecessary = true; +} +/** +* option name: logLevel +* determines the logLevel for this component, can be {TRACE, DEBUG, INFO} +* default value: DEBUG +**/ +public void setLogLevel ( String logLevel) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "logLevel", logLevel); +reinitNecessary = true; +} +/** +* option name: noisePercentage +* the (approximated) percentage of noise within the examples +* default value: 0.0 +**/ +public void setNoisePercentage ( double noisePercentage) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "noisePercentage", noisePercentage); +reinitNecessary = true; +} +/** +* option name: startClass +* the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) +* default value: null +**/ +public void setStartClass ( String startClass) { +ComponentManager.getInstance().applyConfigEntry(DBpediaNavigationSuggestor, "startClass", startClass); +reinitNecessary = true; +} + +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -0,0 +1,103 @@ +/** + * 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.KnowledgeSource; +import org.dllearner.reasoning.DIGReasoner; + +/** +* automatically generated, do not edit manually +**/ +public class DIGReasonerConfigurator { + +private boolean reinitNecessary = false; +private DIGReasoner DIGReasoner; + +public DIGReasonerConfigurator (DIGReasoner DIGReasoner){ +this.DIGReasoner = DIGReasoner; +} + +/** +**/ +public static DIGReasoner getDIGReasoner (KnowledgeSource knowledgeSource ) { +DIGReasoner component = ComponentManager.getInstance().reasoner(DIGReasoner.class, knowledgeSource ); +return component; +} + +/** +* option name: reasonerUrl +* URL of the DIG reasoner +* default value: null +**/ +public String getReasonerUrl ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DIGReasoner, "reasonerUrl") ; +} +/** +* option name: writeDIGProtocol +* specifies whether or not to write a protocoll of send and received DIG requests +* default value: false +**/ +public boolean getWriteDIGProtocol ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(DIGReasoner, "writeDIGProtocol") ; +} +/** +* option name: digProtocolFile +* the file to store the DIG protocol +* default value: log/digProtocol.txt +**/ +public String getDigProtocolFile ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(DIGReasoner, "digProtocolFile") ; +} + +/** +* option name: reasonerUrl +* URL of the DIG reasoner +* default value: null +**/ +public void setReasonerUrl ( String reasonerUrl) { +ComponentManager.getInstance().applyConfigEntry(DIGReasoner, "reasonerUrl", reasonerUrl); +reinitNecessary = true; +} +/** +* option name: writeDIGProtocol +* specifies whether or not to write a protocoll of send and received DIG requests +* default value: false +**/ +public void setWriteDIGProtocol ( boolean writeDIGProtocol) { +ComponentManager.getInstance().applyConfigEntry(DIGReasoner, "writeDIGProtocol", writeDIGProtocol); +reinitNecessary = true; +} +/** +* option name: digProtocolFile +* the file to store the DIG protocol +* default value: log/digProtocol.txt +**/ +public void setDigProtocolFile ( String digProtocolFile) { +ComponentManager.getInstance().applyConfigEntry(DIGReasoner, "digProtocolFile", digProtocolFile); +reinitNecessary = true; +} + +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ExampleBasedROLComponentConfigurator.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -0,0 +1,552 @@ +/** + * 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 java.util.Set; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasoningService; + +/** +* automatically generated, do not edit manually +**/ +public class ExampleBasedROLComponentConfigurator { + +private boolean reinitNecessary = false; +private ExampleBasedROLComponent ExampleBasedROLComponent; + +public ExampleBasedROLComponentConfigurator (ExampleBasedROLComponent ExampleBasedROLComponent){ +this.ExampleBasedROLComponent = ExampleBasedROLComponent; +} + +/** +**/ +public static ExampleBasedROLComponent getExampleBasedROLComponent (LearningProblem learningProblem, ReasoningService reasoningService ) throws LearningProblemUnsupportedException{ +ExampleBasedROLComponent component = ComponentManager.getInstance().learningAlgorithm(ExampleBasedROLComponent.class, learningProblem, reasoningService ); +return component; +} + +/** +* option name: writeSearchTree +* specifies whether to write a search tree +* default value: false +**/ +public boolean getWriteSearchTree ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "writeSearchTree") ; +} +/** +* option name: searchTreeFile +* file to use for the search tree +* default value: log/searchTree.txt +**/ +public String getSearchTreeFile ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "searchTreeFile") ; +} +/** +* option name: replaceSearchTree +* specifies whether to replace the search tree in the log file after each run or append the new search tree +* default value: false +**/ +public boolean getReplaceSearchTree ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "replaceSearchTree") ; +} +/** +* option name: heuristic +* specifiy the heuristic to use +* default value: lexicographic +**/ +public String getHeuristic ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "heuristic") ; +} +/** +* option name: applyAllFilter +* usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) +* default value: true +**/ +public boolean getApplyAllFilter ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "applyAllFilter") ; +} +/** +* option name: applyExistsFilter +* usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) +* default value: true +**/ +public boolean getApplyExistsFilter ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "applyExistsFilter") ; +} +/** +* option name: useTooWeakList +* try to filter out too weak concepts without sending them to the reasoner +* default value: true +**/ +public boolean getUseTooWeakList ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useTooWeakList") ; +} +/** +* option name: useOverlyGeneralList +* try to find overly general concept without sending them to the reasoner +* default value: true +**/ +public boolean getUseOverlyGeneralList ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useOverlyGeneralList") ; +} +/** +* option name: useShortConceptConstruction +* shorten concept to see whether they already exist +* default value: true +**/ +public boolean getUseShortConceptConstruction ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useShortConceptConstruction") ; +} +/** +* option name: horizontalExpansionFactor +* horizontal expansion factor (see publication for description) +* default value: 0.6 +**/ +public double getHorizontalExpansionFactor ( ) { +return (Double) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "horizontalExpansionFactor") ; +} +/** +* option name: improveSubsumptionHierarchy +* simplify subsumption hierarchy to reduce search space (see publication for description) +* default value: true +**/ +public boolean getImproveSubsumptionHierarchy ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "improveSubsumptionHierarchy") ; +} +/** +* option name: allowedConcepts +* concepts the algorithm is allowed to use +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getAllowedConcepts ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "allowedConcepts") ; +} +/** +* option name: ignoredConcepts +* concepts the algorithm must ignore +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getIgnoredConcepts ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "ignoredConcepts") ; +} +/** +* option name: allowedRoles +* roles the algorithm is allowed to use +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getAllowedRoles ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "allowedRoles") ; +} +/** +* option name: ignoredRoles +* roles the algorithm must ignore +* default value: null +**/ +@SuppressWarnings("unchecked") +public Set<String> getIgnoredRoles ( ) { +return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "ignoredRoles") ; +} +/** +* option name: useAllConstructor +* specifies whether the universal concept constructor is used in the learning algorithm +* default value: true +**/ +public boolean getUseAllConstructor ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useAllConstructor") ; +} +/** +* option name: useExistsConstructor +* specifies whether the existential concept constructor is used in the learning algorithm +* default value: true +**/ +public boolean getUseExistsConstructor ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useExistsConstructor") ; +} +/** +* option name: useCardinalityRestrictions +* specifies whether CardinalityRestrictions is used in the learning algorithm +* default value: true +**/ +public boolean getUseCardinalityRestrictions ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useCardinalityRestrictions") ; +} +/** +* option name: useNegation +* specifies whether negation is used in the learning algorothm +* default value: true +**/ +public boolean getUseNegation ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useNegation") ; +} +/** +* option name: useBooleanDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public boolean getUseBooleanDatatypes ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useBooleanDatatypes") ; +} +/** +* option name: useDoubleDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public boolean getUseDoubleDatatypes ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "useDoubleDatatypes") ; +} +/** +* option name: maxExecutionTimeInSeconds +* algorithm will stop after specified seconds +* default value: 0 +**/ +public int getMaxExecutionTimeInSeconds ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "maxExecutionTimeInSeconds") ; +} +/** +* option name: minExecutionTimeInSeconds +* algorithm will run at least specified seconds +* default value: 0 +**/ +public int getMinExecutionTimeInSeconds ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "minExecutionTimeInSeconds") ; +} +/** +* option name: guaranteeXgoodDescriptions +* algorithm will run until X good (100%) concept descritpions are found +* default value: 1 +**/ +public int getGuaranteeXgoodDescriptions ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "guaranteeXgoodDescriptions") ; +} +/** +* option name: logLevel +* determines the logLevel for this component, can be {TRACE, DEBUG, INFO} +* default value: DEBUG +**/ +public String getLogLevel ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "logLevel") ; +} +/** +* option name: usePropernessChecks +* specifies whether to check for equivalence (i.e. discard equivalent refinements) +* default value: false +**/ +public boolean getUsePropernessChecks ( ) { +return (Boolean) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "usePropernessChecks") ; +} +/** +* option name: maxPosOnlyExpansion +* specifies how often a node in the search tree of a posonly learning problem needs to be expanded before it is considered as solution candidate +* default value: 4 +**/ +public int getMaxPosOnlyExpansion ( ) { +return (Integer) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "maxPosOnlyExpansion") ; +} +/** +* option name: noisePercentage +* the (approximated) percentage of noise within the examples +* default value: 0.0 +**/ +public double getNoisePercentage ( ) { +return (Double) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "noisePercentage") ; +} +/** +* option name: startClass +* the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) +* default value: null +**/ +public String getStartClass ( ) { +return (String) ComponentManager.getInstance().getConfigOptionValue(ExampleBasedROLComponent, "startClass") ; +} + +/** +* option name: writeSearchTree +* specifies whether to write a search tree +* default value: false +**/ +public void setWriteSearchTree ( boolean writeSearchTree) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "writeSearchTree", writeSearchTree); +reinitNecessary = true; +} +/** +* option name: searchTreeFile +* file to use for the search tree +* default value: log/searchTree.txt +**/ +public void setSearchTreeFile ( String searchTreeFile) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "searchTreeFile", searchTreeFile); +reinitNecessary = true; +} +/** +* option name: replaceSearchTree +* specifies whether to replace the search tree in the log file after each run or append the new search tree +* default value: false +**/ +public void setReplaceSearchTree ( boolean replaceSearchTree) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "replaceSearchTree", replaceSearchTree); +reinitNecessary = true; +} +/** +* option name: heuristic +* specifiy the heuristic to use +* default value: lexicographic +**/ +public void setHeuristic ( String heuristic) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "heuristic", heuristic); +reinitNecessary = true; +} +/** +* option name: applyAllFilter +* usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) +* default value: true +**/ +public void setApplyAllFilter ( boolean applyAllFilter) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "applyAllFilter", applyAllFilter); +reinitNecessary = true; +} +/** +* option name: applyExistsFilter +* usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) +* default value: true +**/ +public void setApplyExistsFilter ( boolean applyExistsFilter) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "applyExistsFilter", applyExistsFilter); +reinitNecessary = true; +} +/** +* option name: useTooWeakList +* try to filter out too weak concepts without sending them to the reasoner +* default value: true +**/ +public void setUseTooWeakList ( boolean useTooWeakList) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useTooWeakList", useTooWeakList); +reinitNecessary = true; +} +/** +* option name: useOverlyGeneralList +* try to find overly general concept without sending them to the reasoner +* default value: true +**/ +public void setUseOverlyGeneralList ( boolean useOverlyGeneralList) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useOverlyGeneralList", useOverlyGeneralList); +reinitNecessary = true; +} +/** +* option name: useShortConceptConstruction +* shorten concept to see whether they already exist +* default value: true +**/ +public void setUseShortConceptConstruction ( boolean useShortConceptConstruction) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useShortConceptConstruction", useShortConceptConstruction); +reinitNecessary = true; +} +/** +* option name: horizontalExpansionFactor +* horizontal expansion factor (see publication for description) +* default value: 0.6 +**/ +public void setHorizontalExpansionFactor ( double horizontalExpansionFactor) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "horizontalExpansionFactor", horizontalExpansionFactor); +reinitNecessary = true; +} +/** +* option name: improveSubsumptionHierarchy +* simplify subsumption hierarchy to reduce search space (see publication for description) +* default value: true +**/ +public void setImproveSubsumptionHierarchy ( boolean improveSubsumptionHierarchy) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "improveSubsumptionHierarchy", improveSubsumptionHierarchy); +reinitNecessary = true; +} +/** +* option name: allowedConcepts +* concepts the algorithm is allowed to use +* default value: null +**/ +public void setAllowedConcepts ( Set<String> allowedConcepts) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "allowedConcepts", allowedConcepts); +reinitNecessary = true; +} +/** +* option name: ignoredConcepts +* concepts the algorithm must ignore +* default value: null +**/ +public void setIgnoredConcepts ( Set<String> ignoredConcepts) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "ignoredConcepts", ignoredConcepts); +reinitNecessary = true; +} +/** +* option name: allowedRoles +* roles the algorithm is allowed to use +* default value: null +**/ +public void setAllowedRoles ( Set<String> allowedRoles) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "allowedRoles", allowedRoles); +reinitNecessary = true; +} +/** +* option name: ignoredRoles +* roles the algorithm must ignore +* default value: null +**/ +public void setIgnoredRoles ( Set<String> ignoredRoles) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "ignoredRoles", ignoredRoles); +reinitNecessary = true; +} +/** +* option name: useAllConstructor +* specifies whether the universal concept constructor is used in the learning algorithm +* default value: true +**/ +public void setUseAllConstructor ( boolean useAllConstructor) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useAllConstructor", useAllConstructor); +reinitNecessary = true; +} +/** +* option name: useExistsConstructor +* specifies whether the existential concept constructor is used in the learning algorithm +* default value: true +**/ +public void setUseExistsConstructor ( boolean useExistsConstructor) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useExistsConstructor", useExistsConstructor); +reinitNecessary = true; +} +/** +* option name: useCardinalityRestrictions +* specifies whether CardinalityRestrictions is used in the learning algorithm +* default value: true +**/ +public void setUseCardinalityRestrictions ( boolean useCardinalityRestrictions) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useCardinalityRestrictions", useCardinalityRestrictions); +reinitNecessary = true; +} +/** +* option name: useNegation +* specifies whether negation is used in the learning algorothm +* default value: true +**/ +public void setUseNegation ( boolean useNegation) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useNegation", useNegation); +reinitNecessary = true; +} +/** +* option name: useBooleanDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public void setUseBooleanDatatypes ( boolean useBooleanDatatypes) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useBooleanDatatypes", useBooleanDatatypes); +reinitNecessary = true; +} +/** +* option name: useDoubleDatatypes +* specifies whether boolean datatypes are used in the learning algorothm +* default value: true +**/ +public void setUseDoubleDatatypes ( boolean useDoubleDatatypes) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "useDoubleDatatypes", useDoubleDatatypes); +reinitNecessary = true; +} +/** +* option name: maxExecutionTimeInSeconds +* algorithm will stop after specified seconds +* default value: 0 +**/ +public void setMaxExecutionTimeInSeconds ( int maxExecutionTimeInSeconds) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); +reinitNecessary = true; +} +/** +* option name: minExecutionTimeInSeconds +* algorithm will run at least specified seconds +* default value: 0 +**/ +public void setMinExecutionTimeInSeconds ( int minExecutionTimeInSeconds) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "minExecutionTimeInSeconds", minExecutionTimeInSeconds); +reinitNecessary = true; +} +/** +* option name: guaranteeXgoodDescriptions +* algorithm will run until X good (100%) concept descritpions are found +* default value: 1 +**/ +public void setGuaranteeXgoodDescriptions ( int guaranteeXgoodDescriptions) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "guaranteeXgoodDescriptions", guaranteeXgoodDescriptions); +reinitNecessary = true; +} +/** +* option name: logLevel +* determines the logLevel for this component, can be {TRACE, DEBUG, INFO} +* default value: DEBUG +**/ +public void setLogLevel ( String logLevel) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "logLevel", logLevel); +reinitNecessary = true; +} +/** +* option name: usePropernessChecks +* specifies whether to check for equivalence (i.e. discard equivalent refinements) +* default value: false +**/ +public void setUsePropernessChecks ( boolean usePropernessChecks) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "usePropernessChecks", usePropernessChecks); +reinitNecessary = true; +} +/** +* option name: maxPosOnlyExpansion +* specifies how often a node in the search tree of a posonly learning problem needs to be expanded before it is considered as solution candidate +* default value: 4 +**/ +public void setMaxPosOnlyExpansion ( int maxPosOnlyExpansion) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "maxPosOnlyExpansion", maxPosOnlyExpansion); +reinitNecessary = true; +} +/** +* option name: noisePercentage +* the (approximated) percentage of noise within the examples +* default value: 0.0 +**/ +public void setNoisePercentage ( double noisePercentage) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "noisePercentage", noisePercentage); +reinitNecessary = true; +} +/** +* option name: startClass +* the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) +* default value: null +**/ +public void setStartClass ( String startClass) { +ComponentManager.getInstance().applyConfigEntry(ExampleBasedROLComponent, "startClass", startClass); +reinitNecessary = true; +} + +public boolean isReinitNecessary(){ +return reinitNecessary; +} + + +} Added: trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2008-09-08 11:45:09 UTC (rev 1173) @@ -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.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.reasoning.FastInstanceChecker; + +/** +* automatically generated, do not edit manually +**/ +public class FastInstanceCheckerConfigurator { + +private boolean reinitNecessary = false; +private FastInstanceChecker FastInstanceChecker; + +public FastInstanceCheckerConfigurator (FastInstanceChecker FastInstanceChecker){ +this.FastInstanceChecker = FastInstanceChecker; +} + +/** +**/ +public static FastInstanceChecker getFastInstanceChecker (KnowledgeSource knowledgeSource ) { +FastInstance... [truncated message content] |