From: <jen...@us...> - 2011-08-09 15:47:26
|
Revision: 3020 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3020&view=rev Author: jenslehmann Date: 2011-08-09 15:47:19 +0000 (Tue, 09 Aug 2011) Log Message: ----------- ctd. eval script Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Added Paths: ----------- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java Added: trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/DisjointClassesLearner.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -0,0 +1,63 @@ +/** + * 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.algorithms; + +import java.util.List; + +import org.dllearner.core.ClassExpressionLearningAlgorithm; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; + +/** + * Learns disjoint classes using SPARQL queries. + * + * @author Lorenz Bühmann + * @author Jens Lehmann + * + */ +public class DisjointClassesLearner implements ClassExpressionLearningAlgorithm { + + @Override + public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions( + int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void start() { + // TODO Auto-generated method stub + + } + + @Override + public void init() throws ComponentInitException { + // TODO Auto-generated method stub + + } + +} Added: trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java (rev 0) +++ trunk/components-core/src/main/java/org/dllearner/algorithms/SimpleSubclassLearner.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -0,0 +1,63 @@ +/** + * 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.algorithms; + +import java.util.List; + +import org.dllearner.core.ClassExpressionLearningAlgorithm; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; + +/** + * Learns sub classes using SPARQL queries. + * + * @author Lorenz Bühmann + * @author Jens Lehmann + * + */ +public class SimpleSubclassLearner implements ClassExpressionLearningAlgorithm { + + @Override + public List<Description> getCurrentlyBestDescriptions(int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List<? extends EvaluatedDescription> getCurrentlyBestEvaluatedDescriptions( + int nrOfDescriptions) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void start() { + // TODO Auto-generated method stub + + } + + @Override + public void init() throws ComponentInitException { + // TODO Auto-generated method stub + + } + +} Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-09 12:41:57 UTC (rev 3019) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-09 15:47:19 UTC (rev 3020) @@ -41,6 +41,9 @@ import java.util.prefs.Preferences; import org.apache.log4j.Logger; +import org.dllearner.algorithms.DisjointClassesLearner; +import org.dllearner.algorithms.SimpleSubclassLearner; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.algorithms.properties.EquivalentPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalPropertyAxiomLearner; import org.dllearner.algorithms.properties.PropertyDomainAxiomLearner; @@ -52,6 +55,7 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; +import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; @@ -87,6 +91,7 @@ private int maxClasses = 3; private List<Class<? extends AxiomLearningAlgorithm>> objectPropertyAlgorithms; private List<Class<? extends AxiomLearningAlgorithm>> dataPropertyAlgorithms; + private List<Class<? extends LearningAlgorithm>> classAlgorithms; private String baseURI = "http://dbpedia.org/resource/"; private Map<String,String> prefixes; @@ -118,6 +123,11 @@ dataPropertyAlgorithms.add(PropertyDomainAxiomLearner.class); dataPropertyAlgorithms.add(PropertyRangeAxiomLearner.class); // ? dataPropertyAlgorithms.add(SubPropertyOfAxiomLearner.class); + + classAlgorithms = new LinkedList<Class<? extends LearningAlgorithm>>(); + classAlgorithms.add(DisjointClassesLearner.class); + classAlgorithms.add(SimpleSubclassLearner.class); + classAlgorithms.add(CELOE.class); } private void initDBConnection() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |