From: <jen...@us...> - 2009-02-19 15:25:50
|
Revision: 1618 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1618&view=rev Author: jenslehmann Date: 2009-02-19 15:25:44 +0000 (Thu, 19 Feb 2009) Log Message: ----------- OE algorithm ctd. Modified Paths: -------------- trunk/examples/family/father_oe.owl trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/MultiHeuristic.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Modified: trunk/examples/family/father_oe.owl =================================================================== --- trunk/examples/family/father_oe.owl 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/examples/family/father_oe.owl 2009-02-19 15:25:44 UTC (rev 1618) @@ -36,7 +36,10 @@ <!-- http://example.com/father#hasChild --> - <owl:ObjectProperty rdf:about="#hasChild"/> + <owl:ObjectProperty rdf:about="#hasChild"> + <rdfs:range rdf:resource="#person"/> + <rdfs:domain rdf:resource="#person"/> + </owl:ObjectProperty> @@ -62,6 +65,7 @@ <!-- http://example.com/father#female --> <owl:Class rdf:about="#female"> + <rdfs:subClassOf rdf:resource="#person"/> <owl:disjointWith rdf:resource="#male"/> </owl:Class> @@ -69,10 +73,26 @@ <!-- http://example.com/father#male --> - <owl:Class rdf:about="#male"/> + <owl:Class rdf:about="#male"> + <rdfs:subClassOf rdf:resource="#person"/> + </owl:Class> + <!-- http://example.com/father#person --> + + <owl:Class rdf:about="#person"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + <!-- /////////////////////////////////////////////////////////////////////////////////////// // Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -42,11 +42,13 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Intersection; import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.Restriction; import org.dllearner.core.owl.Thing; import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.owl.ConceptComparator; +import org.dllearner.utilities.owl.ConceptTransformation; import org.dllearner.utilities.owl.EvaluatedDescriptionSet; /** @@ -92,7 +94,8 @@ // utility variables private String baseURI; private Map<String, String> prefixes; - DecimalFormat dfPercent = new DecimalFormat("0.00%"); + private DecimalFormat dfPercent = new DecimalFormat("0.00%"); + private ConceptComparator descriptionComparator = new ConceptComparator(); @Override public Configurator getConfigurator() { @@ -249,7 +252,7 @@ // print solution(s) // logger.info("solution : " + bestDescriptionToString()); - logger.info(getSolutionString()); + logger.info("solutions:\n" + getSolutionString()); // System.out.println(startNode.toTreeString(baseURI)); @@ -300,10 +303,12 @@ nodes.add(node); // maybe add to best descriptions (method keeps set size fixed) - if(checkNode(node)) { - bestEvaluatedDescriptions.add(description, accuracy, learningProblem); +// if(checkNode(node)) { + Description niceDescription = rewriteNode(node); +// Description niceDescription = node.getDescription(); + bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); // System.out.println(bestEvaluatedDescriptions.toString()); - } +// } return true; } @@ -311,35 +316,60 @@ // checks whether the description is allowed private boolean isDescriptionAllowed(Description description) { if(isEquivalenceProblem) { - // for equivalence problems, we need to check that the class we are learning does - // not itself occur on the outermost level (property depth 0) - if(description instanceof NamedClass) { - if(description.equals(classToDescribe)) { + // the class to learn must not appear on the outermost property level + return !occursOnFirstLevel(description, classToDescribe); + } else { + // none of the superclasses of the class to learn must appear on the + // outermost property level + TreeSet<Description> toTest = new TreeSet<Description>(); + toTest.add(classToDescribe); + while(!toTest.isEmpty()) { + Description d = toTest.pollFirst(); + if(occursOnFirstLevel(description, d)) { return false; } - } else if(description.getChildren().size() > 1) { - for(Description child : description.getChildren()) { - if(child.equals(classToDescribe)) { - return false; - } - } + toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d)); } - } else { - + return true; } + } + + // determine whether a named class occurs on the outermost level, i.e. property depth 0 + // (it can still be at higher depth, e.g. if intersections are nested in unions) + private boolean occursOnFirstLevel(Description description, Description clazz) { + if(description instanceof NamedClass) { + if(description.equals(clazz)) { + return true; + } + } - return true; + if(description instanceof Restriction) { + return false; + } + + for(Description child : description.getChildren()) { + if(occursOnFirstLevel(child, clazz)) { + return true; + } + } + + return false; } // check whether the node is a potential solution candidate // (sufficient accuracy; minimal; rewriting steps?) - private boolean checkNode(OENode node) { + private Description rewriteNode(OENode node) { // what to do if super class occurs? either return false, but then it // does not make sense to expand it further; or rewrite but then we have to // take care of double occurrences + Description description = node.getDescription(); + // shorten description (syntactically) + Description niceDescription = ConceptTransformation.getShortConcept(description, descriptionComparator); + // replace \exists r.\top with \exists r.range(r) + ConceptTransformation.replaceRange(niceDescription, reasoner); - return true; + return niceDescription; } private boolean terminationCriteriaSatisfied() { Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -19,6 +19,8 @@ */ package org.dllearner.algorithms.celoe; +import org.dllearner.utilities.owl.ConceptComparator; + /** * Search algorithm heuristic for the ontology engineering algorithm. The heuristic * has a strong bias towards short descriptions (i.e. the algorithm is likely to be @@ -36,6 +38,8 @@ // penalty if a node has very many children since exploring such a node is // computationally very expensive private double nodeChildPenalty = 0.0005; + // syntactic comparison as final comparison criterion + private ConceptComparator conceptComparator = new ConceptComparator(); @Override public int compare(OENode node1, OENode node2) { @@ -45,7 +49,7 @@ else if(diff<0) return -1; else - return 0; + return conceptComparator.compare(node1.getDescription(), node2.getDescription()); } public double getNodeScore(OENode node) { Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/MultiHeuristic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/MultiHeuristic.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/MultiHeuristic.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -121,8 +121,8 @@ else if(diff<0) return -1; else - // TODO: would it be OK to simply return 0 here (?) - // could improve performance a bit + // we cannot return 0 here otherwise different nodes/concepts with the + // same score may be ignored (not added to a set because an equal element exists) return conceptComparator.compare(node1.getConcept(), node2.getConcept()); } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -28,7 +28,6 @@ import org.dllearner.core.LearningProblem; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.ClassLearningProblemConfigurator; -import org.dllearner.core.configurators.PosNegLPStandardConfigurator; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.StringConfigOption; import org.dllearner.core.owl.Description; Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -600,7 +600,7 @@ ObjectProperty op = (ObjectProperty) ope; Description child = description.getChild(0); Map<Individual, SortedSet<Individual>> mapping = opPos.get(op); - SortedSet<Individual> targetSet = getIndividualsImpl(description.getChild(0)); + SortedSet<Individual> targetSet = getIndividualsImpl(child); SortedSet<Individual> returnSet = new TreeSet<Individual>(); int number = ((ObjectCardinalityRestriction) description).getNumber(); Modified: trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -31,7 +31,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.core.Component; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -374,6 +374,12 @@ return concept; } + /** + * Tries to shorten a concept, e.g. male AND male is shortened to male. + * @param concept The input concepts. + * @param conceptComparator A comparator for concepts. + * @return A shortened version of the concept (equal to the input concept if it cannot be shortened). + */ public static Description getShortConcept(Description concept, ConceptComparator conceptComparator) { shorteningTimeNsStart = System.nanoTime(); // deep copy des Konzepts, da es nicht verändert werden darf Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-19 13:55:58 UTC (rev 1617) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-19 15:25:44 UTC (rev 1618) @@ -23,7 +23,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import java.util.SortedSet; import java.util.TreeSet; import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-20 11:25:12
|
Revision: 1620 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1620&view=rev Author: jenslehmann Date: 2009-02-20 11:25:08 +0000 (Fri, 20 Feb 2009) Log Message: ----------- incorporated minimizer in ontology engineering algorithm Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/gui trunk/bin/gui.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/dllearner 2009-02-20 11:25:08 UTC (rev 1620) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/dllearner.bat 2009-02-20 11:25:08 UTC (rev 1620) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\oai4j-0.6b1.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\rdbtoonto\commons-collections-3.2.jar;.\lib\rdbtoonto\commons-configuration-1.4.jar;.\lib\rdbtoonto\commons-lang-2.3.jar;.\lib\rdbtoonto\converter.jar;.\lib\rdbtoonto\mysql-connector-java-5.1.6-bin.jar;.\lib\rdbtoonto\rdbtoonto.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/gui 2009-02-20 11:25:08 UTC (rev 1620) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/oai4j-0.6b1.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/rdbtoonto/commons-collections-3.2.jar:./lib/rdbtoonto/commons-configuration-1.4.jar:./lib/rdbtoonto/commons-lang-2.3.jar:./lib/rdbtoonto/converter.jar:./lib/rdbtoonto/mysql-connector-java-5.1.6-bin.jar:./lib/rdbtoonto/rdbtoonto.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/gui.bat 2009-02-20 11:25:08 UTC (rev 1620) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\oai4j-0.6b1.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\rdbtoonto\commons-collections-3.2.jar;.\lib\rdbtoonto\commons-configuration-1.4.jar;.\lib\rdbtoonto\commons-lang-2.3.jar;.\lib\rdbtoonto\converter.jar;.\lib\rdbtoonto\mysql-connector-java-5.1.6-bin.jar;.\lib\rdbtoonto\rdbtoonto.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/quickstart 2009-02-20 11:25:08 UTC (rev 1620) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/oai4j-0.6b1.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/rdbtoonto/commons-collections-3.2.jar:./lib/rdbtoonto/commons-configuration-1.4.jar:./lib/rdbtoonto/commons-lang-2.3.jar:./lib/rdbtoonto/converter.jar:./lib/rdbtoonto/mysql-connector-java-5.1.6-bin.jar:./lib/rdbtoonto/rdbtoonto.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/quickstart.bat 2009-02-20 11:25:08 UTC (rev 1620) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\oai4j-0.6b1.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\rdbtoonto\commons-collections-3.2.jar;.\lib\rdbtoonto\commons-configuration-1.4.jar;.\lib\rdbtoonto\commons-lang-2.3.jar;.\lib\rdbtoonto\converter.jar;.\lib\rdbtoonto\mysql-connector-java-5.1.6-bin.jar;.\lib\rdbtoonto\rdbtoonto.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/ws 2009-02-20 11:25:08 UTC (rev 1620) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/oai4j-0.6b1.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/rdbtoonto/commons-collections-3.2.jar:./lib/rdbtoonto/commons-configuration-1.4.jar:./lib/rdbtoonto/commons-lang-2.3.jar:./lib/rdbtoonto/converter.jar:./lib/rdbtoonto/mysql-connector-java-5.1.6-bin.jar:./lib/rdbtoonto/rdbtoonto.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/bin/ws.bat 2009-02-20 11:25:08 UTC (rev 1620) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\oai4j-0.6b1.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\rdbtoonto\commons-collections-3.2.jar;.\lib\rdbtoonto\commons-configuration-1.4.jar;.\lib\rdbtoonto\commons-lang-2.3.jar;.\lib\rdbtoonto\converter.jar;.\lib\rdbtoonto\mysql-connector-java-5.1.6-bin.jar;.\lib\rdbtoonto\rdbtoonto.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-20 11:25:08 UTC (rev 1620) @@ -49,6 +49,7 @@ import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.owl.ConceptComparator; import org.dllearner.utilities.owl.ConceptTransformation; +import org.dllearner.utilities.owl.DescriptionMinimizer; import org.dllearner.utilities.owl.EvaluatedDescriptionSet; /** @@ -71,6 +72,7 @@ // private OEHeuristicRuntime heuristicRuntime = new OEHeuristicRuntime(); private RefinementOperator operator; + private DescriptionMinimizer minimizer; // all nodes in the search tree (used for selecting most promising node) private TreeSet<OENode> nodes; @@ -126,7 +128,7 @@ options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); options.add(CommonConfigOptions.useDoubleDatatypes()); - options.add(CommonConfigOptions.maxExecutionTimeInSeconds(1)); + options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10)); options.add(CommonConfigOptions.getNoisePercentage()); options.add(CommonConfigOptions.getMaxDepth(4)); return options; @@ -143,6 +145,8 @@ ClassHierarchy classHierarchy = reasoner.getClassHierarchy().clone(); classHierarchy.thinOutSubsumptionHierarchy(); + minimizer = new DescriptionMinimizer(reasoner); + // create refinement operator operator = new RhoDRDown(reasoner, classHierarchy, configurator); baseURI = reasoner.getBaseURI(); @@ -302,14 +306,23 @@ nodes.add(node); - // maybe add to best descriptions (method keeps set size fixed) -// if(checkNode(node)) { - Description niceDescription = rewriteNode(node); -// Description niceDescription = node.getDescription(); - bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); -// System.out.println(bestEvaluatedDescriptions.toString()); -// } - + // maybe add to best descriptions (method keeps set size fixed); + // we need to make sure that this does not get called more often than + // necessary since rewriting is expensive + boolean isCandidate = (bestEvaluatedDescriptions.size()==0); + if(!isCandidate) { + EvaluatedDescription worst = bestEvaluatedDescriptions.getWorst(); + double accThreshold = worst.getAccuracy(); + isCandidate = + (accuracy > accThreshold || + (accuracy >= accThreshold && description.getLength() < worst.getDescriptionLength())); + } + + if(isCandidate) { + Description niceDescription = rewriteNode(node); + bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); + } + return true; } @@ -357,18 +370,13 @@ } // check whether the node is a potential solution candidate - // (sufficient accuracy; minimal; rewriting steps?) private Description rewriteNode(OENode node) { - - // what to do if super class occurs? either return false, but then it - // does not make sense to expand it further; or rewrite but then we have to - // take care of double occurrences Description description = node.getDescription(); - // shorten description (syntactically) - Description niceDescription = ConceptTransformation.getShortConcept(description, descriptionComparator); - // replace \exists r.\top with \exists r.range(r) +// Description niceDescription = description; + // minimize description (expensive!) + Description niceDescription = minimizer.minimizeClone(description); + // replace \exists r.\top with \exists r.range(r) which is easier to read for humans ConceptTransformation.replaceRange(niceDescription, reasoner); - return niceDescription; } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-20 11:25:08 UTC (rev 1620) @@ -67,6 +67,10 @@ return options; } + public static String getName() { + return "class learning problem"; + } + @Override public void init() { classToDescribe = new NamedClass(configurator.getClassToDescribe()); Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-20 10:56:04 UTC (rev 1619) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-20 11:25:08 UTC (rev 1620) @@ -77,6 +77,10 @@ } } + public boolean isFull() { + return (set.size() >= maxSize); + } + public int size() { return set.size(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-23 08:14:10
|
Revision: 1622 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1622&view=rev Author: jenslehmann Date: 2009-02-23 08:13:57 +0000 (Mon, 23 Feb 2009) Log Message: ----------- - added details to evaluated descriptions for class learning - small CLI improvement Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java Added Paths: ----------- trunk/examples/epc/rs004_oe.conf trunk/examples/epc/sap_epc_oe.owl Added: trunk/examples/epc/rs004_oe.conf =================================================================== --- trunk/examples/epc/rs004_oe.conf (rev 0) +++ trunk/examples/epc/rs004_oe.conf 2009-02-23 08:13:57 UTC (rev 1622) @@ -0,0 +1,7 @@ + +import("sap_epc_oe.owl"); + +problem = classLearning; +classLearning.classToDescribe = "http://localhost/aris/sap_model.owl#EPC_RS004"; + +algorithm = celoe; Added: trunk/examples/epc/sap_epc_oe.owl =================================================================== --- trunk/examples/epc/sap_epc_oe.owl (rev 0) +++ trunk/examples/epc/sap_epc_oe.owl 2009-02-23 08:13:57 UTC (rev 1622) @@ -0,0 +1,314527 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY sap_model "http://localhost/aris/sap_model.owl#" > + <!ENTITY sap_model19 "http://localhost/aris/sap_model.owl#5" > + <!ENTITY sap_model11 "http://localhost/aris/sap_model.owl#6" > + <!ENTITY sap_model6 "http://localhost/aris/sap_model.owl#4" > + <!ENTITY sap_model5 "http://localhost/aris/sap_model.owl#9" > + <!ENTITY sap_model10 "http://localhost/aris/sap_model.owl#8" > + <!ENTITY sap_model2 "http://localhost/aris/sap_model.owl#7" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY sap_model18 "http://localhost/aris/sap_model.owl#51" > + <!ENTITY sap_model22 "http://localhost/aris/sap_model.owl#50" > + <!ENTITY sap_model46 "http://localhost/aris/sap_model.owl#68" > + <!ENTITY sap_model16 "http://localhost/aris/sap_model.owl#69" > + <!ENTITY sap_model28 "http://localhost/aris/sap_model.owl#61" > + <!ENTITY sap_model58 "http://localhost/aris/sap_model.owl#63" > + <!ENTITY sap_model29 "http://localhost/aris/sap_model.owl#66" > + <!ENTITY sap_model4 "http://localhost/aris/sap_model.owl#65" > + <!ENTITY sap_model12 "http://localhost/aris/sap_model.owl#76" > + <!ENTITY sap_model21 "http://localhost/aris/sap_model.owl#77" > + <!ENTITY sap_model35 "http://localhost/aris/sap_model.owl#75" > + <!ENTITY sap_model38 "http://localhost/aris/sap_model.owl#70" > + <!ENTITY sap_model27 "http://localhost/aris/sap_model.owl#78" > + <!ENTITY sap_model33 "http://localhost/aris/sap_model.owl#88" > + <!ENTITY sap_model17 "http://localhost/aris/sap_model.owl#84" > + <!ENTITY sap_model60 "http://localhost/aris/sap_model.owl#95" > + <!ENTITY sap_model13 "http://localhost/aris/sap_model.owl#98" > + <!ENTITY sap_model7 "http://localhost/aris/sap_model.owl#99" > + <!ENTITY sap_model14 "http://localhost/aris/sap_model.owl#96" > + <!ENTITY sap_model56 "http://localhost/aris/sap_model.owl#760" > + <!ENTITY sap_model49 "http://localhost/aris/sap_model.owl#995" > + <!ENTITY sap_model51 "http://localhost/aris/sap_model.owl#991" > + <!ENTITY sap_model52 "http://localhost/aris/sap_model.owl#992" > + <!ENTITY sap_model3 "http://localhost/aris/sap_model.owl#856" > + <!ENTITY sap_model119 "http://localhost/aris/sap_model.owl#855" > + <!ENTITY sap_model78 "http://localhost/aris/sap_model.owl#997" > + <!ENTITY sap_model31 "http://localhost/aris/sap_model.owl#778" > + <!ENTITY sap_model105 "http://localhost/aris/sap_model.owl#972" > + <!ENTITY sap_model24 "http://localhost/aris/sap_model.owl#978" > + <!ENTITY sap_model63 "http://localhost/aris/sap_model.owl#977" > + <!ENTITY sap_model39 "http://localhost/aris/sap_model.owl#771" > + <!ENTITY sap_model15 "http://localhost/aris/sap_model.owl#976" > + <!ENTITY sap_model85 "http://localhost/aris/sap_model.owl#979" > + <!ENTITY sap_model25 "http://localhost/aris/sap_model.owl#773" > + <!ENTITY sap_model40 "http://localhost/aris/sap_model.owl#983" > + <!ENTITY sap_model34 "http://localhost/aris/sap_model.owl#984" > + <!ENTITY sap_model71 "http://localhost/aris/sap_model.owl#985" > + <!ENTITY sap_model36 "http://localhost/aris/sap_model.owl#889" > + <!ENTITY sap_model23 "http://localhost/aris/sap_model.owl#691" > + <!ENTITY sap_model32 "http://localhost/aris/sap_model.owl#692" > + <!ENTITY sap_model30 "http://localhost/aris/sap_model.owl#961" > + <!ENTITY sap_model8 "http://localhost/aris/sap_model.owl#960" > + <!ENTITY sap_model53 "http://localhost/aris/sap_model.owl#508" > + <!ENTITY sap_model62 "http://localhost/aris/sap_model.owl#507" > + <!ENTITY sap_model44 "http://localhost/aris/sap_model.owl#517" > + <!ENTITY sap_model89 "http://localhost/aris/sap_model.owl#516" > + <!ENTITY sap_model121 "http://localhost/aris/sap_model.owl#9730" > + <!ENTITY sap_model91 "http://localhost/aris/sap_model.owl#9601" > + <!ENTITY sap_model67 "http://localhost/aris/sap_model.owl#9600" > + <!ENTITY sap_model131 "http://localhost/aris/sap_model.owl#9603" > + <!ENTITY sap_model153 "http://localhost/aris/sap_model.owl#9602" > + <!ENTITY sap_model59 "http://localhost/aris/sap_model.owl#9605" > + <!ENTITY sap_model170 "http://localhost/aris/sap_model.owl#9604" > + <!ENTITY sap_model174 "http://localhost/aris/sap_model.owl#9607" > + <!ENTITY sap_model72 "http://localhost/aris/sap_model.owl#9606" > + <!ENTITY sap_model127 "http://localhost/aris/sap_model.owl#9609" > + <!ENTITY sap_model116 "http://localhost/aris/sap_model.owl#9608" > + <!ENTITY sap_model178 "http://localhost/aris/sap_model.owl#9610" > + <!ENTITY sap_model95 "http://localhost/aris/sap_model.owl#9614" > + <!ENTITY sap_model148 "http://localhost/aris/sap_model.owl#9613" > + <!ENTITY sap_model90 "http://localhost/aris/sap_model.owl#9612" > + <!ENTITY sap_model185 "http://localhost/aris/sap_model.owl#9611" > + <!ENTITY sap_model48 "http://localhost/aris/sap_model.owl#9618" > + <!ENTITY sap_model142 "http://localhost/aris/sap_model.owl#9617" > + <!ENTITY sap_model112 "http://localhost/aris/sap_model.owl#9616" > + <!ENTITY sap_model68 "http://localhost/aris/sap_model.owl#9615" > + <!ENTITY sap_model198 "http://localhost/aris/sap_model.owl#9619" > + <!ENTITY sap_model196 "http://localhost/aris/sap_model.owl#6939" > + <!ENTITY sap_model175 "http://localhost/aris/sap_model.owl#6934" > + <!ENTITY sap_model54 "http://localhost/aris/sap_model.owl#6933" > + <!ENTITY sap_model180 "http://localhost/aris/sap_model.owl#6932" > + <!ENTITY sap_model154 "http://localhost/aris/sap_model.owl#6931" > + <!ENTITY sap_model37 "http://localhost/aris/sap_model.owl#6938" > + <!ENTITY sap_model99 "http://localhost/aris/sap_model.owl#6937" > + <!ENTITY sap_model69 "http://localhost/aris/sap_model.owl#6936" > + <!ENTITY sap_model128 "http://localhost/aris/sap_model.owl#6935" > + <!ENTITY sap_model163 "http://localhost/aris/sap_model.owl#6930" > + <!ENTITY sap_model150 "http://localhost/aris/sap_model.owl#9980" > + <!ENTITY sap_model76 "http://localhost/aris/sap_model.owl#9841" > + <!ENTITY sap_model123 "http://localhost/aris/sap_model.owl#9840" > + <!ENTITY sap_model177 "http://localhost/aris/sap_model.owl#9843" > + <!ENTITY sap_model179 "http://localhost/aris/sap_model.owl#9842" > + <!ENTITY sap_model94 "http://localhost/aris/sap_model.owl#9845" > + <!ENTITY sap_model70 "http://localhost/aris/sap_model.owl#9844" > + <!ENTITY sap_model194 "http://localhost/aris/sap_model.owl#9847" > + <!ENTITY sap_model65 "http://localhost/aris/sap_model.owl#9846" > + <!ENTITY sap_model55 "http://localhost/aris/sap_model.owl#9849" > + <!ENTITY sap_model193 "http://localhost/aris/sap_model.owl#9848" > + <!ENTITY sap_model100 "http://localhost/aris/sap_model.owl#6919" > + <!ENTITY sap_model82 "http://localhost/aris/sap_model.owl#6917" > + <!ENTITY sap_model47 "http://localhost/aris/sap_model.owl#6918" > + <!ENTITY sap_model156 "http://localhost/aris/sap_model.owl#6916" > + <!ENTITY sap_model135 "http://localhost/aris/sap_model.owl#6915" > + <!ENTITY sap_model115 "http://localhost/aris/sap_model.owl#6914" > + <!ENTITY sap_model176 "http://localhost/aris/sap_model.owl#6913" > + <!ENTITY sap_model88 "http://localhost/aris/sap_model.owl#6912" > + <!ENTITY sap_model98 "http://localhost/aris/sap_model.owl#6911" > + <!ENTITY sap_model77 "http://localhost/aris/sap_model.owl#9852" > + <!ENTITY sap_model143 "http://localhost/aris/sap_model.owl#9851" > + <!ENTITY sap_model151 "http://localhost/aris/sap_model.owl#7736" > + <!ENTITY sap_model184 "http://localhost/aris/sap_model.owl#9850" > + <!ENTITY sap_model126 "http://localhost/aris/sap_model.owl#9856" > + <!ENTITY sap_model182 "http://localhost/aris/sap_model.owl#9855" > + <!ENTITY sap_model197 "http://localhost/aris/sap_model.owl#9854" > + <!ENTITY sap_model138 "http://localhost/aris/sap_model.owl#9853" > + <!ENTITY sap_model186 "http://localhost/aris/sap_model.owl#9859" > + <!ENTITY sap_model144 "http://localhost/aris/sap_model.owl#9858" > + <!ENTITY sap_model79 "http://localhost/aris/sap_model.owl#9857" > + <!ENTITY sap_model122 "http://localhost/aris/sap_model.owl#6928" > + <!ENTITY sap_model42 "http://localhost/aris/sap_model.owl#6929" > + <!ENTITY sap_model109 "http://localhost/aris/sap_model.owl#6925" > + <!ENTITY sap_model84 "http://localhost/aris/sap_model.owl#6924" > + <!ENTITY sap_model124 "http://localhost/aris/sap_model.owl#6927" > + <!ENTITY sap_model191 "http://localhost/aris/sap_model.owl#6926" > + <!ENTITY sap_model171 "http://localhost/aris/sap_model.owl#6921" > + <!ENTITY sap_model87 "http://localhost/aris/sap_model.owl#6920" > + <!ENTITY sap_model73 "http://localhost/aris/sap_model.owl#6923" > + <!ENTITY sap_model168 "http://localhost/aris/sap_model.owl#6922" > + <!ENTITY sap_model158 "http://localhost/aris/sap_model.owl#5085" > + <!ENTITY sap_model66 "http://localhost/aris/sap_model.owl#9795" > + <!ENTITY sap_model104 "http://localhost/aris/sap_model.owl#9794" > + <!ENTITY sap_model92 "http://localhost/aris/sap_model.owl#9797" > + <!ENTITY sap_model152 "http://localhost/aris/sap_model.owl#9796" > + <!ENTITY sap_model97 "http://localhost/aris/sap_model.owl#9799" > + <!ENTITY sap_model145 "http://localhost/aris/sap_model.owl#9798" > + <!ENTITY sap_model106 "http://localhost/aris/sap_model.owl#8575" > + <!ENTITY sap_model20 "http://localhost/aris/sap_model.owl#8576" > + <!ENTITY sap_model188 "http://localhost/aris/sap_model.owl#8573" > + <!ENTITY sap_model50 "http://localhost/aris/sap_model.owl#8574" > + <!ENTITY sap_model137 "http://localhost/aris/sap_model.owl#5086" > + <!ENTITY sap_model125 "http://localhost/aris/sap_model.owl#9786" > + <!ENTITY sap_model141 "http://localhost/aris/sap_model.owl#9785" > + <!ENTITY sap_model189 "http://localhost/aris/sap_model.owl#5087" > + <!ENTITY sap_model139 "http://localhost/aris/sap_model.owl#9784" > + <!ENTITY sap_model81 "http://localhost/aris/sap_model.owl#5088" > + <!ENTITY sap_model114 "http://localhost/aris/sap_model.owl#5089" > + <!ENTITY sap_model111 "http://localhost/aris/sap_model.owl#9783" > + <!ENTITY sap_model132 "http://localhost/aris/sap_model.owl#9789" > + <!ENTITY sap_model45 "http://localhost/aris/sap_model.owl#9788" > + <!ENTITY sap_model74 "http://localhost/aris/sap_model.owl#9787" > + <!ENTITY sap_model181 "http://localhost/aris/sap_model.owl#5090" > + <!ENTITY sap_model118 "http://localhost/aris/sap_model.owl#9983" > + <!ENTITY sap_model183 "http://localhost/aris/sap_model.owl#9984" > + <!ENTITY sap_model155 "http://localhost/aris/sap_model.owl#9981" > + <!ENTITY sap_model149 "http://localhost/aris/sap_model.owl#5092" > + <!ENTITY sap_model140 "http://localhost/aris/sap_model.owl#9982" > + <!ENTITY sap_model199 "http://localhost/aris/sap_model.owl#5091" > + <!ENTITY sap_model169 "http://localhost/aris/sap_model.owl#9792" > + <!ENTITY sap_model108 "http://localhost/aris/sap_model.owl#5094" > + <!ENTITY sap_model133 "http://localhost/aris/sap_model.owl#9793" > + <!ENTITY sap_model113 "http://localhost/aris/sap_model.owl#5093" > + <!ENTITY sap_model187 "http://localhost/aris/sap_model.owl#9790" > + <!ENTITY sap_model9 "http://localhost/aris/sap_model.owl#9985" > + <!ENTITY sap_model83 "http://localhost/aris/sap_model.owl#9791" > + <!ENTITY sap_model134 "http://localhost/aris/sap_model.owl#9776" > + <!ENTITY sap_model190 "http://localhost/aris/sap_model.owl#9777" > + <!ENTITY sap_model57 "http://localhost/aris/sap_model.owl#9778" > + <!ENTITY sap_model195 "http://localhost/aris/sap_model.owl#9779" > + <!ENTITY sap_model167 "http://localhost/aris/sap_model.owl#9772" > + <!ENTITY sap_model26 "http://localhost/aris/sap_model.owl#8560" > + <!ENTITY sap_model173 "http://localhost/aris/sap_model.owl#8561" > + <!ENTITY sap_model165 "http://localhost/aris/sap_model.owl#9773" > + <!ENTITY sap_model157 "http://localhost/aris/sap_model.owl#9774" > + <!ENTITY sap_model96 "http://localhost/aris/sap_model.owl#9775" > + <!ENTITY sap_model166 "http://localhost/aris/sap_model.owl#5177" > + <!ENTITY sap_model103 "http://localhost/aris/sap_model.owl#5176" > + <!ENTITY sap_model43 "http://localhost/aris/sap_model.owl#5175" > + <!ENTITY sap_model192 "http://localhost/aris/sap_model.owl#5174" > + <!ENTITY sap_model136 "http://localhost/aris/sap_model.owl#5179" > + <!ENTITY sap_model146 "http://localhost/aris/sap_model.owl#5178" > + <!ENTITY sap_model107 "http://localhost/aris/sap_model.owl#5180" > + <!ENTITY sap_model101 "http://localhost/aris/sap_model.owl#5181" > + <!ENTITY sap_model164 "http://localhost/aris/sap_model.owl#9780" > + <!ENTITY sap_model64 "http://localhost/aris/sap_model.owl#9782" > + <!ENTITY sap_model110 "http://localhost/aris/sap_model.owl#9781" > + <!ENTITY sap_model117 "http://localhost/aris/sap_model.owl#8570" > + <!ENTITY sap_model93 "http://localhost/aris/sap_model.owl#8571" > + <!ENTITY sap_model75 "http://localhost/aris/sap_model.owl#8572" > + <!ENTITY sap_model160 "http://localhost/aris/sap_model.owl#5170" > + <!ENTITY sap_model41 "http://localhost/aris/sap_model.owl#5171" > + <!ENTITY sap_model80 "http://localhost/aris/sap_model.owl#5172" > + <!ENTITY sap_model161 "http://localhost/aris/sap_model.owl#5173" > + <!ENTITY sap_model172 "http://localhost/aris/sap_model.owl#8563" > + <!ENTITY sap_model159 "http://localhost/aris/sap_model.owl#9771" > + <!ENTITY sap_model162 "http://localhost/aris/sap_model.owl#8562" > + <!ENTITY sap_model61 "http://localhost/aris/sap_model.owl#9770" > + <!ENTITY sap_model129 "http://localhost/aris/sap_model.owl#8565" > + <!ENTITY sap_model86 "http://localhost/aris/sap_model.owl#8564" > + <!ENTITY sap_model102 "http://localhost/aris/sap_model.owl#8567" > + <!ENTITY sap_model130 "http://localhost/aris/sap_model.owl#8566" > + <!ENTITY sap_model147 "http://localhost/aris/sap_model.owl#8569" > + <!ENTITY sap_model120 "http://localhost/aris/sap_model.owl#8568" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://localhost/aris/sap_model.owl#" + xml:base="http://localhost/aris/sap_model.owl" + xmlns:sap_model55="&sap_model;9849" + xmlns:sap_model124="&sap_model;6927" + xmlns:sap_model56="&sap_model;760" + xmlns:sap_model123="&sap_model;9840" + xmlns:sap_model57="&sap_model;9778" + xmlns:sap_model122="&sap_model;6928" + xmlns:sap_model58="&sap_model;63" + xmlns:sap_model121="&sap_model;9730" + xmlns:sap_model51="&sap_model;991" + xmlns:sap_model120="&sap_model;8568" + xmlns:sap_model52="&sap_model;992" + xmlns:sap_model53="&sap_model;508" + xmlns:sap_model54="&sap_model;6933" + xmlns:sap_model129="&sap_model;8565" + xmlns:sap_model50="&sap_model;8574" + xmlns:sap_model128="&sap_model;6935" + xmlns:sap_model127="&sap_model;9609" + xmlns:sap_model126="&sap_model;9856" + xmlns:sap_model125="&sap_model;9786" + xmlns:sap_model59="&sap_model;9605" + xmlns:sap_model46="&sap_model;68" + xmlns:sap_model111="&sap_model;9783" + xmlns:sap_model110="&sap_model;9781" + xmlns:sap_model47="&sap_model;6918" + xmlns:sap_model113="&sap_model;5093" + xmlns:sap_model44="&sap_model;517" + xmlns:sap_model45="&sap_model;9788" + xmlns:sap_model112="&sap_model;9616" + xmlns:sap_model42="&sap_model;6929" + xmlns:sap_model43="&sap_model;5175" + xmlns:sap_model40="&sap_model;983" + xmlns:sap_model41="&sap_model;5171" + xmlns:sap_model119="&sap_model;855" + xmlns:sap_model118="&sap_model;9983" + xmlns:sap_model115="&sap_model;6914" + xmlns:sap_model114="&sap_model;5089" + xmlns:sap_model117="&sap_model;8570" + xmlns:sap_model116="&sap_model;9608" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:sap_model49="&sap_model;995" + xmlns:sap_model48="&sap_model;9618" + xmlns:sap_model73="&sap_model;6923" + xmlns:sap_model142="&sap_model;9617" + xmlns:sap_model74="&sap_model;9787" + xmlns:sap_model141="&sap_model;9785" + xmlns:sap_model75="&sap_model;8572" + xmlns:sap_model140="&sap_model;9982" + xmlns:sap_model76="&sap_model;9841" + xmlns:sap_model146="&sap_model;5178" + xmlns:sap_model77="&sap_model;9852" + xmlns:sap_model145="&sap_model;9798" + xmlns:sap_model78="&sap_model;997" + xmlns:sap_model144="&sap_model;9858" + xmlns:sap_model79="&sap_model;9857" + xmlns:sap_model143="&sap_model;9851" + xmlns:sap_model149="&sap_model;5092" + xmlns:sap_model148="&sap_model;9613" + xmlns:sap_model147="&sap_model;8569" + xmlns:sap_model70="&sap_model;9844" + xmlns:sap_model71="&sap_model;985" + xmlns:sap_model72="&sap_model;9606" + xmlns:sap_model64="&sap_model;9782" + xmlns:sap_model65="&sap_model;9846" + xmlns:sap_model62="&sap_model;507" + xmlns:sap_model131="&sap_model;9603" + xmlns:sap_model63="&sap_model;977" + xmlns:sap_model130="&sap_model;8566" + xmlns:sap_model133="&sap_model;9793" + xmlns:sap_model68="&sap_model;9615" + xmlns:sap_model132="&sap_model;9789" + xmlns:sap_model69="&sap_model;6936" + xmlns:sap_model66="&sap_model;9795" + xmlns:sap_model135="&sap_model;6915" + xmlns:sap_model134="&sap_model;9776" + xmlns:sap_model67="&sap_model;9600" + xmlns:sap_model137="&sap_model;5086" + xmlns:sap_model136="&sap_model;5179" + xmlns:sap_model139="&sap_model;9784" + xmlns:sap_model138="&sap_model;9853" + xmlns:sap_model60="&sap_model;95" + xmlns:sap_model61="&sap_model;9770" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:sap_model92="&sap_model;9797" + xmlns:sap_model91="&sap_model;9601" + xmlns:sap_model94="&sap_model;9845" + xmlns:sap_model93="&sap_model;8571" + xmlns:sap_model169="&sap_model;9792" + xmlns:sap_model90="&sap_model;9612" + xmlns:sap_model167="&sap_model;9772" + xmlns:sap_model168="&sap_model;6922" + xmlns:sap_model99="&sap_model;6937" + xmlns:sap_model165="&sap_model;9773" + xmlns:sap_model166="&sap_model;5177" + xmlns:sap_model96="&sap_model;9775" + xmlns:sap_model163="&sap_model;6930" + xmlns:sap_model164="&sap_model;9780" + xmlns:sap_model95="&sap_model;9614" + xmlns:sap_model161="&sap_model;5173" + xmlns:sap_model98="&sap_model;6911" + xmlns:sap_model162="&sap_model;8562" + xmlns:sap_model97="&sap_model;9799" + xmlns:sap_model171="&sap_model;6921" + xmlns:sap_model170="&sap_model;9604" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:sap_model83="&sap_model;9791" + xmlns:sap_model82="&sap_model;6917" + xmlns:sap_model81="&sap_model;5088" + xmlns:sap_model80="&sap_model;5172" + xmlns:sap_model158="&sap_model;5085" + xmlns:sap_model159="&sap_model;9771" + xmlns:sap_model154="&sap_model;6931" + xmlns:sap_model155="&sap_model;9981" + xmlns:sap_model156="&sap_model;6916" + xmlns:sap_model89="&sap_model;516" + xmlns:sap_model157="&sap_model;9774" + xmlns:sap_model88="&sap_model;6912" + xmlns:sap_model150="&sap_model;9980" + xmlns:sap_model87="&sap_model;6920" + xmlns:sap_model86="&sap_model;8564" + xmlns:sap_model151="&sap_model;7736" + xmlns:sap_model152="&sap_model;9796" + xmlns:sap_model85="&sap_model;979" + xmlns:sap_model153="&sap_model;9602" + xmlns:sap_model84="&sap_model;6924" + xmlns:sap_model160="&sap_model;5170" + xmlns:sap_model185="&sap_model;9611" + xmlns:sap_model186="&sap_model;9859" + xmlns:sap_model183="&sap_model;9984" + xmlns:sap_model184="&sap_model;9850" + xmlns:sap_model189="&sap_model;5087" + xmlns:sap_model187="&sap_model;9790" + xmlns:sap_model188="&sap_model;8573" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:sap_model193="&sap_model;9848" + xmlns:sap_model192="&sap_model;5174" + xmlns:sap_model191="&sap_model;6926" + xmlns:sap_model190="&sap_model;9777" + xmlns:sap_model172="&sap_model;8563" + xmlns:sap_model173="&sap_model;8561" + xmlns:sap_model174="&sap_model;9607" + xmlns:sap_model175="&sap_model;6934" + xmlns:sap_model176="&sap_model;6913" + xmlns:sap_model177="&sap_model;9843" + xmlns:sap_model178="&sap_model;9610" + xmlns:sap_model179="&sap_model;9842" + xmlns:sap_model180="&sap_model;6932" + xmlns:sap_model182="&sap_model;9855" + xmlns:sap_model181="&sap_model;5090" + xmlns:sap_model199="&sap_model;5091" + xmlns:sap_model198="&sap_model;9619" + xmlns:sap_model197="&sap_model;9854" + xmlns:sap_model196="&sap_model;6939" + xmlns:sap_model195="&sap_model;9779" + xmlns:sap_model194="&sap_model;9847" + xmlns:sap_model7="&sap_model;99" + xmlns:sap_model6="&sap_model;4" + xmlns:sap_model5="&sap_model;9" + xmlns:sap_model4="&sap_model;65" + xmlns:sap_model9="&sap_model;9985" + xmlns:sap_model8="&sap_model;960" + xmlns:sap_model3="&sap_model;856" + xmlns:sap_model2="&sap_model;7" + xmlns:sap_model26="&sap_model;8560" + xmlns:sap_model27="&sap_model;78" + xmlns:sap_model28="&sap_model;61" + xmlns:sap_model29="&sap_model;66" + xmlns:sap_model23="&sap_model;691" + xmlns:sap_model22="&sap_model;50" + xmlns:sap_model25="&sap_model;773" + xmlns:sap_model24="&sap_model;978" + xmlns:sap_model21="&sap_model;77" + xmlns:sap_model20="&sap_model;8576" + xmlns:sap_model39="&sap_model;771" + xmlns:sap_model37="&sap_model;6938" + xmlns:sap_model38="&sap_model;70" + xmlns:sap_model36="&sap_model;889" + xmlns:sap_model35="&sap_model;75" + xmlns:sap_model34="&sap_model;984" + xmlns:sap_model33="&sap_model;88" + xmlns:sap_model32="&sap_model;692" + xmlns:sap_model31="&sap_model;778" + xmlns:sap_model30="&sap_model;961" + xmlns:sap_model17="&sap_model;84" + xmlns:sap_model18="&sap_model;51" + xmlns:sap_model15="&sap_model;976" + xmlns:sap_model16="&sap_model;69" + xmlns:sap_model19="&sap_model;5" + xmlns:sap_model107="&sap_model;5180" + xmlns:sap_model10="&sap_model;8" + xmlns:sap_model108="&sap_model;5094" + xmlns:sap_model109="&sap_model;6925" + xmlns:sap_model="http://localhost/aris/sap_model.owl#" + xmlns:sap_model103="&sap_model;5176" + xmlns:sap_model14="&sap_model;96" + xmlns:sap_model104="&sap_model;9794" + xmlns:sap_model13="&sap_model;98" + xmlns:sap_model12="&sap_model;76" + xmlns:sap_model105="&sap_model;972" + xmlns:sap_model106="&sap_model;8575" + xmlns:sap_model11="&sap_model;6" + xmlns:sap_model100="&sap_model;6919" + xmlns:sap_model101="&sap_model;5181" + xmlns:sap_model102="&sap_model;8567"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/aris/sap_model.owl#hasModelElements --> + + <owl:ObjectProperty rdf:about="#hasModelElements"> + <rdfs:label rdf:datatype="&xsd;string" + >hasModelElements</rdfs:label> + <rdfs:domain rdf:resource="#Model"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/aris/sap_model.owl#nextObject --> + + <owl:ObjectProperty rdf:about="#nextObject"> + <rdfs:label rdf:datatype="&xsd;string">nextObject</rdfs:label> + <rdfs:range rdf:resource="#Object"/> + <rdfs:domain rdf:resource="#Object"/> + <owl:inverseOf rdf:resource="#previousObjects"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/aris/sap_model.owl#previousObjects --> + + <owl:ObjectProperty rdf:about="#previousObjects"> + <rdfs:label rdf:datatype="&xsd;string">previousObjects</rdfs:label> + <rdfs:domain rdf:resource="#Object"/> + <rdfs:range rdf:resource="#Object"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/aris/sap_model.owl#sourceObject --> + + <owl:ObjectProperty rdf:about="#sourceObject"> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:label rdf:datatype="&xsd;string">sourceObject</rdfs:label> + <rdfs:domain rdf:resource="#Connection"/> + <rdfs:range rdf:resource="#Object"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/aris/sap_model.owl#targetObject --> + + <owl:ObjectProperty rdf:about="#targetObject"> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:label rdf:datatype="&xsd;string">targetObject</rdfs:label> + <rdfs:domain rdf:resource="#Connection"/> + <rdfs:range rdf:resource="#Object"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Data properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/aris/sap_model.owl#name --> + + <owl:DatatypeProperty rdf:about="#name"> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:label rdf:datatype="&xsd;string">name</rdfs:label> + <rdfs:range rdf:resource="&xsd;string"/> + <rdfs:domain> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="#EPC"/> + <rdf:Description rdf:about="#Event"/> + <rdf:Description rdf:about="#Function"/> + </owl:unionOf> + </owl:Class> + </rdfs:domain> + </owl:DatatypeProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/aris/sap_model.owl#AND --> + + <owl:Class rdf:about="#AND"> + <rdfs:label rdf:datatype="&xsd;string">AND</rdfs:label> + <rdfs:subClassOf rdf:resource="#Rule"/> + <owl:disjointWith rdf:resource="#OR"/> + <owl:disjointWith rdf:resource="#XOR"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Connection --> + + <owl:Class rdf:about="#Connection"> + <rdfs:label rdf:datatype="&xsd;string">Connection</rdfs:label> + <owl:disjointWith rdf:resource="#Model"/> + <owl:disjointWith rdf:resource="#Object"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#EPC --> + + <owl:Class rdf:about="#EPC"> + <rdfs:label rdf:datatype="&xsd;string">EPC</rdfs:label> + <rdfs:subClassOf rdf:resource="#Model"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#EPC_RS002 --> + + <owl:Class rdf:about="#EPC_RS002"> + <rdfs:subClassOf rdf:resource="#EPC"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#EPC_RS004 --> + + <owl:Class rdf:about="#EPC_RS004"> + <rdfs:subClassOf rdf:resource="#EPC"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Event --> + + <owl:Class rdf:about="#Event"> + <rdfs:label rdf:datatype="&xsd;string">Event</rdfs:label> + <rdfs:subClassOf rdf:resource="#Object"/> + <owl:disjointWith rdf:resource="#Function"/> + <owl:disjointWith rdf:resource="#Rule"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Function --> + + <owl:Class rdf:about="#Function"> + <rdfs:label rdf:datatype="&xsd;string">Function</rdfs:label> + <rdfs:subClassOf rdf:resource="#Object"/> + <owl:disjointWith rdf:resource="#Rule"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Model --> + + <owl:Class rdf:about="#Model"> + <rdfs:label rdf:datatype="&xsd;string">Model</rdfs:label> + <owl:disjointWith rdf:resource="#Object"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#OR --> + + <owl:Class rdf:about="#OR"> + <rdfs:label rdf:datatype="&xsd;string">OR</rdfs:label> + <rdfs:subClassOf rdf:resource="#Rule"/> + <owl:disjointWith rdf:resource="#XOR"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Object --> + + <owl:Class rdf:about="#Object"> + <rdfs:label rdf:datatype="&xsd;string">Object</rdfs:label> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#Rule --> + + <owl:Class rdf:about="#Rule"> + <rdfs:label rdf:datatype="&xsd;string">Rule</rdfs:label> + <rdfs:subClassOf rdf:resource="#Object"/> + </owl:Class> + + + + <!-- http://localhost/aris/sap_model.owl#XOR --> + + <owl:Class rdf:about="#XOR"> + <rdfs:label rdf:datatype="&xsd;string">XOR</rdfs:label> + <rdfs:subClassOf rdf:resource="#Rule"/> + </owl:Class> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/aris/sap_model.owl#4ht3__6_____u__ --> + + <EPC rdf:about="#4ht3__6_____u__"> + <name + >Investment_Support</name> + <hasModelElements rdf:resource="#4ht4__6_____x__"/> + <hasModelElements rdf:resource="#4ht5__6_____x__"/> + <hasModelElements rdf:resource="#4ht6__6_____x__"/> + <hasModelElements rdf:resource="#4ht7__6_____x__"/> + <hasModelElements rdf:resource="#4ht8__6_____x__"/> + <hasModelElements rdf:resource="#4ht9__6_____y__"/> + <hasModelElements rdf:resource="#4hta__6_____y__"/> + <hasModelElements rdf:resource="#4htb__6_____y__"/> + <hasModelElements rdf:resource="#4htc__6_____y__"/> + </EPC> + + + + <!-- http://localhost/aris/sap_model.owl#4ht4__6_____x__ --> + + <Event rdf:about="#4ht4__6_____x__"> + <name + >Claim_for_support_exists</name> + <nextObject rdf:resource="#4ht5__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4ht5__6_____x__ --> + + <OR rdf:about="#4ht5__6_____x__"> + <nextObject rdf:resource="#4ht6__6_____x__"/> + </OR> + + + + <!-- http://localhost/aris/sap_model.owl#4ht6__6_____x__ --> + + <Function rdf:about="#4ht6__6_____x__"> + <name + >Application_for_Investment_Support</name> + <nextObject rdf:resource="#4ht7__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4ht7__6_____x__ --> + + <Event rdf:about="#4ht7__6_____x__"> + <name + >Investment_support_is_posted</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4ht8__6_____x__ --> + + <Event rdf:about="#4ht8__6_____x__"> + <name + >Investment_support_was_created__changed</name> + <nextObject rdf:resource="#4ht5__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4ht9__6_____y__ --> + + <rdf:Description rdf:about="#4ht9__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4hta__6_____y__ --> + + <rdf:Description rdf:about="#4hta__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4htb__6_____y__ --> + + <rdf:Description rdf:about="#4htb__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4htc__6_____y__ --> + + <rdf:Description rdf:about="#4htc__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i08__6_____u__ --> + + <EPC rdf:about="#4i08__6_____u__"> + <name + >Specific_Valuations</name> + <hasModelElements rdf:resource="#4i09__6_____x__"/> + <hasModelElements rdf:resource="#4i0a__6_____x__"/> + <hasModelElements rdf:resource="#4i0b__6_____x__"/> + <hasModelElements rdf:resource="#4i0c__6_____x__"/> + <hasModelElements rdf:resource="#4i0d__6_____x__"/> + <hasModelElements rdf:resource="#4i0e__6_____x__"/> + <hasModelElements rdf:resource="#4i0f__6_____x__"/> + <hasModelElements rdf:resource="#4i0g__6_____x__"/> + <hasModelElements rdf:resource="#4i0h__6_____x__"/> + <hasModelElements rdf:resource="#4i0i__6_____x__"/> + <hasModelElements rdf:resource="#4i0j__6_____x__"/> + <hasModelElements rdf:resource="#4i0k__6_____x__"/> + <hasModelElements rdf:resource="#4i0l__6_____x__"/> + <hasModelElements rdf:resource="#4i0m__6_____y__"/> + <hasModelElements rdf:resource="#4i0n__6_____y__"/> + <hasModelElements rdf:resource="#4i0o__6_____y__"/> + <hasModelElements rdf:resource="#4i0p__6_____y__"/> + <hasModelElements rdf:resource="#4i0q__6_____y__"/> + <hasModelElements rdf:resource="#4i0r__6_____y__"/> + <hasModelElements rdf:resource="#4i0s__6_____y__"/> + <hasModelElements rdf:resource="#4i0t__6_____y__"/> + <hasModelElements rdf:resource="#4i0u__6_____y__"/> + <hasModelElements rdf:resource="#4i0v__6_____y__"/> + <hasModelElements rdf:resource="#4i0w__6_____y__"/> + <hasModelElements rdf:resource="#4i0x__6_____y__"/> + </EPC> + + + + <!-- http://localhost/aris/sap_model.owl#4i09__6_____x__ --> + + <Event rdf:about="#4i09__6_____x__"> + <name + >Revaluation_should_be_carr__out_f_first_time</name> + <nextObject rdf:resource="#4i0f__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0a__6_____x__ --> + + <Function rdf:about="#4i0a__6_____x__"> + <name + >Closing_of_Insurance_Contract</name> + <nextObject rdf:resource="#4i0j__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i0b__6_____x__ --> + + <Event rdf:about="#4i0b__6_____x__"> + <name + >Insurance_contract_was_closed</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0c__6_____x__ --> + + <Event rdf:about="#4i0c__6_____x__"> + <name + >Index_series_was_updated</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0d__6_____x__ --> + + <Event rdf:about="#4i0d__6_____x__"> + <name + >Fixed_asset_should_be_insured</name> + <nextObject rdf:resource="#4i0a__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0e__6_____x__ --> + + <XOR rdf:about="#4i0e__6_____x__"> + <nextObject rdf:resource="#4i0b__6_____x__"/> + <nextObject rdf:resource="#4i0c__6_____x__"/> + <nextObject rdf:resource="#4i0l__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i0f__6_____x__ --> + + <XOR rdf:about="#4i0f__6_____x__"> + <nextObject rdf:resource="#4i0h__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i0g__6_____x__ --> + + <Event rdf:about="#4i0g__6_____x__"> + <name + >Index_series_must_be_updated</name> + <nextObject rdf:resource="#4i0i__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0h__6_____x__ --> + + <Function rdf:about="#4i0h__6_____x__"> + <name>Revaluation</name> + <nextObject rdf:resource="#4i0j__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i0i__6_____x__ --> + + <Function rdf:about="#4i0i__6_____x__"> + <name>Index_Series</name> + <nextObject rdf:resource="#4i0j__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i0j__6_____x__ --> + + <XOR rdf:about="#4i0j__6_____x__"> + <nextObject rdf:resource="#4i0e__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i0k__6_____x__ --> + + <Event rdf:about="#4i0k__6_____x__"> + <name + >Revaluation_is_used_repeatedly</name> + <nextObject rdf:resource="#4i0f__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0l__6_____x__ --> + + <Event rdf:about="#4i0l__6_____x__"> + <name + >Revaluation_was_made</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i0m__6_____y__ --> + + <rdf:Description rdf:about="#4i0m__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0n__6_____y__ --> + + <rdf:Description rdf:about="#4i0n__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0o__6_____y__ --> + + <rdf:Description rdf:about="#4i0o__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0p__6_____y__ --> + + <rdf:Description rdf:about="#4i0p__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0q__6_____y__ --> + + <rdf:Description rdf:about="#4i0q__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0r__6_____y__ --> + + <rdf:Description rdf:about="#4i0r__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0s__6_____y__ --> + + <rdf:Description rdf:about="#4i0s__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0t__6_____y__ --> + + <rdf:Description rdf:about="#4i0t__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0u__6_____y__ --> + + <rdf:Description rdf:about="#4i0u__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0v__6_____y__ --> + + <rdf:Description rdf:about="#4i0v__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0w__6_____y__ --> + + <rdf:Description rdf:about="#4i0w__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i0x__6_____y__ --> + + <rdf:Description rdf:about="#4i0x__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i4i__6_____u__ --> + + <EPC rdf:about="#4i4i__6_____u__"> + <name + >Asset_Maintenance</name> + <hasModelElements rdf:resource="#4i4j__6_____x__"/> + <hasModelElements rdf:resource="#4i4k__6_____x__"/> + <hasModelElements rdf:resource="#4i4l__6_____x__"/> + <hasModelElements rdf:resource="#4i4m__6_____x__"/> + <hasModelElements rdf:resource="#4i4n__6_____x__"/> + <hasModelElements rdf:resource="#4i4o__6_____x__"/> + <hasModelElements rdf:resource="#4i4p__6_____x__"/> + <hasModelElements rdf:resource="#4i4q__6_____x__"/> + <hasModelElements rdf:resource="#4i4r__6_____x__"/> + <hasModelElements rdf:resource="#4i4s__6_____x__"/> + <hasModelElements rdf:resource="#4i4t__6_____x__"/> + <hasModelElements rdf:resource="#4i4u__6_____x__"/> + <hasModelElements rdf:resource="#4i4v__6_____x__"/> + <hasModelElements rdf:resource="#4i4w__6_____x__"/> + <hasModelElements rdf:resource="#4i4x__6_____x__"/> + <hasModelElements rdf:resource="#4i4y__6_____x__"/> + <hasModelElements rdf:resource="#4i4z__6_____x__"/> + <hasModelElements rdf:resource="#4i50__6_____x__"/> + <hasModelElements rdf:resource="#4i51__6_____x__"/> + <hasModelElements rdf:resource="#4i52__6_____x__"/> + <hasModelElements rdf:resource="#4i53__6_____x__"/> + <hasModelElements rdf:resource="#4i54__6_____x__"/> + <hasModelElements rdf:resource="#4i55__6_____x__"/> + <hasModelElements rdf:resource="#4i56__6_____x__"/> + <hasModelElements rdf:resource="#4i57__6_____x__"/> + <hasModelElements rdf:resource="#4i58__6_____x__"/> + <hasModelElements rdf:resource="#4i59__6_____x__"/> + <hasModelElements rdf:resource="#4i5a__6_____x__"/> + <hasModelElements rdf:resource="#4i5b__6_____x__"/> + <hasModelElements rdf:resource="#4i5c__6_____x__"/> + <hasModelElements rdf:resource="#4i5d__6_____x__"/> + <hasModelElements rdf:resource="#4i5e__6_____x__"/> + <hasModelElements rdf:resource="#4i5f__6_____x__"/> + <hasModelElements rdf:resource="#4i5g__6_____x__"/> + <hasModelElements rdf:resource="#4i5h__6_____x__"/> + <hasModelElements rdf:resource="#4i5i__6_____x__"/> + <hasModelElements rdf:resource="#4i5j__6_____x__"/> + <hasModelElements rdf:resource="#4i5k__6_____x__"/> + <hasModelElements rdf:resource="#4i5l__6_____x__"/> + <hasModelElements rdf:resource="#4i5m__6_____x__"/> + <hasModelElements rdf:resource="#4i5n__6_____x__"/> + <hasModelElements rdf:resource="#4i5o__6_____y__"/> + <hasModelElements rdf:resource="#4i5p__6_____y__"/> + <hasModelElements rdf:resource="#4i5q__6_____y__"/> + <hasModelElements rdf:resource="#4i5r__6_____y__"/> + <hasModelElements rdf:resource="#4i5s__6_____y__"/> + <hasModelElements rdf:resource="#4i5t__6_____y__"/> + <hasModelElements rdf:resource="#4i5u__6_____y__"/> + <hasModelElements rdf:resource="#4i5v__6_____y__"/> + <hasModelElements rdf:resource="#4i5w__6_____y__"/> + <hasModelElements rdf:resource="#4i5x__6_____y__"/> + <hasModelElements rdf:resource="#4i5y__6_____y__"/> + <hasModelElements rdf:resource="#4i5z__6_____y__"/> + <hasModelElements rdf:resource="#4i60__6_____y__"/> + <hasModelElements rdf:resource="#4i61__6_____y__"/> + <hasModelElements rdf:resource="#4i62__6_____y__"/> + <hasModelElements rdf:resource="#4i63__6_____y__"/> + <hasModelElements rdf:resource="#4i64__6_____y__"/> + <hasModelElements rdf:resource="#4i65__6_____y__"/> + <hasModelElements rdf:resource="#4i66__6_____y__"/> + <hasModelElements rdf:resource="#4i67__6_____y__"/> + <hasModelElements rdf:resource="#4i68__6_____y__"/> + <hasModelElements rdf:resource="#4i69__6_____y__"/> + <hasModelElements rdf:resource="#4i6a__6_____y__"/> + <hasModelElements rdf:resource="#4i6b__6_____y__"/> + <hasModelElements rdf:resource="#4i6c__6_____y__"/> + <hasModelElements rdf:resource="#4i6d__6_____y__"/> + <hasModelElements rdf:resource="#4i6e__6_____y__"/> + <hasModelElements rdf:resource="#4i6f__6_____y__"/> + <hasModelElements rdf:resource="#4i6g__6_____y__"/> + <hasModelElements rdf:resource="#4i6h__6_____y__"/> + <hasModelElements rdf:resource="#4i6i__6_____y__"/> + <hasModelElements rdf:resource="#4i6j__6_____y__"/> + <hasModelElements rdf:resource="#4i6k__6_____y__"/> + <hasModelElements rdf:resource="#4i6l__6_____y__"/> + <hasModelElements rdf:resource="#4i6m__6_____y__"/> + <hasModelElements rdf:resource="#4i6n__6_____y__"/> + <hasModelElements rdf:resource="#4i6o__6_____y__"/> + <hasModelElements rdf:resource="#4i6p__6_____y__"/> + <hasModelElements rdf:resource="#4i6q__6_____y__"/> + <hasModelElements rdf:resource="#4i6r__6_____y__"/> + <hasModelElements rdf:resource="#4i6s__6_____y__"/> + <hasModelElements rdf:resource="#4i6t__6_____y__"/> + <hasModelElements rdf:resource="#4i6u__6_____y__"/> + </EPC> + + + + <!-- http://localhost/aris/sap_model.owl#4i4j__6_____x__ --> + + <OR rdf:about="#4i4j__6_____x__"> + <nextObject rdf:resource="#4i4o__6_____x__"/> + <nextObject rdf:resource="#4i4w__6_____x__"/> + <nextObject rdf:resource="#4i59__6_____x__"/> + <nextObject rdf:resource="#4i5d__6_____x__"/> + </OR> + + + + <!-- http://localhost/aris/sap_model.owl#4i4k__6_____x__ --> + + <Event rdf:about="#4i4k__6_____x__"> + <name + >Post_capitalization_to_be_posted</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4l__6_____x__ --> + + <Event rdf:about="#4i4l__6_____x__"> + <name + >Revaluation_should_be_carr__out_f_first_time</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4m__6_____x__ --> + + <XOR rdf:about="#4i4m__6_____x__"> + <nextObject rdf:resource="#4i4s__6_____x__"/> + <nextObject rdf:resource="#4i5i__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i4n__6_____x__ --> + + <XOR rdf:about="#4i4n__6_____x__"> + <nextObject rdf:resource="#4i5b__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i4o__6_____x__ --> + + <Event rdf:about="#4i4o__6_____x__"> + <name + >Worklist_was_created</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4p__6_____x__ --> + + <Function rdf:about="#4i4p__6_____x__"> + <name>Asset_Shutdown</name> + <nextObject rdf:resource="#4i5e__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i4q__6_____x__ --> + + <Function rdf:about="#4i4q__6_____x__"> + <name + >Creation_of_Group_Asset</name> + <nextObject rdf:resource="#4i5f__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i4r__6_____x__ --> + + <Event rdf:about="#4i4r__6_____x__"> + <name + >Claim_for_support_exists</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4s__6_____x__ --> + + <Event rdf:about="#4i4s__6_____x__"> + <name + >Assign_asset_to_building__if_required</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4t__6_____x__ --> + + <Event rdf:about="#4i4t__6_____x__"> + <name + >Fixed_asset_was_given</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4u__6_____x__ --> + + <Event rdf:about="#4i4u__6_____x__"> + <name + >Depreciation_should_be_posted_regularly</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4v__6_____x__ --> + + <Event rdf:about="#4i4v__6_____x__"> + <name + >Fixed_asset_was_bought_w_o_purchase_order</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4w__6_____x__ --> + + <Event rdf:about="#4i4w__6_____x__"> + <name + >Depreciation_terms_should_be_changed</name> + <nextObject rdf:resource="#4i51__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4x__6_____x__ --> + + <Event rdf:about="#4i4x__6_____x__"> + <name + >Mass_changes_were_made</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4y__6_____x__ --> + + <Event rdf:about="#4i4y__6_____x__"> + <name + >An_asset_master_record_should_be_changed</name> + <nextObject rdf:resource="#4i55__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i4z__6_____x__ --> + + <Event rdf:about="#4i4z__6_____x__"> + <name + >Fixed_asset_created</name> + <nextObject rdf:resource="#4i5g__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i50__6_____x__ --> + + <Event rdf:about="#4i50__6_____x__"> + <name + >Retirements_to_be_entered</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i51__6_____x__ --> + + <OR rdf:about="#4i51__6_____x__"> + <nextObject rdf:resource="#4i58__6_____x__"/> + </OR> + + + + <!-- http://localhost/aris/sap_model.owl#4i52__6_____x__ --> + + <Event rdf:about="#4i52__6_____x__"> + <name + >Leased_asset_was_bought</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i53__6_____x__ --> + + <Event rdf:about="#4i53__6_____x__"> + <name + >Group_asset_to_be_created</name> + <nextObject rdf:resource="#4i4q__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i54__6_____x__ --> + + <XOR rdf:about="#4i54__6_____x__"> + <nextObject rdf:resource="#4i4y__6_____x__"/> + <nextObject rdf:resource="#4i5h__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i55__6_____x__ --> + + <XOR rdf:about="#4i55__6_____x__"> + <nextObject rdf:resource="#4i5a__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i56__6_____x__ --> + + <Event rdf:about="#4i56__6_____x__"> + <name + >New_master_record_is_necessary</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i57__6_____x__ --> + + <Event rdf:about="#4i57__6_____x__"> + <name + >Asset_master_record_is_incomplete</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i58__6_____x__ --> + + <Function rdf:about="#4i58__6_____x__"> + <name>Mass_Change</name> + <nextObject rdf:resource="#4i4x__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i59__6_____x__ --> + + <Event rdf:about="#4i59__6_____x__"> + <name + >Several_asset_master_records_should_be_changed</name> + <nextObject rdf:resource="#4i51__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5a__6_____x__ --> + + <Function rdf:about="#4i5a__6_____x__"> + <name + >Asset_Master_Record_Change</name> + <nextObject rdf:resource="#4i5k__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i5b__6_____x__ --> + + <Function rdf:about="#4i5b__6_____x__"> + <name + >Creation_of_Master_Record_for_Tangible_Assets</name> + <nextObject rdf:resource="#4i5f__6_____x__"/> + </Function> + + + + <!-- http://localhost/aris/sap_model.owl#4i5c__6_____x__ --> + + <AND rdf:about="#4i5c__6_____x__"> + <nextObject rdf:resource="#4i4m__6_____x__"/> + <nextObject rdf:resource="#4i4z__6_____x__"/> + </AND> + + + + <!-- http://localhost/aris/sap_model.owl#4i5d__6_____x__ --> + + <Event rdf:about="#4i5d__6_____x__"> + <name + >Cost_center_plan_was_changed</name> + <nextObject rdf:resource="#4i51__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5e__6_____x__ --> + + <Event rdf:about="#4i5e__6_____x__"> + <name + >Asset_shutdown_posted</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5f__6_____x__ --> + + <XOR rdf:about="#4i5f__6_____x__"> + <nextObject rdf:resource="#4i57__6_____x__"/> + <nextObject rdf:resource="#4i5c__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i5g__6_____x__ --> + + <XOR rdf:about="#4i5g__6_____x__"> + <nextObject rdf:resource="#4i4j__6_____x__"/> + <nextObject rdf:resource="#4i4k__6_____x__"/> + <nextObject rdf:resource="#4i4l__6_____x__"/> + <nextObject rdf:resource="#4i4r__6_____x__"/> + <nextObject rdf:resource="#4i4u__6_____x__"/> + <nextObject rdf:resource="#4i50__6_____x__"/> + <nextObject rdf:resource="#4i54__6_____x__"/> + <nextObject rdf:resource="#4i5l__6_____x__"/> + <nextObject rdf:resource="#4i5m__6_____x__"/> + </XOR> + + + + <!-- http://localhost/aris/sap_model.owl#4i5h__6_____x__ --> + + <Event rdf:about="#4i5h__6_____x__"> + <name + >Revaluation_is_necessary_due_to_post_capitalization</name> + <nextObject rdf:resource="#4i55__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5i__6_____x__ --> + + <Event rdf:about="#4i5i__6_____x__"> + <name + >Assign_asset_to_property__if_required</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5j__6_____x__ --> + + <Event rdf:about="#4i5j__6_____x__"> + <name + >Asset_master_record_does_not_exist</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5k__6_____x__ --> + + <Event rdf:about="#4i5k__6_____x__"> + <name + >Fixed_asset_is_changed</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5l__6_____x__ --> + + <Event rdf:about="#4i5l__6_____x__"> + <name + >Asset_s__to_be_shut_down</name> + <nextObject rdf:resource="#4i4p__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5m__6_____x__ --> + + <Event rdf:about="#4i5m__6_____x__"> + <name + >Acquisitions_to_be_entered</name> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5n__6_____x__ --> + + <Event rdf:about="#4i5n__6_____x__"> + <name + >Fixed_asset_was_found</name> + <nextObject rdf:resource="#4i4n__6_____x__"/> + </Event> + + + + <!-- http://localhost/aris/sap_model.owl#4i5o__6_____y__ --> + + <rdf:Description rdf:about="#4i5o__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5p__6_____y__ --> + + <rdf:Description rdf:about="#4i5p__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5q__6_____y__ --> + + <rdf:Description rdf:about="#4i5q__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5r__6_____y__ --> + + <rdf:Description rdf:about="#4i5r__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5s__6_____y__ --> + + <rdf:Description rdf:about="#4i5s__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5t__6_____y__ --> + + <rdf:Description rdf:about="#4i5t__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5u__6_____y__ --> + + <rdf:Description rdf:about="#4i5u__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5v__6_____y__ --> + + <rdf:Description rdf:about="#4i5v__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5w__6_____y__ --> + + <rdf:Description rdf:about="#4i5w__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5x__6_____y__ --> + + <rdf:Description rdf:about="#4i5x__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5y__6_____y__ --> + + <rdf:Description rdf:about="#4i5y__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i5z__6_____y__ --> + + <rdf:Description rdf:about="#4i5z__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i60__6_____y__ --> + + <rdf:Description rdf:about="#4i60__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i61__6_____y__ --> + + <rdf:Description rdf:about="#4i61__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i62__6_____y__ --> + + <rdf:Description rdf:about="#4i62__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i63__6_____y__ --> + + <rdf:Description rdf:about="#4i63__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i64__6_____y__ --> + + <rdf:Description rdf:about="#4i64__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i65__6_____y__ --> + + <rdf:Description rdf:about="#4i65__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i66__6_____y__ --> + + <rdf:Description rdf:about="#4i66__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i67__6_____y__ --> + + <rdf:Description rdf:about="#4i67__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i68__6_____y__ --> + + <rdf:Description rdf:about="#4i68__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i69__6_____y__ --> + + <rdf:Description rdf:about="#4i69__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6a__6_____y__ --> + + <rdf:Description rdf:about="#4i6a__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6b__6_____y__ --> + + <rdf:Description rdf:about="#4i6b__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6c__6_____y__ --> + + <rdf:Description rdf:about="#4i6c__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6d__6_____y__ --> + + <rdf:Description rdf:about="#4i6d__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6e__6_____y__ --> + + <rdf:Description rdf:about="#4i6e__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6f__6_____y__ --> + + <rdf:Description rdf:about="#4i6f__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6g__6_____y__ --> + + <rdf:Description rdf:about="#4i6g__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6h__6_____y__ --> + + <rdf:Description rdf:about="#4i6h__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6i__6_____y__ --> + + <rdf:Description rdf:about="#4i6i__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6j__6_____y__ --> + + <rdf:Description rdf:about="#4i6j__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6k__6_____y__ --> + + <rdf:Description rdf:about="#4i6k__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6l__6_____y__ --> + + <rdf:Description rdf:about="#4i6l__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6m__6_____y__ --> + + <rdf:Description rdf:about="#4i6m__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6n__6_____y__ --> + + <rdf:Description rdf:about="#4i6n__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6o__6_____y__ --> + + <rdf:Description rdf:about="#4i6o__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6p__6_____y__ --> + + <rdf:Description rdf:about="#4i6p__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6q__6_____y__ --> + + <rdf:Description rdf:about="#4i6q__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6r__6_____y__ --> + + <rdf:Description rdf:about="#4i6r__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6s__6_____y__ --> + + <rdf:Description rdf:about="#4i6s__6_____y__"/> + + + + <!-- http://localhost/aris/sap_model.owl#4i6t__6_____y__ --> + + <rdf:Description rdf:about="#4i6t__6_____y__"/> + + + + <!-- http:/... [truncated message content] |
From: <jen...@us...> - 2009-02-24 16:08:32
|
Revision: 1625 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1625&view=rev Author: jenslehmann Date: 2009-02-24 16:08:18 +0000 (Tue, 24 Feb 2009) Log Message: ----------- - class description evaluation for ontology engineering switched to instance checks limited to relevant instances - intelligent random sampling for accuracy estimation such that algorithm scales to larger ontologies; instance checks are only performed until a reasonable estimate of accuracy can be calculated - difficult bug fix in heuristic caused by double occurences of nodes due to very small node score changes after node is added to candidate set - some smaller fixes Modified Paths: -------------- trunk/examples/epc/rs004_oe.conf trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Modified: trunk/examples/epc/rs004_oe.conf =================================================================== --- trunk/examples/epc/rs004_oe.conf 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/examples/epc/rs004_oe.conf 2009-02-24 16:08:18 UTC (rev 1625) @@ -5,3 +5,4 @@ classLearning.classToDescribe = "http://localhost/aris/sap_model.owl#EPC_RS004"; algorithm = celoe; +celoe.maxExecutionTimeInSeconds = 20; Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -28,6 +28,8 @@ import java.util.SortedSet; import java.util.TreeSet; +import javax.sound.midi.SysexMessage; + import org.apache.log4j.Logger; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; @@ -45,6 +47,8 @@ import org.dllearner.core.owl.Restriction; import org.dllearner.core.owl.Thing; import org.dllearner.learningproblems.ClassLearningProblem; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.owl.ConceptComparator; @@ -52,6 +56,9 @@ import org.dllearner.utilities.owl.DescriptionMinimizer; import org.dllearner.utilities.owl.EvaluatedDescriptionSet; +import com.jamonapi.Monitor; +import com.jamonapi.MonitorFactory; + /** * The CELOE (Class Expression Learner for Ontology Engineering) algorithm. * It adapts and extends the standard supervised learning algorithm for the @@ -78,11 +85,13 @@ private TreeSet<OENode> nodes; // root of search tree private OENode startNode; + // the class with which we start the refinement process + private Description startClass; // all descriptions in the search tree plus those which were too weak (for fast redundancy check) private TreeSet<Description> descriptions; - private EvaluatedDescriptionSet bestEvaluatedDescriptions = new EvaluatedDescriptionSet(LearningAlgorithm.MAX_NR_OF_RESULTS); + private EvaluatedDescriptionSet bestEvaluatedDescriptions; private NamedClass classToDescribe; private boolean isEquivalenceProblem; @@ -99,6 +108,9 @@ private DecimalFormat dfPercent = new DecimalFormat("0.00%"); private ConceptComparator descriptionComparator = new ConceptComparator(); + // statistical variables + private int descriptionTests = 0; + @Override public Configurator getConfigurator() { return configurator; @@ -130,7 +142,8 @@ options.add(CommonConfigOptions.useDoubleDatatypes()); options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10)); options.add(CommonConfigOptions.getNoisePercentage()); - options.add(CommonConfigOptions.getMaxDepth(4)); + options.add(CommonConfigOptions.getMaxDepth(7)); + options.add(CommonConfigOptions.maxNrOfResults(10)); return options; } @@ -147,11 +160,28 @@ minimizer = new DescriptionMinimizer(reasoner); + // start class: intersection of super classes for definitions (since it needs to + // capture all instances), but owl:Thing for learning subclasses (since it is + // superfluous to add super classes in this case) + if(isEquivalenceProblem) { + Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); + if(superClasses.size() > 1) { + startClass = new Intersection(new LinkedList<Description>(superClasses)); + } else { + startClass = (Description) superClasses.toArray()[0]; + } + + } else { + startClass = Thing.instance; + } + // create refinement operator - operator = new RhoDRDown(reasoner, classHierarchy, configurator); + operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); baseURI = reasoner.getBaseURI(); prefixes = reasoner.getPrefixes(); + bestEvaluatedDescriptions = new EvaluatedDescriptionSet(configurator.getMaxNrOfResults()); + // we put important parameters in class variables minAcc = configurator.getNoisePercentage()/100d; maxDepth = configurator.getMaxDepth(); @@ -184,25 +214,25 @@ reset(); nanoStartTime = System.nanoTime(); + // test +// Description testD = null; +// try { +//// testD = KBParser.parseConcept("(\"EPC\" AND EXISTS hasModelElements.(\"Function\" AND ALL previousObjects.BOTTOM))", "http://localhost/aris/sap_model.owl#"); +// testD = KBParser.parseConcept("(\"EPC\" AND EXISTS hasModelElements.(\"Function\" AND ALL nextObject.BOTTOM))", "http://localhost/aris/sap_model.owl#"); +// } catch (ParseException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// double val = learningProblem.getAccuracyOrTooWeak(testD, minAcc); +// System.out.println(testD); +// System.out.println(val); +// System.out.println(testD.getDepth()); +// System.exit(0); + // highest accuracy so far double highestAccuracy = 0.0; OENode bestNode; - - // start class: intersection of super classes for definitions (since it needs to - // capture all instances), but owl:Thing for learning subclasses (since it is - // superfluous to add super classes in this case) - Description startClass; - if(isEquivalenceProblem) { - Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); - if(superClasses.size() > 1) { - startClass = new Intersection(new LinkedList<Description>(superClasses)); - } else { - startClass = (Description) superClasses.toArray()[0]; - } - - } else { - startClass = Thing.instance; - } + addNode(startClass, null); int loop = 0; @@ -220,7 +250,9 @@ int horizExp = bestNode.getHorizontalExpansion(); // apply operator - TreeSet<Description> refinements = refineNode(bestNode); + Monitor mon = MonitorFactory.start("refineNode"); + TreeSet<Description> refinements = refineNode(bestNode); + mon.stop(); while(refinements.size() != 0) { // pick element from set @@ -230,8 +262,10 @@ // we ignore all refinements with lower length and too high depth // (this also avoids duplicate node children) if(length > horizExp && refinement.getDepth() <= maxDepth) { - + + Monitor mon2 = MonitorFactory.start("addNode"); boolean added = addNode(refinement, bestNode); + mon2.stop(); // if refinements have the same length, we apply the operator again // (descending the subsumption hierarchy) @@ -249,9 +283,9 @@ } if (stop) { - logger.info("Algorithm stopped.\n"); + logger.info("Algorithm stopped ("+descriptionTests+" descriptions tested).\n"); } else { - logger.info("Algorithm terminated succesfully.\n"); + logger.info("Algorithm terminated succesfully ("+descriptionTests+" descriptions tested).\n"); } // print solution(s) @@ -266,10 +300,14 @@ // expand node horizontically private TreeSet<Description> refineNode(OENode node) { // we have to remove and add the node since its heuristic evaluation changes through the expansion + // (you *must not* include any criteria in the heuristic which are modified outside of this method, + // otherwise you may see rarely occuring but critical false ordering in the nodes set) nodes.remove(node); +// System.out.println("refining: " + node); int horizExp = node.getHorizontalExpansion(); TreeSet<Description> refinements = (TreeSet<Description>) operator.refine(node.getDescription(), horizExp+1); node.incHorizontalExpansion(); + node.setRefinementCount(refinements.size()); nodes.add(node); return refinements; } @@ -291,6 +329,8 @@ // quality of description (return if too weak) double accuracy = learningProblem.getAccuracyOrTooWeak(description, minAcc); + descriptionTests++; +// System.out.println(description + " " + accuracy); if(accuracy == -1) { return false; } @@ -309,7 +349,7 @@ // maybe add to best descriptions (method keeps set size fixed); // we need to make sure that this does not get called more often than // necessary since rewriting is expensive - boolean isCandidate = (bestEvaluatedDescriptions.size()==0); + boolean isCandidate = !bestEvaluatedDescriptions.isFull(); if(!isCandidate) { EvaluatedDescription worst = bestEvaluatedDescriptions.getWorst(); double accThreshold = worst.getAccuracy(); @@ -391,6 +431,7 @@ nodes = new TreeSet<OENode>(new OEHeuristicRuntime()); descriptions = new TreeSet<Description>(new ConceptComparator()); bestEvaluatedDescriptions.getSet().clear(); + descriptionTests = 0; } @Override @@ -419,15 +460,15 @@ } private String getSolutionString() { - int max = 10; +// int max = 10; int current = 1; String str = ""; for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet().descendingSet()) { str += current + ": " + descriptionToString(ed.getDescription()) + " " + dfPercent.format(ed.getAccuracy()) + "\n"; current++; - if(current == max) { - break; - } +// if(current == max) { +// break; +// } } return str; } Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -35,21 +35,28 @@ private double expansionPenaltyFactor = 0.1; // bonus for being better than parent node private double gainBonusFactor = 0.3; - // penalty if a node has very many children since exploring such a node is - // computationally very expensive - private double nodeChildPenalty = 0.0005; + // penalty if a node description has very many refinements since exploring + // such a node is computationally very expensive + private double nodeRefinementPenalty = 0.0001; // syntactic comparison as final comparison criterion private ConceptComparator conceptComparator = new ConceptComparator(); @Override public int compare(OENode node1, OENode node2) { +// System.out.println("node1 " + node1); +// System.out.println("score: " + getNodeScore(node1)); +// System.out.println("node2 " + node2); +// System.out.println("score: " + getNodeScore(node2)); + double diff = getNodeScore(node1) - getNodeScore(node2); - if(diff>0) + + if(diff>0) { return 1; - else if(diff<0) + } else if(diff<0) { return -1; - else + } else { return conceptComparator.compare(node1.getDescription(), node2.getDescription()); + } } public double getNodeScore(OENode node) { @@ -63,7 +70,7 @@ // penalty for horizontal expansion score -= node.getHorizontalExpansion() * expansionPenaltyFactor; // penalty for having many child nodes (stuck prevention) - score -= node.getChildren().size() * nodeChildPenalty; + score -= node.getRefinementCount() * nodeRefinementPenalty; return score; } } Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -53,8 +53,13 @@ private OENode parent; private List<OENode> children = new LinkedList<OENode>(); - DecimalFormat dfPercent = new DecimalFormat("0.00%"); + // the refinement count corresponds to the number of refinements of the + // description in this node - it is a better heuristic indicator than child count + // (and avoids the problem that adding children changes the heuristic value) + private int refinementCount = 0; + private static DecimalFormat dfPercent = new DecimalFormat("0.00%"); + public OENode(OENode parentNode, Description description, double accuracy) { this.parent = parentNode; this.description = description; @@ -113,10 +118,16 @@ String ret = description.toString(baseURI,null) + " ["; ret += "acc:" + dfPercent.format(accuracy) + ", "; ret += "he:" + horizontalExpansion + ", "; - ret += "c:" + children.size() + "]"; + ret += "c:" + children.size() + ", "; + ret += "ref:" + refinementCount + "]"; return ret; - } + } + @Override + public String toString() { + return getShortDescription(null); + } + public String toTreeString() { return toTreeString(0, null).toString(); } @@ -136,5 +147,19 @@ treeString.append(child.toTreeString(depth+1,baseURI)); } return treeString; + } + + /** + * @return the refinementCount + */ + public int getRefinementCount() { + return refinementCount; + } + + /** + * @param refinementCount the refinementCount to set + */ + public void setRefinementCount(int refinementCount) { + this.refinementCount = refinementCount; } } Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -544,11 +544,12 @@ printStatistics(true); + int conceptTests = conceptTestsReasoner + conceptTestsTooWeakList + conceptTestsOverlyGeneralList; if (stop) { - logger.info("Algorithm stopped.\n"); + logger.info("Algorithm stopped ("+conceptTests+" descriptions tested).\n"); } else { - logger.info("Algorithm terminated succesfully.\n"); - } + logger.info("Algorithm terminated succesfully ("+conceptTests+" descriptions tested).\n"); + } totalLearningTime.stop(); isRunning = false; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -140,7 +140,7 @@ /** * maxExecutionTimeInSeconds algorithm will stop after specified seconds. * mandatory: false| reinit necessary: true -* default value: 0 +* default value: 10 * @return int **/ public int getMaxExecutionTimeInSeconds() { @@ -158,12 +158,21 @@ /** * maxDepth maximum depth of description. * mandatory: false| reinit necessary: true -* default value: 3 +* default value: 4 * @return int **/ public int getMaxDepth() { return (Integer) ComponentManager.getInstance().getConfigOptionValue(cELOE, "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(cELOE, "maxNrOfResults") ; +} /** * @param useAllConstructor specifies whether the universal concept constructor is used in the learning algorithm. @@ -249,7 +258,7 @@ /** * @param maxExecutionTimeInSeconds algorithm will stop after specified seconds. * mandatory: false| reinit necessary: true -* default value: 0 +* default value: 10 **/ public void setMaxExecutionTimeInSeconds(int maxExecutionTimeInSeconds) { ComponentManager.getInstance().applyConfigEntry(cELOE, "maxExecutionTimeInSeconds", maxExecutionTimeInSeconds); @@ -267,12 +276,21 @@ /** * @param maxDepth maximum depth of description. * mandatory: false| reinit necessary: true -* default value: 3 +* default value: 4 **/ public void setMaxDepth(int maxDepth) { ComponentManager.getInstance().applyConfigEntry(cELOE, "maxDepth", maxDepth); reinitNecessary = true; } +/** +* @param 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 +**/ +public void setMaxNrOfResults(int maxNrOfResults) { +ComponentManager.getInstance().applyConfigEntry(cELOE, "maxNrOfResults", maxNrOfResults); +reinitNecessary = true; +} /** * true, if this component needs reinitializsation. Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -73,7 +73,7 @@ /** * forallRetrievalSemantics This option controls how to interpret the all quantifier in orall r.C. The standard option isto return all those which do not have an r-filler not in C. The domain semantics is to use thosewhich are in the domain of r and do not have an r-filler not in C. The forallExists semantics is touse those which have at least one r-filler and do not have an r-filler not in C.. * mandatory: false| reinit necessary: true -* default value: forallExists +* default value: standard * @return String **/ public String getForallRetrievalSemantics() { @@ -101,7 +101,7 @@ /** * @param forallRetrievalSemantics This option controls how to interpret the all quantifier in orall r.C. The standard option isto return all those which do not have an r-filler not in C. The domain semantics is to use thosewhich are in the domain of r and do not have an r-filler not in C. The forallExists semantics is touse those which have at least one r-filler and do not have an r-filler not in C.. * mandatory: false| reinit necessary: true -* default value: forallExists +* default value: standard **/ public void setForallRetrievalSemantics(String forallRetrievalSemantics) { ComponentManager.getInstance().applyConfigEntry(fastInstanceChecker, "forallRetrievalSemantics", forallRetrievalSemantics); Modified: trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -19,8 +19,10 @@ */ package org.dllearner.core.options; +import org.dllearner.core.LearningAlgorithm; + /** * Contains methods for creating common configuration options, i.e. options * which are or may be of use for several components. @@ -169,6 +171,13 @@ return new IntegerConfigOption("guaranteeXgoodDescriptions", "algorithm will run until X good (100%) concept descritpions are found",guaranteeXgoodDescriptionsDefault); } + public static IntegerConfigOption maxNrOfResults(int defaultValue) { + IntegerConfigOption opt = new IntegerConfigOption("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).", defaultValue); + opt.setLowerLimit(1); + opt.setUpperLimit(LearningAlgorithm.MAX_NR_OF_RESULTS); + return opt; + } + public static IntegerConfigOption maxClassDescriptionTests() { return new IntegerConfigOption("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.)",maxClassDescriptionTestsDefault); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -20,7 +20,10 @@ package org.dllearner.learningproblems; import java.util.Collection; +import java.util.Collections; import java.util.LinkedList; +import java.util.List; +import java.util.Random; import java.util.Set; import java.util.TreeSet; @@ -51,6 +54,9 @@ private boolean equivalence = true; private ClassLearningProblemConfigurator configurator; + // instances of super classes excluding instances of the class itself + private List<Individual> superClassInstances; + @Override public ClassLearningProblemConfigurator getConfigurator(){ return configurator; @@ -83,6 +89,20 @@ classInstances = reasoner.getIndividuals(classToDescribe); equivalence = (configurator.getType().equals("equivalence")); + + // we compute the instances of the super class to perform + // optimisations later on + Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); + TreeSet<Individual> superClassInstancesTmp = new TreeSet<Individual>(reasoner.getIndividuals()); + for(Description superClass : superClasses) { + superClassInstancesTmp.retainAll(reasoner.getIndividuals(superClass)); + } + superClassInstancesTmp.removeAll(classInstances); + // since we use the instance list for approximations, we want to avoid + // any bias through URI names, so we shuffle the list once pseudo-randomly + superClassInstances = new LinkedList<Individual>(superClassInstancesTmp); + Random rand = new Random(1); + Collections.shuffle(superClassInstances, rand); } /** @@ -148,11 +168,88 @@ return 0.5d * (coverage + protusion); } + @Override + public double getAccuracyOrTooWeak(Description description, double minAccuracy) { + // instead of using the standard operation, we use optimisation + // and approximation here + + // we abort when there are too many uncovered positives + int maxNotCovered = (int) Math.ceil(minAccuracy*classInstances.size()); + int instancesCovered = 0; + int instancesNotCovered = 0; + + for(Individual ind : classInstances) { + if(reasoner.hasType(description, ind)) { + instancesCovered++; +// System.out.println("covered"); + } else { +// System.out.println(ind + " not covered."); + instancesNotCovered ++; + if(instancesNotCovered > maxNotCovered) { + return -1; + } + } + } + + double coverage = instancesCovered/(double)classInstances.size(); + + // we know that a definition candidate is always subclass of the + // intersection of all super classes, so we test only the relevent instances + // (leads to undesired effects for descriptions not following this rule, + // but improves performance a lot); + // for learning a superclass of a defined class, similar observations apply; + + // we only test 10 * instances covered; while this is only an + // approximation, it is unlikely that further tests will have any + // significant impact on the overall accuracy + int maxTests = 10 * instancesCovered; +// int tests = Math.min(maxTests, superClassInstances.size()); + int testsPerformed = 0; + int instancesDescription = 0; + + for(Individual ind : superClassInstances) { + +// System.out.println(ind); + + if(reasoner.hasType(description, ind)) { +// System.out.println("ind: " + ind); + instancesDescription++; + } + + testsPerformed++; + + if(testsPerformed > maxTests) { +// System.out.println(testsPerformed); +// System.out.println("estimating accuracy by random sampling"); + // estimate for the number of instances of the description + instancesDescription = (int) (instancesDescription/(double)testsPerformed * superClassInstances.size()); + break; + } + } + +// System.out.println(description); +// System.out.println("A and C: " + instancesCovered); +// System.out.println("instances description: " + instancesDescription); + + // since we measured/estimated accuracy only on instances outside A (superClassInstances + // does not include instances of A), we need to add it in the denominator + double protusion = instancesCovered/(double)(instancesDescription+instancesCovered); + +// System.out.println(description); +// System.out.println(instancesDescription); +// System.out.println("prot: " + protusion); + + double acc = 0.5d * (coverage + protusion); + +// System.out.println("acc: " + acc); + + return acc; + } + /* (non-Javadoc) * @see org.dllearner.core.LearningProblem#getAccuracyOrTooWeak(org.dllearner.core.owl.Description, double) */ - @Override - public double getAccuracyOrTooWeak(Description description, double minAccuracy) { + public double getAccuracyOrTooWeakStandard(Description description, double minAccuracy) { // since we have to perform a retrieval operation anyway, we cannot easily // get a benefit from the accuracy limit double accuracy = getAccuracy(description); Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -295,7 +295,7 @@ // the union, we return true List<Description> children = description.getChildren(); for (Description child : children) { - if (hasType(child, individual)) { + if (hasTypeImpl(child, individual)) { return true; } } @@ -305,7 +305,7 @@ // the union, we return true List<Description> children = description.getChildren(); for (Description child : children) { - if (!hasType(child, individual)) { + if (!hasTypeImpl(child, individual)) { return false; } } @@ -330,7 +330,7 @@ return false; } for (Individual roleFiller : roleFillers) { - if (hasType(child, roleFiller)) { + if (hasTypeImpl(child, roleFiller)) { return true; } } @@ -355,7 +355,7 @@ return true; } for (Individual roleFiller : roleFillers) { - if (!hasType(child, roleFiller)) { + if (!hasTypeImpl(child, roleFiller)) { return false; } } @@ -395,7 +395,7 @@ int index = 0; for (Individual roleFiller : roleFillers) { index++; - if (hasType(child, roleFiller)) { + if (hasTypeImpl(child, roleFiller)) { nrOfFillers++; if (nrOfFillers == number) { return true; @@ -438,7 +438,7 @@ int index = 0; for (Individual roleFiller : roleFillers) { index++; - if (hasType(child, roleFiller)) { + if (hasTypeImpl(child, roleFiller)) { nrOfFillers++; if (nrOfFillers > number) { return false; Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -187,9 +187,10 @@ this.rs = reasoningService; } - public RhoDRDown(ReasonerComponent reasoner, ClassHierarchy subHierarchy, RefinementOperatorConfigurator configurator) { + public RhoDRDown(ReasonerComponent reasoner, ClassHierarchy subHierarchy, Description startClass, RefinementOperatorConfigurator configurator) { this.rs = reasoner; this.subHierarchy = subHierarchy; + this.startClass = startClass; useCardinalityRestrictions = configurator.getUseCardinalityRestrictions(); // TODO add more options from configurator object init(); Modified: trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -35,6 +35,7 @@ import org.dllearner.parser.ParseException; import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.refinementoperators.RhoDRDown; +import org.dllearner.test.junit.TestOntologies.TestOntology; import org.junit.Test; /** @@ -94,6 +95,26 @@ } } + @Test + public void rhoDRDownTest2() throws ParseException { + ReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.EPC_OE); + baseURI = reasoner.getBaseURI(); + + RhoDRDown op = new RhoDRDown(reasoner); + Description concept = KBParser.parseConcept("(\"http://localhost/aris/sap_model.owl#EPC\" AND EXISTS \"http://localhost/aris/sap_model.owl#hasModelElements\".\"http://localhost/aris/sap_model.owl#Object\")"); + Set<Description> results = op.refine(concept, 6); + + for(Description result : results) { + System.out.println(result); + } + + int desiredResultSize = 141; + if(results.size() != desiredResultSize) { + System.out.println(results.size() + " results found, but should be " + desiredResultSize + "."); + } + assertTrue(results.size()==desiredResultSize); + } + private String uri(String name) { return "\""+baseURI+name+"\""; } Modified: trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -41,7 +41,7 @@ */ public final class TestOntologies { - public enum TestOntology { EMPTY, SIMPLE, SIMPLE_NO_DR, SIMPLE_NO_DISJOINT, SIMPLE_NO_DR_DISJOINT, SIMPLE2, SIMPLE3, R1SUBR2, DATA1, FIVE_ROLES, FATHER_OE }; + public enum TestOntology { EMPTY, SIMPLE, SIMPLE_NO_DR, SIMPLE_NO_DISJOINT, SIMPLE_NO_DR_DISJOINT, SIMPLE2, SIMPLE3, R1SUBR2, DATA1, FIVE_ROLES, FATHER_OE, CARCINOGENESIS, EPC_OE }; public static ReasonerComponent getTestOntology(TestOntology ont) { String kbString = ""; @@ -111,6 +111,10 @@ kbString += "r5(a,b).\n"; } else if(ont.equals(TestOntology.FATHER_OE)) { owlFile = "examples/family/father_oe.owl"; + } else if(ont.equals(TestOntology.CARCINOGENESIS)) { + owlFile = "examples/carcinogenesis/carcinogenesis.owl"; + } else if(ont.equals(TestOntology.EPC_OE)) { + owlFile = "examples/epc/sap_epc_oe.owl"; } try { Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-23 16:08:34 UTC (rev 1624) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-24 16:08:18 UTC (rev 1625) @@ -112,4 +112,11 @@ public String toString() { return set.toString(); } + + /** + * @return the maxSize + */ + public int getMaxSize() { + return maxSize; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-24 16:42:17
|
Revision: 1626 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1626&view=rev Author: jenslehmann Date: 2009-02-24 16:42:10 +0000 (Tue, 24 Feb 2009) Log Message: ----------- cleaned up by removing some code marked as @Deprecated Modified Paths: -------------- trunk/lib/components.ini trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.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/OWLAPIOntologyConfigurator.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/PosNegLPStandardConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyLPConfigurator.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.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 trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java Modified: trunk/lib/components.ini =================================================================== --- trunk/lib/components.ini 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/lib/components.ini 2009-02-24 16:42:10 UTC (rev 1626) @@ -13,7 +13,6 @@ # learning problems org.dllearner.learningproblems.PosNegLPStandard org.dllearner.learningproblems.PosNegLPStrict -org.dllearner.learningproblems.PosNegInclusionLP org.dllearner.learningproblems.PosOnlyLP org.dllearner.learningproblems.ClassLearningProblem # learning algorithms Modified: trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -22,7 +22,6 @@ import java.util.Set; import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.Score; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.learningproblems.ScorePosNeg; Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -28,8 +28,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import javax.sound.midi.SysexMessage; - import org.apache.log4j.Logger; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; @@ -47,8 +45,6 @@ import org.dllearner.core.owl.Restriction; import org.dllearner.core.owl.Thing; import org.dllearner.learningproblems.ClassLearningProblem; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.owl.ConceptComparator; @@ -106,7 +102,7 @@ private String baseURI; private Map<String, String> prefixes; private DecimalFormat dfPercent = new DecimalFormat("0.00%"); - private ConceptComparator descriptionComparator = new ConceptComparator(); +// private ConceptComparator descriptionComparator = new ConceptComparator(); // statistical variables private int descriptionTests = 0; Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -23,8 +23,6 @@ import java.util.LinkedList; import java.util.List; -import org.dllearner.algorithms.refinement2.ExampleBasedNode; -import org.dllearner.algorithms.refinement2.MultiHeuristic; import org.dllearner.core.owl.Description; /** Modified: trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -42,7 +42,6 @@ import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.learningproblems.PosNegLPStrict; -import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.FastRetrievalReasoner; @@ -84,7 +83,6 @@ reasonerMapping.put("fastInstanceChecker", FastInstanceChecker.class); reasonerMapping.put("fastRetrievalReasoner", FastRetrievalReasoner.class); learningProblemMapping.put("posNegDefinitionLP", PosNegLPStandard.class); - learningProblemMapping.put("posNegInclusionLP", PosNegInclusionLP.class); learningProblemMapping.put("posNegDefinitionLPStrict", PosNegLPStrict.class); learningProblemMapping.put("classLearning", ClassLearningProblem.class); learningAlgorithmMapping.put("random", RandomGuesser.class); Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -43,10 +43,6 @@ import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.dllearner.Info; -import org.dllearner.algorithms.BruteForceLearner; -import org.dllearner.algorithms.RandomGuesser; -import org.dllearner.algorithms.gp.GP; -import org.dllearner.algorithms.refinement.ROLearner; import org.dllearner.algorithms.refinement2.ROLComponent2; import org.dllearner.core.Component; import org.dllearner.core.ComponentInitException; @@ -74,7 +70,6 @@ import org.dllearner.kb.OWLFile; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.PosNegLPStandard; -import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.parser.ConfParser; @@ -83,8 +78,6 @@ import org.dllearner.parser.TokenMgrError; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; -import org.dllearner.reasoning.FastRetrievalReasoner; -import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.utilities.Files; import org.dllearner.utilities.Helper; import org.dllearner.utilities.JamonMonitorLogger; @@ -351,36 +344,6 @@ printConclusions(rc, algDuration); } } - - /** - * @deprecated See ConfMapper. - * creates a mapping from components to option prefix strings - */ - @Deprecated - public static Map<Class<? extends Component>, String> createComponentPrefixMapping() { - Map<Class<? extends Component>, String> componentPrefixMapping = new HashMap<Class<? extends Component>, String>(); - // knowledge sources - componentPrefixMapping.put(SparqlKnowledgeSource.class, "sparql"); - // reasoners - componentPrefixMapping.put(DIGReasoner.class, "digReasoner"); - componentPrefixMapping.put(FastInstanceChecker.class, "fastInstanceChecker"); - componentPrefixMapping.put(OWLAPIReasoner.class, "owlAPIReasoner"); - componentPrefixMapping.put(FastRetrievalReasoner.class, "fastRetrieval"); - - // learning problems - configured via + and - flags for examples - componentPrefixMapping.put(PosNegLPStandard.class, "posNegDefinitionLP"); - componentPrefixMapping.put(PosNegInclusionLP.class, "posNegInclusionLP"); - componentPrefixMapping.put(PosOnlyLP.class, "posOnlyDefinitionLP"); - - // learning algorithms - componentPrefixMapping.put(ROLearner.class, "refinement"); - componentPrefixMapping.put(ROLComponent2.class, "refexamples"); - componentPrefixMapping.put(GP.class, "gp"); - componentPrefixMapping.put(BruteForceLearner.class, "bruteForce"); - componentPrefixMapping.put(RandomGuesser.class, "random"); - - return componentPrefixMapping; - } /** * convenience method basically every prefix (e.g. "refinement" in @@ -897,98 +860,4 @@ return rc; } - /** - * @deprecated See ConfMapper. - * @param componentSuperClass - * @return String. - */ - @Deprecated - public static String getCLIMapping(String componentSuperClass){ - HashMap<String, String> m = new HashMap<String, String>(); - m.put("KnowledgeSource", "import"); - m.put("ReasonerComponent", "reasoner"); - m.put("PosNegLP", "problem"); - m.put("PosOnlyLP", "problem"); - m.put("LearningAlgorithm", "algorithm"); - return m.get(componentSuperClass); - } - - /** - * Set Reasoner class. Define here all possible reasoners. - * - * @deprecated See ConfMapper. - * @param reasonerOption - * from config file - * @return reasonerClass reasoner class - */ - @Deprecated - public static Class<? extends ReasonerComponent> getReasonerClass(ConfFileOption reasonerOption) { - Class<? extends ReasonerComponent> reasonerClass = null; - if (reasonerOption == null || reasonerOption.getStringValue().equals("fastInstanceChecker")) - reasonerClass = FastInstanceChecker.class; - else if (reasonerOption.getStringValue().equals("owlAPI")) - reasonerClass = OWLAPIReasoner.class; - else if (reasonerOption.getStringValue().equals("fastRetrieval")) - reasonerClass = FastRetrievalReasoner.class; - else if (reasonerOption.getStringValue().equals("dig")) - reasonerClass = DIGReasoner.class; - else { - handleError("Unknown value " + reasonerOption.getStringValue() - + " for option \"reasoner\"."); - } - return reasonerClass; - } - - /** - * Set LearningProblem class. Define here all possible problems. - * - * @deprecated See ConfMapper. - * @param problemOption - * from config file - * @return lpClass learning problem class - */ - @Deprecated - public static Class<? extends LearningProblem> getLearningProblemClass( - ConfFileOption problemOption) { - Class<? extends LearningProblem> lpClass = null; - if (problemOption == null || problemOption.getStringValue().equals("posNegDefinitionLP")) - lpClass = PosNegLPStandard.class; - else if (problemOption.getStringValue().equals("posNegInclusionLP")) - lpClass = PosNegInclusionLP.class; - else if (problemOption.getStringValue().equals("posOnlyDefinitionLP")) - lpClass = PosOnlyLP.class; - else - handleError("Unknown value " + problemOption.getValue() + " for option \"problem\"."); - - return lpClass; - } - - /** - * Set LearningAlorithm class. Define here all possible learning algorithms. - * - * @deprecated See ConfMapper. - * @param algorithmOption - * from config file - * @return laClass learning algorithm class - */ - @Deprecated - public static Class<? extends LearningAlgorithm> getLearningAlgorithm( - ConfFileOption algorithmOption) { - Class<? extends LearningAlgorithm> laClass = null; - if (algorithmOption == null || algorithmOption.getStringValue().equals("refexamples")) - laClass = ROLComponent2.class; - else if (algorithmOption.getStringValue().equals("refinement")) - laClass = ROLearner.class; - else if (algorithmOption.getStringValue().equals("gp")) - laClass = GP.class; - else if (algorithmOption.getStringValue().equals("bruteForce")) - laClass = BruteForceLearner.class; - else if (algorithmOption.getStringValue().equals("randomGuesser")) - laClass = RandomGuesser.class; - else - handleError("Unknown value in " + algorithmOption); - - return laClass; - } - } Modified: trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/BruteForceLearnerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -33,7 +33,7 @@ public class BruteForceLearnerConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private BruteForceLearner bruteForceLearner; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/CELOEConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -34,7 +34,7 @@ public class CELOEConfigurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private CELOE cELOE; @@ -158,7 +158,7 @@ /** * maxDepth maximum depth of description. * mandatory: false| reinit necessary: true -* default value: 4 +* default value: 7 * @return int **/ public int getMaxDepth() { @@ -276,7 +276,7 @@ /** * @param maxDepth maximum depth of description. * mandatory: false| reinit necessary: true -* default value: 4 +* default value: 7 **/ public void setMaxDepth(int maxDepth) { ComponentManager.getInstance().applyConfigEntry(cELOE, "maxDepth", maxDepth); Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ClassLearningProblemConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -31,7 +31,7 @@ public class ClassLearningProblemConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private ClassLearningProblem classLearningProblem; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ComponentFactory.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -38,7 +38,6 @@ import org.dllearner.kb.OWLFile; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.learningproblems.ClassLearningProblem; -import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.learningproblems.PosNegLPStrict; import org.dllearner.learningproblems.PosOnlyLP; @@ -131,16 +130,6 @@ * @param positiveExamples positive examples * @param negativeExamples negative examples * @param reasoningService see ReasoningService -* @return a component ready for initialization PosNegInclusionLP -**/ -public static PosNegInclusionLP getPosNegInclusionLP(ReasonerComponent reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) { -return PosNegInclusionLPConfigurator.getPosNegInclusionLP(reasoningService, positiveExamples, negativeExamples); -} - -/** -* @param positiveExamples positive examples -* @param negativeExamples negative examples -* @param reasoningService see ReasoningService * @return a component ready for initialization PosNegLPStandard **/ public static PosNegLPStandard getPosNegLPStandard(ReasonerComponent reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) { Modified: trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/DIGReasonerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class DIGReasonerConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private DIGReasoner dIGReasoner; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ELLearningAlgorithmConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -33,7 +33,7 @@ public class ELLearningAlgorithmConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private ELLearningAlgorithm eLLearningAlgorithm; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastInstanceCheckerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class FastInstanceCheckerConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private FastInstanceChecker fastInstanceChecker; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/FastRetrievalReasonerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class FastRetrievalReasonerConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private FastRetrievalReasoner fastRetrievalReasoner; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/GPConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -33,7 +33,7 @@ public class GPConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private GP gP; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/KBFileConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -31,7 +31,7 @@ public class KBFileConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private KBFile kBFile; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIOntologyConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -30,7 +30,7 @@ public class OWLAPIOntologyConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private OWLAPIOntology oWLAPIOntology; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLAPIReasonerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class OWLAPIReasonerConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private OWLAPIReasoner oWLAPIReasoner; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/OWLFileConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -31,7 +31,7 @@ public class OWLFileConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private OWLFile oWLFile; Deleted: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegInclusionLPConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -1,160 +0,0 @@ -/** - * 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.core.ComponentManager; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.learningproblems.PosNegInclusionLP; - -/** -* automatically generated, do not edit manually. -* run org.dllearner.scripts.ConfigJavaGenerator to update -**/ -public class PosNegInclusionLPConfigurator implements Configurator { - -private boolean reinitNecessary = false; -@SuppressWarnings("unused") - -private PosNegInclusionLP posNegInclusionLP; - -/** -* @param posNegInclusionLP see PosNegInclusionLP -**/ -public PosNegInclusionLPConfigurator(PosNegInclusionLP posNegInclusionLP){ -this.posNegInclusionLP = posNegInclusionLP; -} - -/** -* @param reasoningService see reasoningService -* @param positiveExamples positive examples -* @param negativeExamples negative examples -* @return PosNegInclusionLP -**/ -public static PosNegInclusionLP getPosNegInclusionLP(ReasonerComponent reasoningService, Set<String> positiveExamples, Set<String> negativeExamples) { -PosNegInclusionLP component = ComponentManager.getInstance().learningProblem(PosNegInclusionLP.class, reasoningService); -ComponentManager.getInstance().applyConfigEntry(component, "positiveExamples", positiveExamples); -ComponentManager.getInstance().applyConfigEntry(component, "negativeExamples", negativeExamples); -return component; -} - -/** -* positiveExamples positive examples. -* mandatory: true| reinit necessary: false -* default value: null -* @return Set(String) -**/ -@SuppressWarnings("unchecked") -public Set<String> getPositiveExamples() { -return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(posNegInclusionLP, "positiveExamples") ; -} -/** -* negativeExamples negative examples. -* mandatory: true| reinit necessary: false -* default value: null -* @return Set(String) -**/ -@SuppressWarnings("unchecked") -public Set<String> getNegativeExamples() { -return (Set<String>) ComponentManager.getInstance().getConfigOptionValue(posNegInclusionLP, "negativeExamples") ; -} -/** -* useRetrievalForClassficiation Specifies whether to use retrieval or instance checks for testing a concept.. -* mandatory: false| reinit necessary: true -* default value: false -* @return boolean -**/ -public boolean getUseRetrievalForClassficiation() { -return (Boolean) ComponentManager.getInstance().getConfigOptionValue(posNegInclusionLP, "useRetrievalForClassficiation") ; -} -/** -* percentPerLenghtUnit describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one. -* mandatory: false| reinit necessary: true -* default value: 0.05 -* @return double -**/ -public double getPercentPerLenghtUnit() { -return (Double) ComponentManager.getInstance().getConfigOptionValue(posNegInclusionLP, "percentPerLenghtUnit") ; -} -/** -* useMultiInstanceChecks See UseMultiInstanceChecks enum.. -* mandatory: false| reinit necessary: true -* default value: twoChecks -* @return String -**/ -public String getUseMultiInstanceChecks() { -return (String) ComponentManager.getInstance().getConfigOptionValue(posNegInclusionLP, "useMultiInstanceChecks") ; -} - -/** -* @param positiveExamples positive examples. -* mandatory: true| reinit necessary: false -* default value: null -**/ -public void setPositiveExamples(Set<String> positiveExamples) { -ComponentManager.getInstance().applyConfigEntry(posNegInclusionLP, "positiveExamples", positiveExamples); -} -/** -* @param negativeExamples negative examples. -* mandatory: true| reinit necessary: false -* default value: null -**/ -public void setNegativeExamples(Set<String> negativeExamples) { -ComponentManager.getInstance().applyConfigEntry(posNegInclusionLP, "negativeExamples", negativeExamples); -} -/** -* @param useRetrievalForClassficiation Specifies whether to use retrieval or instance checks for testing a concept.. -* mandatory: false| reinit necessary: true -* default value: false -**/ -public void setUseRetrievalForClassficiation(boolean useRetrievalForClassficiation) { -ComponentManager.getInstance().applyConfigEntry(posNegInclusionLP, "useRetrievalForClassficiation", useRetrievalForClassficiation); -reinitNecessary = true; -} -/** -* @param percentPerLenghtUnit describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one. -* mandatory: false| reinit necessary: true -* default value: 0.05 -**/ -public void setPercentPerLenghtUnit(double percentPerLenghtUnit) { -ComponentManager.getInstance().applyConfigEntry(posNegInclusionLP, "percentPerLenghtUnit", percentPerLenghtUnit); -reinitNecessary = true; -} -/** -* @param useMultiInstanceChecks See UseMultiInstanceChecks enum.. -* mandatory: false| reinit necessary: true -* default value: twoChecks -**/ -public void setUseMultiInstanceChecks(String useMultiInstanceChecks) { -ComponentManager.getInstance().applyConfigEntry(posNegInclusionLP, "useMultiInstanceChecks", useMultiInstanceChecks); -reinitNecessary = true; -} - -/** -* true, if this component needs reinitializsation. -* @return boolean -**/ -public boolean isReinitNecessary(){ -return reinitNecessary; -} - - -} Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStandardConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStandardConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStandardConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class PosNegLPStandardConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private PosNegLPStandard posNegLPStandard; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosNegLPStrictConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class PosNegLPStrictConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private PosNegLPStrict posNegLPStrict; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyLPConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyLPConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/PosOnlyLPConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -32,7 +32,7 @@ public class PosOnlyLPConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private PosOnlyLP posOnlyLP; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -34,7 +34,7 @@ public class ROLComponent2Configurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private ROLComponent2 rOLComponent2; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLearnerConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -35,7 +35,7 @@ public class ROLearnerConfigurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private ROLearner rOLearner; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/RandomGuesserConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -33,7 +33,7 @@ public class RandomGuesserConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private RandomGuesser randomGuesser; Modified: trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/configurators/SparqlKnowledgeSourceConfigurator.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -34,7 +34,7 @@ public class SparqlKnowledgeSourceConfigurator implements Configurator { private boolean reinitNecessary = false; -@SuppressWarnings("unused") +@SuppressWarnings("all") private SparqlKnowledgeSource sparqlKnowledgeSource; Modified: trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -85,6 +85,7 @@ /* (non-Javadoc) * @see org.dllearner.core.options.ConfigOption#getAllowedValuesDescription() */ + @Override public String getAllowedValuesDescription() { return getValueTypeAsJavaString() + " "+allowedValues+" "; } Deleted: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -1,230 +0,0 @@ -/** - * Copyright (C) 2007, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.learningproblems; - -import java.util.Set; -import java.util.SortedSet; - -import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.core.configurators.ComponentFactory; -import org.dllearner.core.configurators.PosNegInclusionLPConfigurator; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.Negation; -import org.dllearner.utilities.Helper; -import org.dllearner.utilities.datastructures.SetManipulation; - -/** - * The aim of this learning problem is to find an appropriate inclusion axiom - * given positive and negative examples. - * - * This is similar to the definition learning problem, but here the positive - * and negative examples usually do not follow when the inclusion is added to - * the knowledge base. This raises the question how the quality of a concept - * with respect to this learning problem can be measured. Due to the fact that - * the inclusion does not entail examples, we have to look at the negation of - * the concept we are looking at. For a good solution it is the case that - * no positive examples follow from the negated concept, the negative - * examples follow from it. This means that the standard definition learning - * problem and the inclusion learning problem can be seen as two possible - * weakenings of the strict definition learning problem. (Of course, both problems - * can yield the same solution.) - * - * @author Jens Lehmann - * - */ -@Deprecated -public class PosNegInclusionLP extends PosNegLP { - - private PosNegLPStandard definitionLP; - private PosNegInclusionLPConfigurator configurator; - - @Override - public PosNegInclusionLPConfigurator getConfigurator(){ - return configurator; - } - - public PosNegInclusionLP(ReasonerComponent reasoningService) { - super(reasoningService); - configurator = new PosNegInclusionLPConfigurator(this); - } -/* - public static Collection<ConfigOption<?>> createConfigOptions() { - Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); - options.add(new StringSetConfigOption("positiveExamples", - "positive examples")); - options.add(new StringSetConfigOption("negativeExamples", - "negative examples")); - options.add(new BooleanConfigOption("useRetrievalForClassficiation", - "Specifies whether to use retrieval or instance checks for testing a concept.")); - return options; - } -*/ - /* - * (non-Javadoc) - * - * @see org.dllearner.core.Component#getName() - */ - public static String getName() { - return "two valued inclusion learning problem"; - } - - - /* - * (non-Javadoc) - * - * @see org.dllearner.core.Component#init() - */ - @Override - public void init() { - super.init(); - definitionLP = ComponentFactory.getPosNegLPStandard( - reasoner, - SetManipulation.indToString(negativeExamples), - SetManipulation.indToString(positiveExamples)); - //definitionLP = new PosNegDefinitionLP(reasoningService, negativeExamples, positiveExamples); - // TODO: we must make sure that the problem also gets the same - // reasoning options (i.e. options are the same up to reversed example sets) - definitionLP.init(); - } - - /** - * See the documentation of <code>coveredNegativeExamplesOrTooWeak</code> in - * the definition learning problem case. This method works differently: - * First, it tests whether none of the positive examples is covered by the - * negation of the given concept. Should this be the case, it returns - * too weak. If this is not the case, the method returns the number of - * negative examples, which do not follow from the negation of the input - * concept. Thus, this methods uses a different notion of coverage than - * the one for the standard definition learning problem. - * - * @see org.dllearner.learningproblems.PosNegLP.UseMultiInstanceChecks - * @param concept - * The concept to test. - * @return -1 if concept is too weak and the number of covered negative - * examples otherwise. - */ - @Override - public int coveredNegativeExamplesOrTooWeak(Description concept) { - - if (useRetrievalForClassification) { - SortedSet<Individual> inNegatedConcept = reasoner.getIndividuals(new Negation(concept)); - - for (Individual posExample : positiveExamples) { - // if any positive example follows from the negation, then - // the concept is "too weak" - if (inNegatedConcept.contains(posExample)) - return -1; - } - - // number of covered negatives - // cover = neg. example does not belong to the negated concept - SortedSet<Individual> negExInNegatedConcept = Helper.intersection(negativeExamples, inNegatedConcept); - return (negativeExamples.size() - negExInNegatedConcept.size()); - } else { - if (useMultiInstanceChecks != UseMultiInstanceChecks.NEVER) { - // two checks - if (useMultiInstanceChecks == UseMultiInstanceChecks.TWOCHECKS) { - Set<Individual> posExInNegatedConcept = reasoner.hasType(new Negation(concept), positiveExamples); - - if(posExInNegatedConcept.size()>0) { - return -1; - } else { - Set<Individual> negExInNegatedConcept = reasoner.hasType(new Negation(concept), negativeExamples); - return (negativeExamples.size() - negExInNegatedConcept.size()); - } - - // one check - } else { - Set<Individual> inNegatedConcept = reasoner.hasType(new Negation(concept), allExamples); - - for(Individual i : positiveExamples) { - if(inNegatedConcept.contains(i)) - return -1; - } - - // we can now be sure that inNegatedConcept contains only - // negative examples - return (negativeExamples.size() - inNegatedConcept.size()); - - } - // single instance checks - } else { - int coverCount = negativeExamples.size(); - - for (Individual example : positiveExamples) { - if (reasoner.hasType(new Negation(concept), example)) - return -1; - } - for (Individual example : negativeExamples) { - if (!reasoner.hasType(new Negation(concept), example)) - coverCount--; - } - - return coverCount; - } - } - } - - /** - * Calls the same method on the standard definition learning problem, but - * negates the concept before and permutes positive and negative examples. - * - * @see org.dllearner.core.LearningProblem#computeScore(org.dllearner.core.owl.Description) - */ - @Override - public ScorePosNeg computeScore(Description concept) { - // FastInstanceChecker supports only negation normal form, so we have to make - // sure to convert the description before -// if(reasoner instanceof FastInstanceChecker) { -// return definitionLP.computeScore(ConceptTransformation.transformToNegationNormalForm(new Negation(concept))); -// } - return definitionLP.computeScore(new Negation(concept)); - } - - /* (non-Javadoc) - * @see org.dllearner.core.LearningProblem#getAccuracy(org.dllearner.core.owl.Description) - */ - @Override - public double getAccuracy(Description description) { - // TODO Auto-generated method stub - return 0; - } - - /* (non-Javadoc) - * @see org.dllearner.core.LearningProblem#getAccuracyOrTooWeak(org.dllearner.core.owl.Description, double) - */ - @Override - public double getAccuracyOrTooWeak(Description description, double minAccuracy) { - // TODO Auto-generated method stub - return 0; - } - - /* (non-Javadoc) - * @see org.dllearner.core.LearningProblem#evaluate(org.dllearner.core.owl.Description) - */ - @Override - public EvaluatedDescription evaluate(Description description) { - // TODO Auto-generated method stub - return null; - } - -} Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -642,7 +642,7 @@ ObjectProperty op = (ObjectProperty) ope; Description child = description.getChild(0); Map<Individual, SortedSet<Individual>> mapping = opPos.get(op); - SortedSet<Individual> targetSet = getIndividualsImpl(description.getChild(0)); + SortedSet<Individual> targetSet = getIndividualsImpl(child); // initially all individuals are in the return set and we then remove those // with too many fillers SortedSet<Individual> returnSet = (SortedSet<Individual>) individuals.clone(); Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2009-02-24 16:08:18 UTC (rev 1625) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2009-02-24 16:42:10 UTC (rev 1626) @@ -40,7 +40,6 @@ import org.apache.log4j.Logger; import org.dllearner.Info; import org.dllearner.algorithms.BruteForceLearner; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.algorithms.RandomGuesser; import org.dllearner.algorithms.gp.GP; import org.dllearner.algorithms.refinement.ROLearner; @@ -68,7 +67,6 @@ import org.dllearner.kb.sparql.SparqlQueryDescriptionConvertVisitor; import org.dllearner.kb.sparql.SparqlQueryException; import org.dllearner.learningproblems.PosNegLPStandard; -import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.parser.KBParser; import org.dllearner.parser.ParseException; @@ -113,7 +111,6 @@ reasonerMapping.put("owlapi", OWLAPIReasoner.class); reasonerMapping.put("fastInstanceChecker", FastInstanceChecker.class); learningProblemMapping.put("posNegDefinition", PosNegLPStandard.class); - learningProblemMapping.put("posNegInclusion", PosNegInclusionLP.class); learningProblemMapping.put("posOnlyDefinition", PosOnlyLP.class); learningAlgorithmMapping.put("random", RandomGuesser.class); learningAlgorithmMapping.put("bruteForce", BruteForceLearner.class); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-03-23 10:35:19
|
Revision: 1658 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1658&view=rev Author: jenslehmann Date: 2009-03-23 10:35:06 +0000 (Mon, 23 Mar 2009) Log Message: ----------- - continued implementation of new learning problem structure - extended CELOE to be able to also handle pos only + pos/neg learning problems - updated manual accordingly Modified Paths: -------------- trunk/doc/manual/manual.tex trunk/examples/family/father_posonly.conf trunk/src/dl-learner/org/dllearner/algorithms/BruteForceLearner.java trunk/src/dl-learner/org/dllearner/algorithms/RandomGuesser.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java trunk/src/dl-learner/org/dllearner/algorithms/el/ELLearningAlgorithm.java trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java trunk/src/dl-learner/org/dllearner/core/LearningProblem.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLPStandard.java trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyLP.java trunk/src/dl-learner/org/dllearner/scripts/DumbLPFinder.java trunk/src/dl-learner/org/dllearner/scripts/NewSample.java trunk/src/dl-learner/org/dllearner/scripts/Sample.java trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java trunk/src/dl-learner/org/dllearner/scripts/SemanticBibleComparison.java trunk/src/dl-learner/org/dllearner/scripts/WikipediaCategoryCleaner.java trunk/src/dl-learner/org/dllearner/scripts/improveWikipedia/ConceptSPARQLReEvaluator.java trunk/src/dl-learner/org/dllearner/scripts/improveWikipedia/ConceptSelector.java trunk/src/dl-learner/org/dllearner/scripts/improveWikipedia/WikipediaCategoryTasks.java trunk/src/dl-learner/org/dllearner/test/ClassCastExceptionTest.java trunk/src/dl-learner/org/dllearner/tools/ore/ColumnListCellRenderer.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionPosNegComparator.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionPosNeg.java trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionPosOnly.java trunk/src/dl-learner/org/dllearner/learningproblems/ScorePosOnly.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristic.java trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicStable.java Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/doc/manual/manual.tex 2009-03-23 10:35:06 UTC (rev 1658) @@ -182,8 +182,20 @@ \item[Class Expression Learning for Ontology Engineering (CELOE)] \todo{This algorithm is under construction.} \end{description} -Please note that while components are interchangeable, it is not possible to arbitrarily combine them. For instance, the newer learning algorithms do not work with the DIG interface, since it does not provide the necessary inference tasks. Furthermore, a learning algorithm can specify which learning problems it can solve, i.e.~we do not require it to be able to solve each learning problem. In later versions of this manual, we may include a compatibility matrix. In the meantime, you can easily verify whether a combination works by testing it in a conf file. +Please note that while components are interchangeable, it is not possible to arbitrarily combine them. For instance, the newer learning algorithms do not work with the DIG interface, since it does not provide the necessary inference tasks. Furthermore, a learning algorithm can specify which learning problems it can solve, i.e.~we do not require it to be able to solve each learning problem. Table \ref{tab:la_lp_comp} provides a compatibility matrix. Note that this can change in future releases, because algorithms may be extended to support new learning problems or drop support for them. +\begin{table}[htb] +\centering +\begin{tabular}{c|cccccc} +learning problem & BF & RG & GP & Ref & Ref II & CELOE \\\hline +pos only & x & x & & & & x \\ +pos neg & x & x & x & x & x & x \\ +class learning & x & x & & & & x +\end{tabular} +\caption{Learning problem - learning algorithm compatibility matrix in DL-Learner. Legend: BF = brute force, RG = random guesser, Ref = Refinement} +\label{tab:la_lp_comp} +\end{table} + \section{DL-Learner Interfaces} One interface you have already used in Section \ref{sec:start} is the command line. There are two executables, which can be used for starting DL-Learner on the commandline: \verb|dl-learner| and \verb|quickstart|. The first one takes a conf file as argument, whereas the latter one lists all conf files in the examples folder and allows you to select one of those. Modified: trunk/examples/family/father_posonly.conf =================================================================== --- trunk/examples/family/father_posonly.conf 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/examples/family/father_posonly.conf 2009-03-23 10:35:06 UTC (rev 1658) @@ -4,30 +4,16 @@ * possible solution: * male AND EXISTS hasChild.TOP * - * Copyright (C) 2007, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann */ /** settings **/ - - import("father.kb"); +problem = posOnlyLP; +algorithm = celoe; +celoe.maxExecutionTimeInSeconds = 1; -problem = posOnlyDefinitionLP; -reasoner = owlAPIReasoner; -algorithm = refexamples; -refexamples.usePropernessChecks = true; -refexamples.maxPosOnlyExpansion = 4; - -refexamples.writeSearchTree = false; -refexamples.searchTreeFile = "log/posonlytest.txt"; - /** examples **/ +stefan +markus +bernd -/* --heinz --anna --gabi --michelle -*/ Modified: trunk/src/dl-learner/org/dllearner/algorithms/BruteForceLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/BruteForceLearner.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/BruteForceLearner.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -45,6 +45,7 @@ import org.dllearner.core.owl.ObjectSomeRestriction; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.ScorePosNeg; /** Deleted: trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -1,83 +0,0 @@ -/** - * Copyright (C) 2007-2009, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.algorithms; - -import java.util.Set; - -import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.learningproblems.ClassScore; - -/** - * An evaluated description for learning classes in ontologies. - * - * @author Jens Lehmann - * - */ -public class EvaluatedDescriptionClass extends EvaluatedDescription { - - private ClassScore classScore; - - /** - * Constructs an evaluated description for learning classes in ontologies. - * @param description Description. - * @param score Score of description. - */ - public EvaluatedDescriptionClass(Description description, ClassScore score) { - super(description, score); - classScore = score; - } - - /** - * @return The addition factor. - * @see org.dllearner.learningproblems.ClassScore#getAddition() - */ - public double getAddition() { - return classScore.getAddition(); - } - - /** - * @return The instances of the class description, which are not instances - * of the class to learn. - * @see org.dllearner.learningproblems.ClassScore#getAdditionalInstances() - */ - public Set<Individual> getAdditionalInstances() { - return classScore.getAdditionalInstances(); - } - - /** - * @return The coverage percentage. - * @see org.dllearner.learningproblems.ClassScore#getCoverage() - */ - public double getCoverage() { - return classScore.getCoverage(); - } - - /** - * - * @return The instances covered by the class description. - * @see org.dllearner.learningproblems.ClassScore#getCoveredInstances() - */ - public Set<Individual> getCoveredInstances() { - return classScore.getCoveredInstances(); - } - -} Deleted: trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -1,168 +0,0 @@ -/** - * 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.algorithms; - -import java.util.Set; - -import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.learningproblems.ScorePosNeg; -import org.dllearner.learningproblems.ScoreTwoValued; -import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; -import org.dllearner.utilities.owl.OWLAPIRenderers; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.semanticweb.owl.model.OWLDescription; - -/** - * This represents a class description, which has been - * evaluated by the learning algorithm, i.e. it has been checked - * which examples it covers. It can be used as return value for - * learning algorithms to make it easier for applications to - * assess how good an offered class description is and how it - * classifies particular examples. - * - * @author Jens Lehmann - * - */ -public class EvaluatedDescriptionPosNeg extends EvaluatedDescription { - - private ScorePosNeg score2; - - /** - * Constructs an evaluated description using its score. - * @param description The description, which was evaluated. - * @param score The score of the description. - */ - public EvaluatedDescriptionPosNeg(Description description, ScorePosNeg score) { - super(description, score); - score2 = (ScorePosNeg) score; - } - - /** - * Constructs an evaluated description using example coverage. - * @param description The description, which was evaluated. - * @param posAsPos Positive examples classified as positive by (i.e. instance of) the description. - * @param posAsNeg Positive examples classified as negative by (i.e. not instance of) the description. - * @param negAsPos Negative examples classified as positive by (i.e. instance of) the description. - * @param negAsNeg Negative examples classified as negative by (i.e. not instance of) the description. - */ - public EvaluatedDescriptionPosNeg(Description description, Set<Individual> posAsPos, Set<Individual> posAsNeg, Set<Individual> negAsPos, Set<Individual> negAsNeg) { - // usually core methods should not depend on methods outside of the core package (except utilities) - // in this case, this is just a convenience constructor - super(description, new ScoreTwoValued(posAsPos, posAsNeg, negAsPos, negAsNeg)); - score2 = (ScorePosNeg) score; - } - - /** - * @see org.dllearner.learningproblems.ScorePosNeg#getAccuracy() - * @return Accuracy of the description. - */ - @Override - public double getAccuracy() { - return score2.getAccuracy(); - } - - /** - * Gets the score of this description. This can be used to get - * further statistical values. - * @see org.dllearner.learningproblems.ScorePosNeg - * @return The score object associated with this evaluated description. - */ - public ScorePosNeg getScore() { - return score2; - } - - /** - * @see org.dllearner.learningproblems.ScorePosNeg#getCoveredNegatives() - * @return Negative examples covered by the description. - */ - public Set<Individual> getCoveredNegatives() { - return score2.getCoveredNegatives(); - } - - /** - * @see org.dllearner.learningproblems.ScorePosNeg#getCoveredPositives() - * @return Positive examples covered by the description. - */ - public Set<Individual> getCoveredPositives() { - return score2.getCoveredPositives(); - } - - /** - * @see org.dllearner.learningproblems.ScorePosNeg#getNotCoveredNegatives() - * @return Negative examples not covered by the description. - */ - public Set<Individual> getNotCoveredNegatives() { - return score2.getNotCoveredNegatives(); - } - - /** - * @see org.dllearner.learningproblems.ScorePosNeg#getNotCoveredPositives() - * @return Positive examples not covered by the description. - */ - public Set<Individual> getNotCoveredPositives() { - return score2.getNotCoveredPositives(); - } - - /** - * This convenience method can be used to store and exchange evaluated - * descriptions by transforming them to a JSON string. - * @return A JSON representation of an evaluated description. - */ - @Override - public String asJSON() { - JSONObject object = new JSONObject(); - try { - object.put("descriptionManchesterSyntax", description.toManchesterSyntaxString(null, null)); - OWLDescription d = OWLAPIDescriptionConvertVisitor.getOWLDescription(description); - object.put("descriptionOWLXML", OWLAPIRenderers.toOWLXMLSyntax(d)); - object.put("descriptionKBSyntax", description.toKBSyntaxString()); - object.put("accuracy", score2.getAccuracy()); - object.put("coveredPositives", getJSONArray(score2.getCoveredPositives())); - object.put("coveredNegatives", getJSONArray(score2.getCoveredNegatives())); - object.put("notCoveredPositives", getJSONArray(score2.getNotCoveredPositives())); - object.put("notCoveredNegatives", getJSONArray(score2.getNotCoveredNegatives())); - return object.toString(3); - } catch (JSONException e) { - e.printStackTrace(); - return null; - } - } - - @Override - public String toString() { - return description.toString() + "(accuracy: " + getAccuracy() + ")"; - } - - // we need to use this method instead of the standard JSON array constructor, - // otherwise we'll get unexpected results (JSONArray does not take Individuals - // as arguments and does not use toString) - private static JSONArray getJSONArray(Set<Individual> individuals) { - JSONArray j = new JSONArray(); - for(Individual i : individuals) { - j.put(i.getName()); - } - return j; - } - -} Modified: trunk/src/dl-learner/org/dllearner/algorithms/RandomGuesser.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/RandomGuesser.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/RandomGuesser.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -34,6 +34,7 @@ import org.dllearner.core.options.IntegerConfigOption; import org.dllearner.core.options.InvalidConfigOptionValueException; import org.dllearner.core.owl.Description; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.ScorePosNeg; public class RandomGuesser extends LearningAlgorithm { Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -47,8 +47,11 @@ import org.dllearner.core.owl.Restriction; import org.dllearner.core.owl.Thing; import org.dllearner.learningproblems.ClassLearningProblem; +import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; +import org.dllearner.utilities.Helper; import org.dllearner.utilities.owl.ConceptComparator; import org.dllearner.utilities.owl.ConceptTransformation; import org.dllearner.utilities.owl.DescriptionMinimizer; @@ -94,13 +97,19 @@ private EvaluatedDescriptionSet bestEvaluatedDescriptions; private NamedClass classToDescribe; - private Set<Individual> classInstances; + // examples are either 1.) instances of the class to describe 2.) positive examples + // 3.) union of pos.+neg. examples depending on the learning problem at hand + private Set<Individual> examples; + + // CELOE was originally created for learning classes in ontologies, but also + // works for other learning problem types + private boolean isClassLearningProblem; private boolean isEquivalenceProblem; private long nanoStartTime; // important parameters - private double minAcc; + private double noise; private double maxDepth; // utility variables @@ -119,14 +128,14 @@ return configurator; } - public CELOE(ClassLearningProblem problem, ReasonerComponent reasoner) { + public CELOE(LearningProblem problem, ReasonerComponent reasoner) { super(problem, reasoner); configurator = new CELOEConfigurator(this); } - + public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); - problems.add(ClassLearningProblem.class); + problems.add(LearningProblem.class); return problems; } @@ -155,43 +164,51 @@ @Override public void init() throws ComponentInitException { - ClassLearningProblem problem = (ClassLearningProblem) learningProblem; - classToDescribe = problem.getClassToDescribe(); - isEquivalenceProblem = problem.isEquivalenceProblem(); - // copy class hierarchy and modify it such that each class is only // reachable via a single path ClassHierarchy classHierarchy = reasoner.getClassHierarchy().clone(); - classHierarchy.thinOutSubsumptionHierarchy(); + classHierarchy.thinOutSubsumptionHierarchy(); - classInstances = reasoner.getIndividuals(classToDescribe); - minimizer = new DescriptionMinimizer(reasoner); - // start class: intersection of super classes for definitions (since it needs to - // capture all instances), but owl:Thing for learning subclasses (since it is - // superfluous to add super classes in this case) - if(isEquivalenceProblem) { - Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); - if(superClasses.size() > 1) { - startClass = new Intersection(new LinkedList<Description>(superClasses)); - } else { - startClass = (Description) superClasses.toArray()[0]; - } - } else { - startClass = Thing.instance; - } + startClass = Thing.instance; // create refinement operator operator = new RhoDRDown(reasoner, classHierarchy, startClass, configurator); baseURI = reasoner.getBaseURI(); - prefixes = reasoner.getPrefixes(); + prefixes = reasoner.getPrefixes(); bestEvaluatedDescriptions = new EvaluatedDescriptionSet(configurator.getMaxNrOfResults()); - + // we put important parameters in class variables - minAcc = configurator.getNoisePercentage()/100d; - maxDepth = configurator.getMaxDepth(); + noise = configurator.getNoisePercentage()/100d; + maxDepth = configurator.getMaxDepth(); + + isClassLearningProblem = (learningProblem instanceof ClassLearningProblem); + // actions specific to ontology engineering + if(isClassLearningProblem) { + ClassLearningProblem problem = (ClassLearningProblem) learningProblem; + classToDescribe = problem.getClassToDescribe(); + isEquivalenceProblem = problem.isEquivalenceProblem(); + + examples = reasoner.getIndividuals(classToDescribe); + + // start class: intersection of super classes for definitions (since it needs to + // capture all instances), but owl:Thing for learning subclasses (since it is + // superfluous to add super classes in this case) + if(isEquivalenceProblem) { + Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); + if(superClasses.size() > 1) { + startClass = new Intersection(new LinkedList<Description>(superClasses)); + } else { + startClass = (Description) superClasses.toArray()[0]; + } + } + } else if(learningProblem instanceof PosOnlyLP) { + examples = ((PosOnlyLP)learningProblem).getPositiveExamples(); + } else if(learningProblem instanceof PosNegLP) { + examples = Helper.union(((PosNegLP)learningProblem).getPositiveExamples(),((PosNegLP)learningProblem).getNegativeExamples()); + } } @Override @@ -221,21 +238,6 @@ reset(); nanoStartTime = System.nanoTime(); - // test -// Description testD = null; -// try { -//// testD = KBParser.parseConcept("(\"EPC\" AND EXISTS hasModelElements.(\"Function\" AND ALL previousObjects.BOTTOM))", "http://localhost/aris/sap_model.owl#"); -// testD = KBParser.parseConcept("(\"EPC\" AND EXISTS hasModelElements.(\"Function\" AND ALL nextObject.BOTTOM))", "http://localhost/aris/sap_model.owl#"); -// } catch (ParseException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// double val = learningProblem.getAccuracyOrTooWeak(testD, minAcc); -// System.out.println(testD); -// System.out.println(val); -// System.out.println(testD.getDepth()); -// System.exit(0); - // highest accuracy so far double highestAccuracy = 0.0; OENode nextNode; @@ -244,8 +246,6 @@ int loop = 0; while (!terminationCriteriaSatisfied()) { - -// System.out.println(startNode.toTreeString(baseURI)); if(bestEvaluatedDescriptions.getBest().getAccuracy() > highestAccuracy) { highestAccuracy = bestEvaluatedDescriptions.getBest().getAccuracy(); @@ -271,7 +271,6 @@ if(length > horizExp && refinement.getDepth() <= maxDepth) { Monitor mon2 = MonitorFactory.start("addNode"); -// boolean added = addNode(refinement, nextNode); mon2.stop(); @@ -281,7 +280,6 @@ updateMinMaxHorizExp(nextNode); - // Anzahl Schleifendurchläufe loop++; } @@ -292,7 +290,6 @@ } // print solution(s) -// logger.info("solution : " + bestDescriptionToString()); logger.info("solutions:\n" + getSolutionString()); // System.out.println(startNode.toTreeString(baseURI)); @@ -302,7 +299,7 @@ private OENode getNextNodeToExpand() { // we expand the best node of those, which have not achieved 100% accuracy - // already and have a horizontal expansion equalling their length + // already and have a horizontal expansion equal to their length // (rationale: further extension is likely to add irrelevant syntactical constructs) Iterator<OENode> it = nodes.descendingIterator(); while(it.hasNext()) { @@ -321,7 +318,7 @@ private TreeSet<Description> refineNode(OENode node) { // we have to remove and add the node since its heuristic evaluation changes through the expansion // (you *must not* include any criteria in the heuristic which are modified outside of this method, - // otherwise you may see rarely occuring but critical false ordering in the nodes set) + // otherwise you may see rarely occurring but critical false ordering in the nodes set) nodes.remove(node); // System.out.println("refining: " + node); int horizExp = node.getHorizontalExpansion(); @@ -348,7 +345,7 @@ } // quality of description (return if too weak) - double accuracy = learningProblem.getAccuracyOrTooWeak(description, minAcc); + double accuracy = learningProblem.getAccuracyOrTooWeak(description, noise); descriptionTests++; // System.out.println(description + " " + accuracy); if(accuracy == -1) { @@ -402,23 +399,25 @@ // checks whether the description is allowed private boolean isDescriptionAllowed(Description description, OENode parentNode) { - if(isEquivalenceProblem) { - // the class to learn must not appear on the outermost property level - if(occursOnFirstLevel(description, classToDescribe)) { - return false; - } - } else { - // none of the superclasses of the class to learn must appear on the - // outermost property level - TreeSet<Description> toTest = new TreeSet<Description>(); - toTest.add(classToDescribe); - while(!toTest.isEmpty()) { - Description d = toTest.pollFirst(); - if(occursOnFirstLevel(description, d)) { + if(isClassLearningProblem) { + if(isEquivalenceProblem) { + // the class to learn must not appear on the outermost property level + if(occursOnFirstLevel(description, classToDescribe)) { return false; } - toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d)); - } + } else { + // none of the superclasses of the class to learn must appear on the + // outermost property level + TreeSet<Description> toTest = new TreeSet<Description>(); + toTest.add(classToDescribe); + while(!toTest.isEmpty()) { + Description d = toTest.pollFirst(); + if(occursOnFirstLevel(description, d)) { + return false; + } + toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d)); + } + } } // perform forall sanity tests @@ -437,7 +436,7 @@ // transform [r,s] to \exists r.\exists s.\top Description existentialContext = context.toExistentialContext(); boolean fillerFound = false; - for(Individual instance : classInstances) { + for(Individual instance : examples) { if(reasoner.hasType(existentialContext, instance)) { // System.out.println(instance + " " + existentialContext); fillerFound = true; Deleted: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristic.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristic.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2007-2009, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.algorithms.celoe; - -import java.util.Comparator; - -/** - * Marker interface for heurist comparators over nodes in the search tree. - * - * @author Jens Lehmann - * - */ -public interface OEHeuristic extends Comparator<OENode> { - -} Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicRuntime.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -19,6 +19,8 @@ */ package org.dllearner.algorithms.celoe; +import java.util.Comparator; + import org.dllearner.utilities.owl.ConceptComparator; /** @@ -29,7 +31,7 @@ * @author Jens Lehmann * */ -public class OEHeuristicRuntime implements OEHeuristic { +public class OEHeuristicRuntime implements Comparator<OENode>{ // strong penalty for long descriptions private double expansionPenaltyFactor = 0.1; Deleted: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicStable.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicStable.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OEHeuristicStable.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2007-2009, Jens Lehmann - * - * This file is part of DL-Learner. - * - * DL-Learner is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * DL-Learner is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - */ -package org.dllearner.algorithms.celoe; - -/** - * @author Jens Lehmann - * - */ -public class OEHeuristicStable implements OEHeuristic { - - /* (non-Javadoc) - * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) - */ - @Override - public int compare(OENode o1, OENode o2) { - // TODO Auto-generated method stub - return 0; - } - -} Modified: trunk/src/dl-learner/org/dllearner/algorithms/el/ELLearningAlgorithm.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/el/ELLearningAlgorithm.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -26,7 +26,6 @@ import java.util.TreeSet; import org.apache.log4j.Logger; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.ComponentInitException; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.LearningAlgorithm; @@ -36,6 +35,7 @@ import org.dllearner.core.configurators.ELLearningAlgorithmConfigurator; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Thing; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.refinementoperators.ELDown2; Modified: trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/gp/GP.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -29,7 +29,6 @@ import java.util.Set; import java.util.Map.Entry; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.algorithms.hybridgp.Psi; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; @@ -44,6 +43,7 @@ import org.dllearner.core.options.StringConfigOption; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Thing; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.utilities.Helper; Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -14,7 +14,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; import org.dllearner.core.ReasonerComponent; @@ -33,8 +32,8 @@ import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; -import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.refinementoperators.RhoDown; import org.dllearner.utilities.Files; @@ -111,8 +110,6 @@ DecimalFormat df = new DecimalFormat(); private PosNegLP learningProblem; - private PosOnlyLP posOnlyLearningProblem; - private boolean posOnly = false; // Menge von Kandidaten für Refinement // (wird für Direktzugriff auf Baumknoten verwendet) @@ -198,23 +195,13 @@ super(learningProblem, reasoningService); this.learningProblem = learningProblem; this.configurator = new ROLearnerConfigurator(this); - posOnly=false; baseURI = reasoningService.getBaseURI(); } - public ROLearner(PosOnlyLP learningProblem, ReasonerComponent reasoningService) { - super(learningProblem, reasoningService); - this.posOnlyLearningProblem = learningProblem; - this.configurator = new ROLearnerConfigurator(this); - posOnly=true; - baseURI = reasoningService.getBaseURI(); - } - public static Collection<Class<? extends LearningProblem>> supportedLearningProblems() { Collection<Class<? extends LearningProblem>> problems = new LinkedList<Class<? extends LearningProblem>>(); problems.add(PosNegLP.class); - problems.add(PosOnlyLP.class); return problems; } @@ -334,12 +321,9 @@ Files.clearFile(searchTreeFile); // adjust heuristic - if(heuristic == Heuristic.LEXICOGRAPHIC) + if(heuristic == Heuristic.LEXICOGRAPHIC) { nodeComparator = new NodeComparator(); - else { - if(posOnly) { - throw new RuntimeException("does not work with positive examples only yet"); - } + } else { nodeComparator = new NodeComparator2(learningProblem.getNegativeExamples().size(), learningProblem.getPercentPerLengthUnit()); } @@ -383,17 +367,11 @@ } private int coveredNegativesOrTooWeak(Description concept) { - if(posOnly) - return posOnlyLearningProblem.coveredPseudoNegativeExamplesOrTooWeak(concept); - else - return learningProblem.coveredNegativeExamplesOrTooWeak(concept); + return learningProblem.coveredNegativeExamplesOrTooWeak(concept); } private int getNumberOfNegatives() { - if(posOnly) - return posOnlyLearningProblem.getPseudoNegatives().size(); - else - return learningProblem.getNegativeExamples().size(); + return learningProblem.getNegativeExamples().size(); } // Kernalgorithmus @@ -1101,18 +1079,12 @@ // @Override public ScorePosNeg getSolutionScore() { - if(posOnly) - return (ScorePosNeg) posOnlyLearningProblem.computeScore(getCurrentlyBestDescription()); - else - return (ScorePosNeg) learningProblem.computeScore(getCurrentlyBestDescription()); + return (ScorePosNeg) learningProblem.computeScore(getCurrentlyBestDescription()); } public ScorePosNeg getSolutionScore(Description d) { - if(posOnly) - return (ScorePosNeg) posOnlyLearningProblem.computeScore(d); - else - return (ScorePosNeg) learningProblem.computeScore(d); + return (ScorePosNeg) learningProblem.computeScore(d); } @Override Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -29,7 +29,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.ComponentInitException; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; @@ -48,6 +47,7 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -33,7 +33,6 @@ import java.util.concurrent.ConcurrentSkipListSet; import org.apache.log4j.Logger; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.LearningProblem; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.ROLComponent2Configurator; @@ -42,8 +41,8 @@ import org.dllearner.core.owl.Intersection; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; +import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; -import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.learningproblems.ScorePosNeg; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; @@ -72,9 +71,7 @@ // often the learning problems needn't be accessed directly; instead // use the example sets below and the posonly variable private PosNegLP learningProblem; - private PosOnlyLP posOnlyLearningProblem; private Description startDescription; - private boolean posOnly = false; private int nrOfExamples; private int nrOfPositiveExamples; private Set<Individual> positiveExamples; @@ -238,10 +235,9 @@ int maxPosOnlyExpansion, int maxExecutionTimeInSeconds, int minExecutionTimeInSeconds, int guaranteeXgoodDescriptions, int maxClassDescriptionTests, boolean forceRefinementLengthIncrease) { - if (learningProblem instanceof PosNegLP) { + PosNegLP lp = (PosNegLP) learningProblem; this.learningProblem = lp; - posOnly = false; positiveExamples = lp.getPositiveExamples(); negativeExamples = lp.getNegativeExamples(); nrOfPositiveExamples = positiveExamples.size(); @@ -251,16 +247,6 @@ // System.out.println(nrOfNegativeExamples); // System.exit(0); - } else if (learningProblem instanceof PosOnlyLP) { - PosOnlyLP lp = (PosOnlyLP) learningProblem; - this.posOnlyLearningProblem = lp; - posOnly = true; - positiveExamples = lp.getPositiveExamples(); - negativeExamples = new TreeSet<Individual>(); - nrOfPositiveExamples = lp.getPositiveExamples().size(); - // nrOfNegativeExamples = lp.getPseudoNegatives().size(); - nrOfNegativeExamples = 0; - } this.configurator = configurator; nrOfExamples = nrOfPositiveExamples + nrOfNegativeExamples; this.rs = rs; @@ -482,7 +468,9 @@ // special situation for positive only learning: the expanded node // can become a solution (see explanations // for maxPosOnlyExpansion above) - if (posOnly + + // DEPRECATED CODE + if (false && bestNode.isPosOnlyCandidate() && (bestNode.getHorizontalExpansion() - bestNode.getConcept().getLength() >= maxPosOnlyExpansion)) { @@ -855,7 +843,7 @@ tooWeakList.add(refinement); } else { // Lösung gefunden - if (quality >= 0 && quality <= allowedMisclassifications && !posOnly) { + if (quality >= 0 && quality <= allowedMisclassifications) { solutions.add(newNode); } @@ -1300,17 +1288,11 @@ } public ScorePosNeg getSolutionScore() { - if (posOnly) - return (ScorePosNeg) posOnlyLearningProblem.computeScore(getBestSolution()); - else - return (ScorePosNeg) learningProblem.computeScore(getBestSolution()); + return (ScorePosNeg) learningProblem.computeScore(getBestSolution()); } private ScorePosNeg getScore(Description d) { - if (posOnly) - return (ScorePosNeg) posOnlyLearningProblem.computeScore(d); - else - return (ScorePosNeg) learningProblem.computeScore(d); + return (ScorePosNeg) learningProblem.computeScore(d); } public ExampleBasedNode getStartNode() { Modified: trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/cli/ConfMapper.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -42,6 +42,7 @@ import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.learningproblems.PosNegLPStrict; +import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.reasoning.DIGReasoner; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.reasoning.FastRetrievalReasoner; @@ -82,9 +83,10 @@ reasonerMapping.put("owlAPIReasoner", OWLAPIReasoner.class); reasonerMapping.put("fastInstanceChecker", FastInstanceChecker.class); reasonerMapping.put("fastRetrievalReasoner", FastRetrievalReasoner.class); - learningProblemMapping.put("posNegDefinitionLP", PosNegLPStandard.class); - learningProblemMapping.put("posNegDefinitionLPStrict", PosNegLPStrict.class); + learningProblemMapping.put("posNegLPStandard", PosNegLPStandard.class); + learningProblemMapping.put("posNegLPStrict", PosNegLPStrict.class); learningProblemMapping.put("classLearning", ClassLearningProblem.class); + learningProblemMapping.put("posOnlyLP", PosOnlyLP.class); learningAlgorithmMapping.put("random", RandomGuesser.class); learningAlgorithmMapping.put("bruteForce", BruteForceLearner.class); learningAlgorithmMapping.put("gp", GP.class); Modified: trunk/src/dl-learner/org/dllearner/core/LearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/LearningProblem.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/core/LearningProblem.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -109,5 +109,5 @@ * @return A value between 0 and 1 indicating the quality (of a class description) * or -1 as described above. */ - public abstract double getAccuracyOrTooWeak(Description description, double minAccuracy); + public abstract double getAccuracyOrTooWeak(Description description, double noise); } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-03-20 14:15:15 UTC (rev 1657) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -27,9 +27,7 @@ import java.util.Set; import java.util.TreeSet; -import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.core.ComponentInitException; -import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.LearningProblem; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.ClassLearningProblemConfigurator; @@ -38,10 +36,7 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; -import org.dllearner.utilities.Helper; -import com.jamonapi.MonitorFactory; - /** * The problem of learning the description of an existing class * in an OWL ontology. @@ -52,9 +47,11 @@ public class ClassLearningProblem extends LearningProblem { private NamedClass classToDescribe; - private Set<Individual> classInstances; + private List<Individual> classInstances; private boolean equivalence = true; private ClassLearningProblemConfigurator configurator; + // approximation of accuracy +- 0.05 % + private static final double approx = 0.05; // factor for higher weight on coverage (needed for subclass learning) private double coverageFactor; @@ -92,7 +89,7 @@ throw new ComponentInitException("The class \"" + configurator.getClassToDescribe() + "\" does not exist. Make sure you spelled it correctly."); } - classInstances = reasoner.getIndividuals(classToDescribe); + classInstances = new LinkedList<Individual>(reasoner.getIndividuals(classToDescribe)); equivalence = (configurator.getType().equals("equivalence")); if(equivalence) { @@ -113,6 +110,7 @@ // any bias through URI names, so we shuffle the list once pseudo-randomly superClassInstances = new LinkedList<Individual>(superClassInstancesTmp); Random rand = new Random(1); + Collections.shuffle(classInstances, rand); Collections.shuffle(superClassInstances, rand); } @@ -134,25 +132,25 @@ @Override public ClassScore computeScore(Description description) { - Set<Individual> retrieval = reasoner.getIndividuals(description); + // overhang + Set<Individual> additionalInstances = new TreeSet<Individual>(); + for(Individual ind : superClassInstances) { + if(reasoner.hasType(description, ind)) { + additionalInstances.add(ind); + } + } + // coverage Set<Individual> coveredInstances = new TreeSet<Individual>(); - - int instancesCovered = 0; - for(Individual ind : classInstances) { - if(retrieval.contains(ind)) { - instancesCovered++; + if(reasoner.hasType(description, ind)) { coveredInstances.add(ind); } } - Set<Individual> additionalInstances = Helper.difference(retrieval, coveredInstances); + double coverage = coveredInstances.size()/(double)classInstances.size(); + double protusion = additionalInstances.size() == 0 ? 0 : coveredInstances.size()/(double)(coveredInstances.size()+additionalInstances.size()); - double coverage = instancesCovered/(double)classInstances.size(); - double protusion = retrieval.size() == 0 ? 0 : instancesCovered/(double)retrieval.size(); -// double accuracy = coverage + Math.sqrt(protusion); - return new ClassScore(coveredInstances, coverage, additionalInstances, protusion, getAccuracy(coverage, protusion)); } @@ -165,31 +163,36 @@ */ @Override public double getAccuracy(Description description) { - Set<Individual> retrieval = reasoner.getIndividuals(description); - int instancesCovered = 0; + // overhang + int additionalInstances = 0; + for(Individual ind : superClassInstances) { + if(reasoner.hasType(description, ind)) { + additionalInstances++; + } + } + + // coverage + int coveredInstances = 0; for(Individual ind : classInstances) { - if(retrieval.contains(ind)) { - instancesCovered++; + if(reasoner.hasType(description, ind)) { + coveredInstances++; } } - double coverage = instancesCovered/(double)classInstances.size(); -// double protusion = instancesCovered/(double)retrieval.size(); - double protusion = retrieval.size() == 0 ? 0 : instancesCovered/(double)retrieval.size(); -// + double coverage = coveredInstances/(double)classInstances.size(); + double protusion = additionalInstances == 0 ? 0 : coveredInstances/(double)(coveredInstances+additionalInstances); -// return (coverageFactor * coverage + protusion) / (coverageFactor + 1); return getAccuracy(coverage, protusion); } @Override - public double getAccuracyOrTooWeak(Description description, double minAccuracy) { + public double getAccuracyOrTooWeak(Description description, double noise) { // instead of using the standard operation, we use optimisation // and approximation here // we abort when there are too many uncovered positives - int maxNotCovered = (int) Math.ceil(minAccuracy*classInstances.size()); + int maxNotCovered = (int) Math.ceil(noise*classInstances.size()); int instancesCovered = 0; int instancesNotCovered = 0; int total = 0; @@ -220,7 +223,7 @@ upperBorderA = Math.min(1, p1 + p2); double size = upperBorderA - lowerBorderA; // if the interval has a size smaller than 10%, we can be confident - if(size < 0.1) { + if(size < 2 * approx) { // we have to distinguish the cases that the accuracy limit is // below, within, or above the limit and that the mean is below // or above the limit @@ -229,7 +232,7 @@ // if the mean is greater than the required minimum, we can accept; // we also accept if the interval is small and close to the minimum // (worst case is to accept a few inaccurate descriptions) - if(mean > minAccuracy || (upperBorderA > mean && size < 0.03)) { + if(mean > noise || (upperBorderA > mean && size < 0.03)) { instancesCovered = (int) (instancesCovered/(double)total * classInstances.size()); upperEstimateA = (int) (upperBorderA * classInstances.size()); lowerEstimateA = (int) (lowerBorderA * classInstances.size()); @@ -239,7 +242,7 @@ // reject only if the upper border is far away (we are very // certain not to lose a potential solution) - if(upperBorderA + 0.1 < minAccuracy) { + if(upperBorderA + 0.1 < noise) { return -1; } } @@ -315,9 +318,7 @@ return getAccuracy(coverage, protusion); } - /* (non-Javadoc) - * @see org.dllearner.core.LearningProblem#getAccuracyOrTooWeak(org.dllearner.core.owl.Description, double) - */ + @Deprecated public double getAccuracyOrTooWeakStandard(Description description, double minAccuracy) { // since we have to perform a retrieval operation anyway, we cannot easily // get a benefit from the accuracy limit @@ -362,7 +363,7 @@ * @see org.dllearner.core.LearningProblem#evaluate(org.dllearner.core.owl.Description) */ @Override - public EvaluatedDescription evaluate(Description description) { + public EvaluatedDescriptionClass evaluate(Description description) { ClassScore score = computeScore(description); return new EvaluatedDescriptionClass(description, score); } Copied: trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java (from rev 1657, trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -0,0 +1,82 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.learningproblems; + +import java.util.Set; + +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; + +/** + * An evaluated description for learning classes in ontologies. + * + * @author Jens Lehmann + * + */ +public class EvaluatedDescriptionClass extends EvaluatedDescription { + + private ClassScore classScore; + + /** + * Constructs an evaluated description for learning classes in ontologies. + * @param description Description. + * @param score Score of description. + */ + public EvaluatedDescriptionClass(Description description, ClassScore score) { + super(description, score); + classScore = score; + } + + /** + * @return The addition factor. + * @see org.dllearner.learningproblems.ClassScore#getAddition() + */ + public double getAddition() { + return classScore.getAddition(); + } + + /** + * @return The instances of the class description, which are not instances + * of the class to learn. + * @see org.dllearner.learningproblems.ClassScore#getAdditionalInstances() + */ + public Set<Individual> getAdditionalInstances() { + return classScore.getAdditionalInstances(); + } + + /** + * @return The coverage percentage. + * @see org.dllearner.learningproblems.ClassScore#getCoverage() + */ + public double getCoverage() { + return classScore.getCoverage(); + } + + /** + * + * @return The instances covered by the class description. + * @see org.dllearner.learningproblems.ClassScore#getCoveredInstances() + */ + public Set<Individual> getCoveredInstances() { + return classScore.getCoveredInstances(); + } + +} Property changes on: trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java ___________________________________________________________________ Added: svn:mergeinfo + Copied: trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionPosNeg.java (from rev 1657, trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionPosNeg.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionPosNeg.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionPosNeg.java 2009-03-23 10:35:06 UTC (rev 1658) @@ -0,0 +1,166 @@ +/** + * 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.learningproblems; + +import java.util.Set; + +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; +import org.dllearner.utilities.owl.OWLAPIRenderers; +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import org.semanticweb.owl.model.OWLDescription; + +/** + * This represents a class description, which has been + * evaluated by the learning algorithm, i.e. it has been checked + * which examples it covers. It can be used as return value for + * learning algorithms to make it easier for applications to + * assess how good an offered class description is and how it + * classifies particular examples. + * + * @author Jens Lehmann + * + */ +public class EvaluatedDescriptionPosNeg extends EvaluatedDescription { + + private ScorePosNeg score2; + + /** + * Constructs an evaluated description using its score. + * @param description The description, which was evaluated. + * @param score The score of the description. + */ + public EvaluatedDescriptionPosNeg(Description description, ScorePosNeg score) { + super(description, score); + score2 = (ScorePosNeg) score; + } + + /** + * Constructs an evaluated description using example coverage. + * @param description The description, which was evaluated. + * @param posAsPos Positive examples classified as positive by (i.e. instance of) the description. + * @param posAsNeg Positive examples classified as negative by (i.e. not instance of) the description. + * @param negAsPos Negative examples classified as positive by (i.e. instance of) the description. + * @param negAsNeg Negative examples classified as negative by (i.e. not instance of) the description. + */ + public EvaluatedDescriptionPosNeg(Description description, Set<Individual> posAsPos, Set<Individual> posAsNeg, Set<Individual> negAsPos, Set<Individual> negAsNeg) { + // usually core methods should not depend on methods outside of the core package (except utilities) + // in this case, this is just a convenience constructor + super(description, new ScoreTwoValued(posAsPos, posAsNeg, negAsPos, negAsNeg)); + score2 = (ScorePosNeg) score; + } + + /** + * @see org.dllearner.learningproblems.ScorePosNeg#getAccuracy() + * @return Accuracy of the description. + */ + @Override + public double getAccuracy() { + return score2.getAccuracy(); + } + + /** + * Gets the score of this description. This can be used to get + * further statistical values. + * @see org.dllearner.learningproblems.ScorePosNeg + * @return The score object associated with this evaluated description. + */ + public ScorePosNeg getScore() { + return score2; + } + + /** + * @see org.dllearner.learningproblems.ScorePosNeg#getCoveredNegatives() + * @return Negative examples covered by the description. + */ + public Set<Individual> getCoveredNegatives() { + return score2.getCoveredNegatives(); + } + + /** + * @see org.dllearner.learningproblems.ScorePosNeg#getCoveredPositives() + * @return Positive examples covered by the description. + */ + public Set<Individual> getCoveredPositives() { + return score2.getCoveredPositives(); + } + + /** + * @see org.dllearner.learningproblems.ScorePosNeg#getNotCoveredNegatives() + * @r... [truncated message content] |
From: <jen...@us...> - 2009-03-27 10:53:53
|
Revision: 1668 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1668&view=rev Author: jenslehmann Date: 2009-03-27 10:53:47 +0000 (Fri, 27 Mar 2009) Log Message: ----------- - README file for DBpedia Navigator - renamed Protege build tasks in ant script Modified Paths: -------------- trunk/build.xml trunk/src/dbpedia-navigator/Settings.php.dist trunk/src/dl-learner/org/dllearner/scripts/CalculatePageRank.java Added Paths: ----------- trunk/src/dbpedia-navigator/LICENSE trunk/src/dbpedia-navigator/README Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-03-26 14:26:46 UTC (rev 1667) +++ trunk/build.xml 2009-03-27 10:53:47 UTC (rev 1668) @@ -304,7 +304,7 @@ </target> <!-- copy all necessary files in a folder to build the jar or a release bundle --> - <target name="protege"> + <target name="buildProtegePlugin"> <property name="source" value="src/dl-learner/org/dllearner/tools/protege" /> <property name="temp" value="${source}/temp" /> <property name="release" value="${source}/release" /> @@ -349,7 +349,7 @@ </target> <!--Copy the DL-Learner-Protege-plugin jar file into the Protege plugin folder --> - <target name="copyProtegePluginToProtegeDir" depends="protege"> + <target name="copyProtegePluginToProtegeDir" depends="buildProtegePlugin"> <copy toDir="${protege_dir}" > <fileset dir="${release}" includes="DL-Learner-protege-plugin.jar" /> </copy> @@ -358,7 +358,7 @@ </target> <!--Builds the Releasebundle --> - <target name="buildProtegePlugin" depends="protege"> + <target name="buildProtegePluginRelease" depends="buildProtegePlugin"> <copy file="LICENSE" toDir="${release}" /> <copy toDir="${release}" > <fileset dir="${source}" includes="INSTALL,README" excludes="**/*.java,**/*.gif" /> Added: trunk/src/dbpedia-navigator/LICENSE =================================================================== --- trunk/src/dbpedia-navigator/LICENSE (rev 0) +++ trunk/src/dbpedia-navigator/LICENSE 2009-03-27 10:53:47 UTC (rev 1668) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program 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. + + This program 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/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Added: trunk/src/dbpedia-navigator/README =================================================================== --- trunk/src/dbpedia-navigator/README (rev 0) +++ trunk/src/dbpedia-navigator/README 2009-03-27 10:53:47 UTC (rev 1668) @@ -0,0 +1,43 @@ +General Notes: +============== + +DBpedia Navigator is an application written in PHP using Javascript, HTML, and +CSS. It connects to the DL-Learner web service for getting navigation suggestions +and posing SPARQL queries against a triple strore containing DBpedia. Furthermore, +a temporary MySQL database is used to allow for efficient search and traversal of +the class hierarchy. Ideally, DBpedia Navigator, DL-Learner, the SPARQL endpoint, +and the MySQL database should all be on the same machine for performance reasons. + +Installation of DBpedia Navigator: +================================== + +Prerequisites: +- Apache +- PHP +- DL-Learner Web Service +- DBpedia SPARQL endpoint +- MySQL + +Installation Steps: + +1. Get DBpedia Navigator +Checkout from SVN: +co http://dl-learner.svn.sourceforge.net/svnroot/dl-learner/trunk/src/dbpedia-navigator/ +Place it under the web server root. + +2. Configure DBpedia Navigator +Change settings.ini.dist and Settings.php.dist (the latter will be removed at some point of time) +according to your system, i.e. set the database connection. + +3. Create DBpedia Navigator database +- create an empty database +- import database.sql (contains structure) +- create directory "data" under $datasetDir (see settings.ini) and download the + following DBpedia data sets "pagelinks_en.nt", "articles_label_en.nt", + "dbpedia-ontology-schema.nt", "dbpedia-ontology-types.nt" +- execute org.dllearner.scripts.CalculatePageRank + +Now you can use DBpedia Navigator by starting the DL-Learner web service and the calling the +DBpedia Navigator in your browser. + +Send questions to le...@in.... Modified: trunk/src/dbpedia-navigator/Settings.php.dist =================================================================== --- trunk/src/dbpedia-navigator/Settings.php.dist 2009-03-26 14:26:46 UTC (rev 1667) +++ trunk/src/dbpedia-navigator/Settings.php.dist 2009-03-27 10:53:47 UTC (rev 1668) @@ -1,4 +1,10 @@ <?php + +// +// TODO: +// - move configuration for settings.ini +// - ignoredConcepts and ignoredRoles are not working yet + /** * Copyright (C) 2007-2008, Jens Lehmann * @@ -59,11 +65,11 @@ public $ignoredConcepts=array(); public $ignoredRoles=array(); - public $classSystem="YAGO"; - //public $classSystem="DBpedia"; + //public $classSystem="YAGO"; + public $classSystem="DBpedia"; //the name of the used database - public $database_name='navigator_db'; - //public $database_name='navigator_db_new'; + //public $database_name='navigator_db'; + public $database_name='navigator_db_new'; //the type of database server public $database_type='mysql'; @@ -76,4 +82,4 @@ } -?> \ No newline at end of file +?> Modified: trunk/src/dl-learner/org/dllearner/scripts/CalculatePageRank.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/CalculatePageRank.java 2009-03-26 14:26:46 UTC (rev 1667) +++ trunk/src/dl-learner/org/dllearner/scripts/CalculatePageRank.java 2009-03-27 10:53:47 UTC (rev 1668) @@ -340,11 +340,11 @@ con = DriverManager.getConnection( url, dbUser, dbPass); - //cal.calculateLinks(); - //cal.addLabels(); + cal.calculateLinks(); + cal.addLabels(); //cal.calculateCategories(); cal.calculateCategoriesNewOntology(); - //cal.copyNumbers(); + cal.copyNumbers(); con.close(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-01 08:50:18
|
Revision: 1673 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1673&view=rev Author: jenslehmann Date: 2009-04-01 08:50:07 +0000 (Wed, 01 Apr 2009) Log Message: ----------- - started DBpedia -> OSM mapping - added secondstring library for various string metrics Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java Added Paths: ----------- trunk/lib/secondstring-20060615.jar trunk/src/dl-learner/org/dllearner/scripts/matching/ trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java Added: trunk/lib/secondstring-20060615.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/secondstring-20060615.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2009-04-01 05:14:44 UTC (rev 1672) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SPARQLTasks.java 2009-04-01 08:50:07 UTC (rev 1673) @@ -472,6 +472,7 @@ /** * low level, executes query returns ResultSet. + * TODO: Why convert from result set to JSON and back? See method below. * * @param sparqlQueryString * The query @@ -482,6 +483,12 @@ } + public ResultSet queryAsResultSet2(String sparqlQueryString) { + SparqlQuery sq = new SparqlQuery(sparqlQueryString, sparqlEndpoint); + sq.send(); + return sq.getResultSet(); + } + /** * low level, executes query returns JSON. * Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java 2009-04-01 05:14:44 UTC (rev 1672) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java 2009-04-01 08:50:07 UTC (rev 1673) @@ -138,7 +138,8 @@ public static SparqlEndpoint getEndpointDBpedia() { URL u = null; try { - u = new URL("http://dbpedia.openlinksw.com:8890/sparql"); + u = new URL("http://dbpedia.org/sparql"); +// u = new URL("http://dbpedia.openlinksw.com:8890/sparql"); } catch (Exception e) { e.printStackTrace(); } Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java 2009-04-01 05:14:44 UTC (rev 1672) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQuery.java 2009-04-01 08:50:07 UTC (rev 1673) @@ -187,6 +187,8 @@ /** * @return the Jena QueryEngineHTTP */ + // ANY NEED TO GET THIS FROM OUTSIDE? + @Deprecated public QueryEngineHTTP getExecution() { return queryExecution; } @@ -195,6 +197,8 @@ * insert a result, e.g. from the cache * @param json a jsonString */ + // LOOKS LIKE A HACK + @Deprecated public void setJson(String json) { this.wasExecuted = true; this.json = json; @@ -203,6 +207,8 @@ /** * @param running s.e. */ + // SHOULD NOT BE SET FROM OUTSIDE + @Deprecated public void setRunning(boolean running) { this.isRunning = running; } @@ -213,6 +219,9 @@ * * @return a JSON string */ + // WHY NOT EXECUTE SEND() AND THEN CALL THIS METHOD? + // returning null seems safer instead of executing the query (again) + @Deprecated public String getJson() { if (!wasExecuted) { this.send(); @@ -225,6 +234,7 @@ * * @return a Jena ResultSet */ + // SHOULD BE A SIMPLE GETTER SINCE RESULTSET IS MAIN JENA STRUCTURE public ResultSet getResultSet() { return (getJson() == null) ? null : convertJSONtoResultSet(json); } @@ -234,6 +244,7 @@ * * @return An XML String */ + // SHOULD CONVERT FROM RESULTSET public String getXMLString() { return (getJson() == null) ? null : convertJSONtoXML(json); } @@ -330,71 +341,4 @@ return convertResultSetToXMLString(convertJSONtoResultSet(json)); } - - /*** - public static String sendGetRequest(String urlStr) - { - String result = null; - - - try - { - StringBuffer data = new StringBuffer(); - - //String urlStr = endpoint; - // if (requestParameters != null && requestParameters.length () > 0) - //{ - //urlStr += "?" + requestParameters; - //} - //urlStr = "http://www.klappstuhlclub.de"; - URL url = new URL(urlStr); - System.out.println(urlStr); - URLConnection conn = url.openConnection (); - - // Get the response - BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); - StringBuffer sb = new StringBuffer(); - String line=""; - System.out.println("aa"+line); - while ((line = rd.readLine()) != null) - { - System.out.println("aa"+line); - sb.append(line); - } - rd.close(); - result = sb.toString(); - } catch (Exception e) - { - e.printStackTrace(); - } - - return result; - } - - public String fallback(){ - System.out.println("TEST"); - try{ - String urlStr = (sparqlEndpoint.getURL().toString()+"?query="+sparqlQueryString); - //URLConnection con = url.openConnection(); - System.out.println(sendGetRequest(urlStr)); - System.out.println("f"); - //System.out.println(con.getContentLength()); - //con.connect(); - System.out.println("sdf"); - String a = "12345"; - byte[] b = a.getBytes(); - //con.getInputStream().read(b); - System.out.println(new String (b)); - //Object o = con.getContent(); - //System.out.println(o+o.getClass().getCanonicalName()); - }catch (Exception ea) { - // TODO: handle exception - } - return ""; - } - - - - */ - } Added: trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java 2009-04-01 08:50:07 UTC (rev 1673) @@ -0,0 +1,66 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.scripts.matching; + +import java.net.URI; + +import org.dllearner.kb.sparql.SPARQLTasks; +import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.kb.sparql.SparqlQuery; + +import com.hp.hpl.jena.query.QuerySolution; +import com.hp.hpl.jena.query.ResultSet; + +/** + * Computes owl:sameAs links between DBpedia and LinkedGeoData + * (or Wikipedia and OSM). + * + * @author Jens Lehmann + * + */ +public class DBpediaLinkedGeoData { + + public static void main(String[] args) { + + // we start from the DBpedia URI and try to find the corresponding + // OSM URI (assuming that each location having coordinates in Wikipedia also + // exists in OSM) + URI dbpediaURI = URI.create("http://dbpedia.org/resource/Auerbachs_Keller"); + + // use official DBpedia endpoint (switch to db0 later) + SparqlEndpoint endpoint = SparqlEndpoint.getEndpointDBpedia(); + SPARQLTasks st = new SPARQLTasks(endpoint); + + // query latitude and longitude + String query = "SELECT ?lat ?long WHERE { "; + query += "<" + dbpediaURI + "> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat ."; + query += "<" + dbpediaURI + "> <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long . } LIMIT 1"; + + // perform query and read lat and long from results + ResultSet results = st.queryAsResultSet2(query); + QuerySolution qs = results.nextSolution(); + String geoLat = qs.getLiteral("lat").getString(); + String geoLong = qs.getLiteral("long").getString(); + + System.out.println("lat: " + geoLat + ", long: " + geoLong); + + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-01 13:20:27
|
Revision: 1679 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1679&view=rev Author: jenslehmann Date: 2009-04-01 13:20:18 +0000 (Wed, 01 Apr 2009) Log Message: ----------- - continued manual => not in draft status anymore => please report any issues, typos, omissions you find Modified Paths: -------------- trunk/doc/manual/manual.tex trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-04-01 11:59:16 UTC (rev 1678) +++ trunk/doc/manual/manual.tex 2009-04-01 13:20:18 UTC (rev 1679) @@ -23,7 +23,7 @@ \urldef{\owlapi}{\url}{http://owlapi.sourceforge.net} \urldef{\dig}{\url}{http://dl.kr.org/dig/} -\title{DL-Learner Manual [Draft]} +\title{DL-Learner Manual} \author{Jens Lehmann} \pagestyle{scrheadings} @@ -81,7 +81,7 @@ more accurate (83,33%) class expression found: male solutions (at most 20 are shown): 1: (male and hasChild some Thing) (accuracy 100%, length 5, depth 3) -Algorithm terminated succesfully. +Algorithm terminated successfully. number of retrievals: 4 retrieval reasoning time: 0ms (0ms per retrieval) @@ -151,12 +151,12 @@ \subsection{Learning Problems} -In the introductory Sections \ref{sec:whatis} and \ref{sec:start}, we described a specific learning problem where positive and negative examples are given. In practice different variations of similar problems occur. You can switch between the different problems using \verb|problem=$value;|, where \verb|$value| is one of \verb|posNegDefinitionLP|, \verb|posOnlyDefinitionLP|, \verb|classLearning|. The default is \verb|posNegDefinitionLP|. \todo{Names may change in next release.} +In the introductory Sections \ref{sec:whatis} and \ref{sec:start}, we described a specific learning problem where positive and negative examples are given. In practice different variations of similar problems occur. You can switch between the different problems using \verb|problem=$value;|, where \verb|$value| is one of \verb|posNegLPStandard|, \verb|posOnlyLP|, \verb|classLearning|. The default is \verb|posNegLPStandard|. \begin{description} - \item[Positive and Negative Examples] Let the name of the background ontology be $\mathcal{O}$. The goal in this learning problem is to find an OWL class expression $C$ such that all/many positive examples are instances of $C$ w.r.t.~$\mathcal{O}$ and none/few negative examples are instances of $C$ w.r.t.~$\mathcal{O}$. As explained previously, $C$ should be learned such that it generalises to unseen individuals and is readable. The important configuration options of this component are obviously the positive and negative examples, which are often indicated with \verb|+| and \verb|-| signs in conf files as an optional shortcut to using e.g.~\verb|posNegDefinitionLP.positiveExamples = {...}|. + \item[Positive and Negative Examples] Let the name of the background ontology be $\mathcal{O}$. The goal in this learning problem is to find an OWL class expression $C$ such that all/many positive examples are instances of $C$ w.r.t.~$\mathcal{O}$ and none/few negative examples are instances of $C$ w.r.t.~$\mathcal{O}$. As explained previously, $C$ should be learned such that it generalises to unseen individuals and is readable. The important configuration options of this component are obviously the positive and negative examples, which are often indicated with \verb|+| and \verb|-| signs in conf files as an optional shortcut to using e.g.~\verb|posNegLPStandard.positiveExamples = {...}|. \item[Positive Examples] This learning problem is similar to the one before, but without negative examples. In this case, it is desirable to find a class expression which closely fits the positive examples while still generalising sufficiently well. For instance, you usually do not want to have \verb|owl:Thing| as a solution for this problem, but neither do you want to have an enumeration of all examples. - \item[Class Learning] In class learning, you are given an existing class $A$ within your ontology $\mathcal{O}$ and want to describe it. It is similar to the previous problem in that you can use the instances of the class as positive examples. However, there are some differences, e.g.~you do not want to have $A$ itself as a proposed solution of the problem, and since this is an ontology engineering task, the focus on short and readable class expressions is stronger than for the two problems mentioned before. \todo{This learning problem is under construction, but will be implemented soon.} + \item[Class Learning] In class learning, you are given an existing class $A$ within your ontology $\mathcal{O}$ and want to describe it. It is similar to the previous problem in that you can use the instances of the class as positive examples. However, there are some differences, e.g.~you do not want to have $A$ itself as a proposed solution of the problem, and since this is an ontology engineering task, the focus on short and readable class expressions is stronger than for the two problems mentioned before. The learner can also take advantage of existing knowledge about the class to describe. \end{description} \subsection{Learning Algorithms} @@ -178,8 +178,8 @@ \item maximum execution time: If there is no perfect solution of a given problem, the algorithm can potentially run forever (in practice it will run out of memory). It is therefore often interesting to limit the execution time. You can use e.g.~\verb|refinement.maxExecutionTimeInSeconds = 100| to say that the algorithm should run for at most 100 seconds. Often, it will run slightly longer than the maximum execution time since it waits for the next internal loop of the algorithm to stop gracefully. \end{itemize} The algorithm supports a range of further options. For instance, one can specify which classes and properties must not occur in resulting class expressions. - \item[Refinement II] The previous algorithm has been extended to make more sophisticated use of background knowledge and therefore run more efficiently on many problems. It also supports double datatypes and hasValue restrictions (which again can be turned on or off as desired). It also includes explicit noise handling through the \verb|noisePercentage| option. This is currently the default and recommend algorithm for learning from positive and negative examples. More than 30 options can be set to control its behaviour. However, apart from the target language the most important setting is noise, which should be optimised for the given problem. \todo{noisePercentage will be renamed to to minAccuracy which describes it better} - \item[Class Expression Learning for Ontology Engineering (CELOE)] \todo{This algorithm is under construction.} + \item[Refinement II] The previous algorithm has been extended to make more sophisticated use of background knowledge and therefore run more efficiently on many problems. It also supports double datatypes and hasValue restrictions (which again can be turned on or off as desired). It also includes explicit noise handling through the \verb|noisePercentage| option. This is currently the default and recommend algorithm for learning from positive and negative examples. More than 30 options can be set to control its behaviour. However, apart from the target language the most important setting is noise, which should be optimised for the given problem. + \item[Class Expression Learning for Ontology Engineering (CELOE)] Currently CELOE is the best class learning algorithm available within DL-Learner. It uses the same refinement operator as Refinement II, but a completely different heuristics. Furthermore, it guarantees that the returned class expressions are minimal in the sense that one cannot remove parts of them without getting an inequivalent expression. Furthermore, it makes use of existing background knowledge in coverage checks. Statistical methods are used to improve the efficiency of the algorithm such that it scales to large knowledge bases. While it was originally designed for ontology engineering, it can also be used for other learning problems and might even be superior to the other algorithms in many cases (not well-tested yet). Note that many configuration options of Refinement II were dropped for the sake of simplicity, but might be introduced if needed. \end{description} Please note that while components are interchangeable, it is not possible to arbitrarily combine them. For instance, the newer learning algorithms do not work with the DIG interface, since it does not provide the necessary inference tasks. Furthermore, a learning algorithm can specify which learning problems it can solve, i.e.~we do not require it to be able to solve each learning problem. Table \ref{tab:la_lp_comp} provides a compatibility matrix. Note that this can change in future releases, because algorithms may be extended to support new learning problems or drop support for them. @@ -209,7 +209,7 @@ Apart from the command line, there is also a prototypical graphical interface. You can use \verb|gui| (or \verb|gui.bat|) to start it. Optionally, a conf file can be passed as argument. The main GUI window has four tabs corresponding to the four different types of components and a run tab to execute the learning algorithm. Using the GUI, you can assemble the desired combination of components and options. The \verb|File| menu allows you to load a conf file or save the current configuration to a conf file. The GUI implementation is currently prototypical, so please report any bugs or feature requests you have (see Section \ref{sec:contact}). Since the GUI uses the component manager, it will automatically evolve when new components and options are added. -A third interface through which DL-Learner can be accessed programmatically is a web service. You can execute \verb|ws| (or \verb|ws.bat|) to start the web service. It is based on the Java API for XML Web Services (JAX-WS), which is included in Java 6 or higher. Executing the command will start a web server on port 8181 of your local machine. The WSDL can be accessed via \url{http://localhost:8181/services?wsdl}. You can use a WSDL viewer to see the supported operations or view the JavaDoc of the corresponding Java file\footnote{viewable online at \wsjavadoc}. Some examples for calling the web service from PHP can be found in the DL-Learner subversion repository\footnote{in the directory src/php-examples/:\\ \wsphpexamples}.\todo{Javadoc of web service needs to be improved} +A third interface through which DL-Learner can be accessed programmatically is a web service. You can execute \verb|ws| (or \verb|ws.bat|) to start the web service. It is based on the Java API for XML Web Services (JAX-WS), which is included in Java 6 or higher. Executing the command will start a web server on port 8181 of your local machine. The WSDL can be accessed via \url{http://localhost:8181/services?wsdl}. You can use a WSDL viewer to see the supported operations or view the JavaDoc of the corresponding Java file\footnote{viewable online at \wsjavadoc}. Some examples for calling the web service from PHP can be found in the DL-Learner subversion repository\footnote{in the directory src/php-examples/:\\ \wsphpexamples}. Another means to access DL-Learner, in particular for ontology engineering, is to use the OntoWiki and Protégé plugins. The OntoWiki plugin is not officially released yet, but can be used in the SVN version of OntoWiki. The Protégé 4 plugin can be installed either by downloading it from the DL-Learner download page or directly within Protégé 4 by clicking on ``File'', ``Preferences'', ``Plugins'', ``Check for Downloads'' now and selecting the DL-Learner plugin. For more information and a screencast see the Protégé plugin wiki page \footnote{\wikiprotplugin}. @@ -246,8 +246,8 @@ \item boolean, e.g. \verb|useCache| \item string (a set of allowed strings can be specified), e.g. \verb|cacheDir| \item URL, e.g. \verb|reasonerURL| - \item int (min and max value can be specifified), e.g. \verb|maxDepth| - \item double (min and max value can be specifified), e.g. \verb|noisePercentage| + \item int (min and max value can be specified), e.g. \verb|maxDepth| + \item double (min and max value can be specified), e.g. \verb|noisePercentage| \item set of strings, e.g. \verb|positiveExamples| \item list of string tuples, e.g. \verb|replaceObject| \end{itemize} Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-04-01 11:59:16 UTC (rev 1678) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-04-01 13:20:18 UTC (rev 1679) @@ -286,7 +286,7 @@ if (stop) { logger.info("Algorithm stopped ("+descriptionTests+" descriptions tested).\n"); } else { - logger.info("Algorithm terminated succesfully ("+descriptionTests+" descriptions tested).\n"); + logger.info("Algorithm terminated successfully ("+descriptionTests+" descriptions tested).\n"); } // print solution(s) Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-01 11:59:16 UTC (rev 1678) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-01 13:20:18 UTC (rev 1679) @@ -536,7 +536,7 @@ if (stop) { logger.info("Algorithm stopped ("+conceptTests+" descriptions tested).\n"); } else { - logger.info("Algorithm terminated succesfully ("+conceptTests+" descriptions tested).\n"); + logger.info("Algorithm terminated successfully ("+conceptTests+" descriptions tested).\n"); } totalLearningTime.stop(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2009-04-08 08:14:50
|
Revision: 1687 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1687&view=rev Author: lorenz_b Date: 2009-04-08 08:14:39 +0000 (Wed, 08 Apr 2009) Log Message: ----------- added some examples modified getDomainImpl() methods. now they return the most particular domain added unit test Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java trunk/src/dl-learner/org/dllearner/test/junit/ReasonerTests.java Added Paths: ----------- trunk/examples/ore/example.owl trunk/examples/ore/koala.owl trunk/examples/ore/koala_inc.owl trunk/examples/ore/madcow.owl trunk/examples/ore/miniEconomy.owl trunk/examples/ore/university.owl Added: trunk/examples/ore/example.owl =================================================================== --- trunk/examples/ore/example.owl (rev 0) +++ trunk/examples/ore/example.owl 2009-04-08 08:14:39 UTC (rev 1687) @@ -0,0 +1,98 @@ +<?xml version="1.0"?> + + +<!DOCTYPE Ontology [ + <!ENTITY p1 "http://www.owl-ontologies.com/assert.owl#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<Ontology xmlns="http://www.w3.org/2006/12/owl2-xml#" + xml:base="http://www.w3.org/2006/12/owl2-xml#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:p1="http://www.owl-ontologies.com/assert.owl#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + URI="file:examples/ore/miniexample.owl"> + <SubClassOf> + <Class URI="A1"/> + <ObjectIntersectionOf> + <Class URI="A2"/> + <Class URI="A3"/> + <ObjectComplementOf> + <Class URI="A"/> + </ObjectComplementOf> + </ObjectIntersectionOf> + </SubClassOf> + <SubClassOf> + <Class URI="A2"/> + <ObjectIntersectionOf> + <Class URI="A"/> + <Class URI="A4"/> + </ObjectIntersectionOf> + </SubClassOf> + <SubClassOf> + <Class URI="A3"/> + <ObjectIntersectionOf> + <Class URI="A4"/> + <Class URI="A5"/> + </ObjectIntersectionOf> + </SubClassOf> + <SubClassOf> + <Class URI="A4"/> + <ObjectIntersectionOf> + <Class URI="C"/> + <ObjectAllValuesFrom> + <ObjectProperty URI="S"/> + <Class URI="B"/> + </ObjectAllValuesFrom> + </ObjectIntersectionOf> + </SubClassOf> + <SubClassOf> + <Class URI="A5"/> + <ObjectSomeValuesFrom> + <ObjectProperty URI="S"/> + <ObjectComplementOf> + <Class URI="B"/> + </ObjectComplementOf> + </ObjectSomeValuesFrom> + </SubClassOf> + <EquivalentClasses> + <Class URI="A6"/> + <Class URI="D"/> + </EquivalentClasses> + <ClassAssertion> + <Class URI="t#A1"/> + <Individual URI="a"/> + </ClassAssertion> + <ClassAssertion> + <Class URI="t#A3"/> + <Individual URI="b"/> + </ClassAssertion> + <SubClassOf> + <ObjectUnionOf> + <Class URI="D"/> + <ObjectComplementOf> + <Class URI="D"/> + </ObjectComplementOf> + </ObjectUnionOf> + <ObjectIntersectionOf> + <Class URI="D"/> + <ObjectComplementOf> + <Class URI="D"/> + </ObjectComplementOf> + </ObjectIntersectionOf> + </SubClassOf> +</Ontology> + + + +<!-- Generated by the OWL API (version 2.2.1.913) http://owlapi.sourceforge.net --> + Added: trunk/examples/ore/koala.owl =================================================================== --- trunk/examples/ore/koala.owl (rev 0) +++ trunk/examples/ore/koala.owl 2009-04-08 08:14:39 UTC (rev 1687) @@ -0,0 +1,250 @@ +<?xml version="1.0"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#" + xml:base="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl"> + <owl:Ontology rdf:about=""/> + <owl:Class rdf:ID="Female"> + <owl:equivalentClass> + <owl:Restriction> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#hasGender"/> + </owl:onProperty> + <owl:hasValue> + <Gender rdf:ID="female"/> + </owl:hasValue> + </owl:Restriction> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="Marsupials"> + <owl:disjointWith> + <owl:Class rdf:about="#Person"/> + </owl:disjointWith> + <rdfs:subClassOf> + <owl:Class rdf:about="#Animal"/> + </rdfs:subClassOf> + </owl:Class> + <owl:Class rdf:ID="Student"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#Person"/> + <owl:Restriction> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#isHardWorking"/> + </owl:onProperty> + <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" + >true</owl:hasValue> + </owl:Restriction> + <owl:Restriction> + <owl:someValuesFrom> + <owl:Class rdf:about="#University"/> + </owl:someValuesFrom> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasHabitat"/> + </owl:onProperty> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="KoalaWithPhD"> + <owl:versionInfo>1.2</owl:versionInfo> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:hasValue> + <Degree rdf:ID="PhD"/> + </owl:hasValue> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasDegree"/> + </owl:onProperty> + </owl:Restriction> + <owl:Class rdf:about="#Koala"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="University"> + <rdfs:subClassOf> + <owl:Class rdf:ID="Habitat"/> + </rdfs:subClassOf> + </owl:Class> + <owl:Class rdf:ID="Koala"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" + >false</owl:hasValue> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#isHardWorking"/> + </owl:onProperty> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:someValuesFrom> + <owl:Class rdf:about="#DryEucalyptForest"/> + </owl:someValuesFrom> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasHabitat"/> + </owl:onProperty> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + </owl:Class> + <owl:Class rdf:ID="Animal"> + <rdfs:seeAlso>Male</rdfs:seeAlso> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasHabitat"/> + </owl:onProperty> + <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" + >1</owl:minCardinality> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" + >1</owl:cardinality> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#hasGender"/> + </owl:onProperty> + </owl:Restriction> + </rdfs:subClassOf> + <owl:versionInfo>1.1</owl:versionInfo> + </owl:Class> + <owl:Class rdf:ID="Forest"> + <rdfs:subClassOf rdf:resource="#Habitat"/> + </owl:Class> + <owl:Class rdf:ID="Rainforest"> + <rdfs:subClassOf rdf:resource="#Forest"/> + </owl:Class> + <owl:Class rdf:ID="GraduateStudent"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasDegree"/> + </owl:onProperty> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <Degree rdf:ID="BA"/> + <Degree rdf:ID="BS"/> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf rdf:resource="#Student"/> + </owl:Class> + <owl:Class rdf:ID="Parent"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#Animal"/> + <owl:Restriction> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasChildren"/> + </owl:onProperty> + <owl:minCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" + >1</owl:minCardinality> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <rdfs:subClassOf rdf:resource="#Animal"/> + </owl:Class> + <owl:Class rdf:ID="DryEucalyptForest"> + <rdfs:subClassOf rdf:resource="#Forest"/> + </owl:Class> + <owl:Class rdf:ID="Quokka"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:hasValue rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean" + >true</owl:hasValue> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#isHardWorking"/> + </owl:onProperty> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + </owl:Class> + <owl:Class rdf:ID="TasmanianDevil"> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + </owl:Class> + <owl:Class rdf:ID="MaleStudentWith3Daughters"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#Student"/> + <owl:Restriction> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#hasGender"/> + </owl:onProperty> + <owl:hasValue> + <Gender rdf:ID="male"/> + </owl:hasValue> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasChildren"/> + </owl:onProperty> + <owl:cardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#int" + >3</owl:cardinality> + </owl:Restriction> + <owl:Restriction> + <owl:allValuesFrom rdf:resource="#Female"/> + <owl:onProperty> + <owl:ObjectProperty rdf:about="#hasChildren"/> + </owl:onProperty> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="Degree"/> + <owl:Class rdf:ID="Male"> + <owl:equivalentClass> + <owl:Restriction> + <owl:hasValue rdf:resource="#male"/> + <owl:onProperty> + <owl:FunctionalProperty rdf:about="#hasGender"/> + </owl:onProperty> + </owl:Restriction> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="Gender"/> + <owl:Class rdf:ID="Person"> + <rdfs:subClassOf rdf:resource="#Animal"/> + <owl:disjointWith rdf:resource="#Marsupials"/> + </owl:Class> + <owl:ObjectProperty rdf:ID="hasHabitat"> + <rdfs:range rdf:resource="#Habitat"/> + <rdfs:domain rdf:resource="#Animal"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="hasDegree"> + <rdfs:domain rdf:resource="#Person"/> + <rdfs:range rdf:resource="#Degree"/> + </owl:ObjectProperty> + <owl:ObjectProperty rdf:ID="hasChildren"> + <rdfs:range rdf:resource="#Animal"/> + <rdfs:domain rdf:resource="#Animal"/> + </owl:ObjectProperty> + <owl:FunctionalProperty rdf:ID="hasGender"> + <rdfs:range rdf:resource="#Gender"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#ObjectProperty"/> + <rdfs:domain rdf:resource="#Animal"/> + </owl:FunctionalProperty> + <owl:FunctionalProperty rdf:ID="isHardWorking"> + <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#boolean"/> + <rdfs:domain rdf:resource="#Person"/> + <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#DatatypeProperty"/> + </owl:FunctionalProperty> + <Degree rdf:ID="MA"/> +</rdf:RDF> + +<!-- Created with Protege (with OWL Plugin, Build 60) http://protege.stanford.edu --> Added: trunk/examples/ore/koala_inc.owl =================================================================== --- trunk/examples/ore/koala_inc.owl (rev 0) +++ trunk/examples/ore/koala_inc.owl 2009-04-08 08:14:39 UTC (rev 1687) @@ -0,0 +1,443 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY dc "http://purl.org/dc/elements/1.1/" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > + <!ENTITY koala "http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#" > +]> + + +<rdf:RDF xmlns="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#" + xml:base="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#" + xmlns:koala="http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasChildren --> + + <owl:ObjectProperty rdf:about="#hasChildren"> + <rdfs:range rdf:resource="#Animal"/> + <rdfs:domain rdf:resource="#Animal"/> + </owl:ObjectProperty> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasDegree --> + + <owl:ObjectProperty rdf:about="#hasDegree"> + <rdfs:range rdf:resource="#Degree"/> + <rdfs:domain rdf:resource="#Person"/> + </owl:ObjectProperty> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasGender --> + + <owl:ObjectProperty rdf:about="#hasGender"> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:domain rdf:resource="#Animal"/> + <rdfs:range rdf:resource="#Gender"/> + </owl:ObjectProperty> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#hasHabitat --> + + <owl:ObjectProperty rdf:about="#hasHabitat"> + <rdfs:domain rdf:resource="#Animal"/> + <rdfs:range rdf:resource="#Habitat"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Data properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#isHardWorking --> + + <owl:DatatypeProperty rdf:about="#isHardWorking"> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:domain rdf:resource="#Person"/> + <rdfs:range rdf:resource="&xsd;boolean"/> + </owl:DatatypeProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Animal --> + + <owl:Class rdf:about="#Animal"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasGender"/> + <owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:cardinality> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasHabitat"/> + <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality> + </owl:Restriction> + </rdfs:subClassOf> + <owl:versionInfo>1.1</owl:versionInfo> + <rdfs:seeAlso>Male</rdfs:seeAlso> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Degree --> + + <owl:Class rdf:about="#Degree"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#DryEucalyptForest --> + + <owl:Class rdf:about="#DryEucalyptForest"> + <rdfs:subClassOf rdf:resource="#Forest"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Female --> + + <owl:Class rdf:about="#Female"> + <owl:equivalentClass> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasGender"/> + <owl:hasValue rdf:resource="#female"/> + </owl:Restriction> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Forest --> + + <owl:Class rdf:about="#Forest"> + <rdfs:subClassOf rdf:resource="#Habitat"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Gender --> + + <owl:Class rdf:about="#Gender"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#GraduateStudent --> + + <owl:Class rdf:about="#GraduateStudent"> + <rdfs:subClassOf rdf:resource="#Student"/> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasDegree"/> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <rdf:Description rdf:about="#BS"/> + <rdf:Description rdf:about="#BA"/> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Habitat --> + + <owl:Class rdf:about="#Habitat"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Koala --> + + <owl:Class rdf:about="#Koala"> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#isHardWorking"/> + <owl:hasValue rdf:datatype="&xsd;boolean">false</owl:hasValue> + </owl:Restriction> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasHabitat"/> + <owl:someValuesFrom rdf:resource="#DryEucalyptForest"/> + </owl:Restriction> + </rdfs:subClassOf> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#KoalaWithPhD --> + + <owl:Class rdf:about="#KoalaWithPhD"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="#Koala"/> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasDegree"/> + <owl:hasValue rdf:resource="#PhD"/> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <owl:versionInfo>1.2</owl:versionInfo> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Male --> + + <owl:Class rdf:about="#Male"> + <owl:equivalentClass> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasGender"/> + <owl:hasValue rdf:resource="#male"/> + </owl:Restriction> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#MaleStudentWith3Daughters --> + + <owl:Class rdf:about="#MaleStudentWith3Daughters"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="#Student"/> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasChildren"/> + <owl:allValuesFrom rdf:resource="#Female"/> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasGender"/> + <owl:hasValue rdf:resource="#male"/> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasChildren"/> + <owl:cardinality rdf:datatype="&xsd;nonNegativeInteger">3</owl:cardinality> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Marsupials --> + + <owl:Class rdf:about="#Marsupials"> + <rdfs:subClassOf rdf:resource="#Animal"/> + <owl:disjointWith rdf:resource="#Person"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Parent --> + + <owl:Class rdf:about="#Parent"> + <owl:equivalentClass> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasChildren"/> + <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:minCardinality> + </owl:Restriction> + </owl:equivalentClass> + <rdfs:subClassOf rdf:resource="#Animal"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Person --> + + <owl:Class rdf:about="#Person"> + <rdfs:subClassOf rdf:resource="#Animal"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Quokka --> + + <owl:Class rdf:about="#Quokka"> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#isHardWorking"/> + <owl:hasValue rdf:datatype="&xsd;boolean">true</owl:hasValue> + </owl:Restriction> + </rdfs:subClassOf> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Rainforest --> + + <owl:Class rdf:about="#Rainforest"> + <rdfs:subClassOf rdf:resource="#Forest"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Student --> + + <owl:Class rdf:about="#Student"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="#Person"/> + <owl:Restriction> + <owl:onProperty rdf:resource="#hasHabitat"/> + <owl:someValuesFrom rdf:resource="#University"/> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="#isHardWorking"/> + <owl:hasValue rdf:datatype="&xsd;boolean">true</owl:hasValue> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#TasmanianDevil --> + + <owl:Class rdf:about="#TasmanianDevil"> + <rdfs:subClassOf rdf:resource="#Marsupials"/> + </owl:Class> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#University --> + + <owl:Class rdf:about="#University"> + <rdfs:subClassOf rdf:resource="#Habitat"/> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#BA --> + + <Degree rdf:about="#BA"> + <rdf:type rdf:resource="&owl;Thing"/> + </Degree> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#BS --> + + <Degree rdf:about="#BS"> + <rdf:type rdf:resource="&owl;Thing"/> + </Degree> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Lizzy --> + + <KoalaWithPhD rdf:about="#Lizzy"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#MA --> + + <Degree rdf:about="#MA"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Pan --> + + <Quokka rdf:about="#Pan"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#PhD --> + + <Degree rdf:about="#PhD"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Suzy --> + + <Koala rdf:about="#Suzy"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#female --> + + <Gender rdf:about="#female"/> + + + + <!-- http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#male --> + + <Gender rdf:about="#male"/> +</rdf:RDF> + + + +<!-- Generated by the OWL API (version 2.2.1.913) http://owlapi.sourceforge.net --> + Added: trunk/examples/ore/madcow.owl =================================================================== --- trunk/examples/ore/madcow.owl (rev 0) +++ trunk/examples/ore/madcow.owl 2009-04-08 08:14:39 UTC (rev 1687) @@ -0,0 +1,1076 @@ +<?xml version="1.0"?> +<!DOCTYPE owl [ +<!ENTITY owl "http://www.w3.org/2002/07/owl#"> +<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#"> +<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#"> +<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#"> +]> +<rdf:RDF + xmlns:old="http://cohse.semanticweb.org/ontologies/people#old+" + xmlns:has="http://cohse.semanticweb.org/ontologies/people#has+" + xmlns:people="http://cohse.semanticweb.org/ontologies/people#" + xmlns:mad="http://cohse.semanticweb.org/ontologies/people#mad+" + xmlns:red="http://cohse.semanticweb.org/ontologies/people#red+" + xmlns:cat="http://cohse.semanticweb.org/ontologies/people#cat+" + xmlns:animal="http://cohse.semanticweb.org/ontologies/people#animal+" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:haulage="http://cohse.semanticweb.org/ontologies/people#haulage+" + xmlns:lorry="http://cohse.semanticweb.org/ontologies/people#lorry+" + xmlns:quality="http://cohse.semanticweb.org/ontologies/people#quality+" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:bus="http://cohse.semanticweb.org/ontologies/people#bus+" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:van0="http://cohse.semanticweb.org/ontologies/people#white+van+" + xmlns:part="http://cohse.semanticweb.org/ontologies/people#part+" + xmlns:truck="http://cohse.semanticweb.org/ontologies/people#haulage+truck+" + xmlns:pet="http://cohse.semanticweb.org/ontologies/people#pet+" + xmlns:dog="http://cohse.semanticweb.org/ontologies/people#dog+" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:van="http://cohse.semanticweb.org/ontologies/people#van+" + xmlns:eaten="http://cohse.semanticweb.org/ontologies/people#eaten+" + xmlns:works="http://cohse.semanticweb.org/ontologies/people#works+" +> +<owl:Ontology rdf:about="http://www.cs.man.ac.uk/~horrocks/OWL/Ontologies/mad_cows.owl"> +</owl:Ontology> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://www.w3.org/2002/07/owl#Thing"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal+lover"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:minCardinality rdf:datatype="&xsd;nonNegativeInteger">3</owl:minCardinality> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bicycle"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bone"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#boy"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#sex" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#male"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#young"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#brain"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#broadsheet"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#newspaper"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bus"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bus+company"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#company"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bus+driver"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bus"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <rdfs:subClassOf> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#reads" /> + <owl:allValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#broadsheet"> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#likes" /> + <owl:someValuesFrom> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#young"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:unionOf> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#car"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat+liker"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#likes" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat+owner"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#colour"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#company"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cow"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vegetarian"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#dog"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#bone"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#dog+liker"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#likes" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#dog"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#dog+owner"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#dog"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#driver"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#giraffe"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:allValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#leaf"> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#girl"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#sex" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#female"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#young"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#grass"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#plant"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#grownup"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#adult"> + </owl:Thing> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#elderly"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+company"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+truck+driver"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#works+for" /> + <owl:someValuesFrom> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#part+of" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+company"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#truck"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+worker"> + <owl:equivalentClass> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#works+for" /> + <owl:someValuesFrom> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#part+of" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+company"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#haulage+company"> + </owl:Class> + </owl:unionOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#kid"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#young"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#leaf"> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#part+of" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tree"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#lorry"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#lorry+driver"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#lorry"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#mad+cow"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cow"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:someValuesFrom> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#brain"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#part+of" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#sheep"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#magazine"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#publication"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#man"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#adult"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#sex" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#male"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#newspaper"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#publication"> + </owl:Class> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tabloid"> + </owl:Class> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#broadsheet"> + </owl:Class> + </owl:unionOf> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#old+lady"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#age" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#elderly"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#sex" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#female"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <rdfs:subClassOf> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:allValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#cat"> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#pet+owner"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+pet" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#plant"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#publication"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#quality+broadsheet"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#broadsheet"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#red+top"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tabloid"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#sheep"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </rdfs:subClassOf> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:allValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#grass"> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tabloid"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#newspaper"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tree"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#plant"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#truck"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#van"> + <rdfs:subClassOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> + </owl:Class> + </rdfs:subClassOf> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#van+driver"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#person"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#van"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vegetarian"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:allValuesFrom> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#part+of" /> + <owl:someValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#eats" /> + <owl:allValuesFrom> + <owl:Class> + <owl:complementOf> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#animal"> + </owl:Class> + </owl:complementOf> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#vehicle"> +</owl:Class> +<owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#white+van+man"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#man"> + </owl:Class> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#drives" /> + <owl:someValuesFrom> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#has+colour" /> + <owl:someValuesFrom> + <owl:Class> + <owl:oneOf rdf:parseType="Collection"> + <owl:Thing rdf:about="http://cohse.semanticweb.org/ontologies/people#white"> + </owl:Thing> + </owl:oneOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#van"> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:someValuesFrom> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <rdfs:subClassOf> + <owl:Restriction> + <owl:onProperty rdf:resource="http://cohse.semanticweb.org/ontologies/people#reads" /> + <owl:allValuesFrom> + <owl:Class rdf:about="http://cohse.semanticweb.org/ontologies/people#tabloid"> + </owl:Class> + </owl:allValuesFrom> + </owl:Restriction... [truncated message content] |
From: <jen...@us...> - 2009-04-14 09:51:35
|
Revision: 1699 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1699&view=rev Author: jenslehmann Date: 2009-04-14 09:51:30 +0000 (Tue, 14 Apr 2009) Log Message: ----------- learning example for moosique.net Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java Added Paths: ----------- trunk/examples/sparql/jamendo.owl trunk/examples/sparql/moosique.conf Added: trunk/examples/sparql/jamendo.owl =================================================================== --- trunk/examples/sparql/jamendo.owl (rev 0) +++ trunk/examples/sparql/jamendo.owl 2009-04-14 09:51:30 UTC (rev 1699) @@ -0,0 +1,79 @@ +@prefix : <http://dl-learner.org/jamendo/> . +@prefix tags: <http://dbtune.org/jamendo/tags/70> . +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . +@prefix owl2xml: <http://www.w3.org/2006/12/owl2-xml#> . +@prefix mo: <http://purl.org/ontology/mo/> . +@prefix tag: <http://dbtune.org/jamendo/tag/> . +@prefix owl: <http://www.w3.org/2002/07/owl#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix tags2: <http://dbtune.org/jamendo/tags/> . +@base <http://dl-learner.org/jamendo/> . + +<http://dl-learner.org/jamendo/> rdf:type owl:Ontology . + + +################################################################# +# +# Classes +# +################################################################# + + +### http://dbtune.org/jamendo/tag/guitare + +tag:guitare rdf:type owl:Class ; + + rdfs:subClassOf mo:Record . + + + +### http://dbtune.org/jamendo/tag/idm + +tag:idm rdf:type owl:Class ; + + rdfs:subClassOf mo:Record . + + + +### http://dbtune.org/jamendo/tags/70s + +tags:s rdf:type owl:Class ; + + rdfs:subClassOf mo:Record . + + + +### http://dbtune.org/jamendo/tags/electro + +tags2:electro rdf:type owl:Class ; + + rdfs:subClassOf mo:Record . + + + +### http://dbtune.org/jamendo/tags/house + +tags2:house rdf:type owl:Class ; + + rdfs:subClassOf tags2:electro . + + + +### http://purl.org/ontology/mo/Record + +mo:Record rdf:type owl:Class ; + + rdfs:subClassOf owl:Thing . + + + +### http://www.w3.org/2002/07/owl#Thing + +owl:Thing rdf:type owl:Class . + + + + +### Generated by the OWL API (version 2.2.1.1042) http://owlapi.sourceforge.net + Added: trunk/examples/sparql/moosique.conf =================================================================== --- trunk/examples/sparql/moosique.conf (rev 0) +++ trunk/examples/sparql/moosique.conf 2009-04-14 09:51:30 UTC (rev 1699) @@ -0,0 +1,70 @@ +/** + * moosique.net test example + */ + +// select the Jamendo endpoint as knowledge source +// import("http://dbtune.org:2105/sparql/","SPARQL"); +import("http://dbtune.org/jamendo/sparql/","SPARQL"); + +// select a set of "starting instances" => this includes positive examples (tracks/albums/artists +// last heard) as well as randomly selected objects of the same type (track/album/artist) - +// preferably those which have at least e.g. 3 tags; +// starting from these instances, DL-Learner extracts a fragment of the Jamendo knowledge base +sparql.instances = { +"http://dbtune.org/jamendo/record/1059", +"http://dbtune.org/jamendo/record/1162", +"http://dbtune.org/jamendo/record/1262", +"http://dbtune.org/jamendo/record/1363", +"http://dbtune.org/jamendo/record/1465", +"http://dbtune.org/jamendo/record/1568", +"http://dbtune.org/jamendo/record/1668", +"http://dbtune.org/jamendo/record/1769", +"http://dbtune.org/jamendo/record/1869", +"http://dbtune.org/jamendo/record/1970" +}; + +// recursion depth => the maximum distance of an object in the fragment from one of +// the starting instances +sparql.recursionDepth = 2; + +// we transform tags to classes (such that we can build a taxonomy of tags) on the fly; +// => later we may send the taxonomy to Yves if he is interested in using a taxonomy instead +// of plain tags +sparql.replacePredicate=[( +"http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag", +"http://www.w3.org/1999/02/22-rdf-syntax-ns#type")]; + +// whether to save the extracted fragment (use e.g. Protege to view it); +// by default this goes to fragmentOntology.owl in the DL-Learner directory +sparql.saveExtractedFragment = true; + +// we now import the background knowledge including the taxonomy of tags +// (but you can specify any additional knowledge in this file - the more +// knowledge available, the better the suggestions) +// you can use e.g. Protege to create the taxonomy +// (set File >> Preferences >> Renderer to qnames) or a plain text editor +import("jamendo.owl"); + +// we want to learn from positive examples only +problem = posOnlyLP; +// positive examples = records liked/listened to by user ++"http://dbtune.org/jamendo/record/1059" ++"http://dbtune.org/jamendo/record/1162" ++"http://dbtune.org/jamendo/record/1262" + +// we use the new CELOE algorithm +algorithm = celoe; +// set the start class to the correct type (Record in this case) - not supported yet +// celoe.startClass = "http://purl.org/ontology/mo/Record"; +// let it run for a short amount of time (we only want simple expressions) +celoe.maxExecutionTimeInSeconds = 2; +// use owl:hasValue if appropriate +// see: http://www.w3.org/TR/2008/WD-owl2-syntax-20081202/#Individual_Value_Restriction +// not sure whether this greatly influences the results +celoe.useHasValueConstructor = true; +celoe.valueFrequencyThreshold = 2; + +// the conversion to natural language is not yet covered here; +// you can use the class org.dllearner.sparql.NaturalLanguageDescriptionConverter for this, +// but the implementation is quite bad at the moment; +// the web service contains a method getNaturalDescription() using the class above Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-04-14 08:11:55 UTC (rev 1698) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-04-14 09:51:30 UTC (rev 1699) @@ -116,7 +116,7 @@ private String baseURI; private Map<String, String> prefixes; private DecimalFormat dfPercent = new DecimalFormat("0.00%"); -// private ConceptComparator descriptionComparator = new ConceptComparator(); + private ConceptComparator descriptionComparator = new ConceptComparator(); // statistical variables private int descriptionTests = 0; @@ -377,6 +377,8 @@ if(isCandidate) { Description niceDescription = rewriteNode(node); + ConceptTransformation.transformToOrderedForm(niceDescription, descriptionComparator); +// Description niceDescription = node.getDescription(); // another test: none of the other suggested descriptions should be // a subdescription of this one unless accuracy is different This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-14 17:58:59
|
Revision: 1700 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1700&view=rev Author: jenslehmann Date: 2009-04-14 17:58:43 +0000 (Tue, 14 Apr 2009) Log Message: ----------- small change (unit tests) Modified Paths: -------------- trunk/examples/lymphography/lymphography_Class2.conf trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/examples/lymphography/lymphography_Class2.conf =================================================================== --- trunk/examples/lymphography/lymphography_Class2.conf 2009-04-14 09:51:30 UTC (rev 1699) +++ trunk/examples/lymphography/lymphography_Class2.conf 2009-04-14 17:58:43 UTC (rev 1700) @@ -23,10 +23,10 @@ "http://www.example.org/lymphography#Target4_Fibrosis" }; -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useNegation = false; -refexamples.noisePercentage = 13.0; +//refexamples.useAllConstructor = false; +//refexamples.useExistsConstructor = true; +//refexamples.useNegation = false; +refexamples.noisePercentage = 16.0; import("lymphography.owl"); Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-14 09:51:30 UTC (rev 1699) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-14 17:58:43 UTC (rev 1700) @@ -84,7 +84,7 @@ ignore.add("./examples/semantic_bible/sparqlbible.conf"); // requires local Joseki // temporarily not working (have a look at those before next release) - ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working/supported + // ignore.add("./examples/family/father_posonly.conf"); // ArrayOutOfBoundsException in Pellet - main problem: pos only not working/supported // ignored due to errors (should be fixed; in case of long running problems or // our of memory, it is better to increase the noise parameter and add comments @@ -99,7 +99,7 @@ //also working fine ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error // ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) - // ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error + ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error int failedCounter = 0; for (String path : confFiles.keySet()) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-15 13:50:58
|
Revision: 1703 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1703&view=rev Author: jenslehmann Date: 2009-04-15 13:33:41 +0000 (Wed, 15 Apr 2009) Log Message: ----------- extended example unit test Modified Paths: -------------- trunk/examples/sparql/README.txt trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Added Paths: ----------- trunk/examples/sparql/britishPrimeMinisters.conf Removed Paths: ------------- trunk/examples/sparql/britishPrimeMinisters_local.conf Modified: trunk/examples/sparql/README.txt =================================================================== --- trunk/examples/sparql/README.txt 2009-04-15 09:22:46 UTC (rev 1702) +++ trunk/examples/sparql/README.txt 2009-04-15 13:33:41 UTC (rev 1703) @@ -4,8 +4,8 @@ When using the SPARQL component, files are written into the directory /cache to avoid performing the same queries more than once. +Predefined Filters: -***predefined Filters all predefined filters remove references to hompage, etc during the extraction YAGO allows yago, SKOS allows skos, Copied: trunk/examples/sparql/britishPrimeMinisters.conf (from rev 1697, trunk/examples/sparql/britishPrimeMinisters_local.conf) =================================================================== --- trunk/examples/sparql/britishPrimeMinisters.conf (rev 0) +++ trunk/examples/sparql/britishPrimeMinisters.conf 2009-04-15 13:33:41 UTC (rev 1703) @@ -0,0 +1,75 @@ +/** + * Some people which are/were Prime Ministers of the UK and some random negative Examples. + * Note: DBpedia is always subject to change, solutions will change over time + + * Possible Solutions: + +1: (http://dbpedia.org/class/yago/PrimeMinistersOfTheUnitedKingdom OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) +2: (http://dbpedia.org/class/yago/LeadersOfTheBritishConservativeParty OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) + + * + */ + +// SPARQL options +sparql.recursionDepth = 1; + + +//for a list of predefined Filters and Endpoints see examples/sparql/README.txt +sparql.predefinedFilter = "YAGO"; +sparql.predefinedEndpoint = "DBPEDIA"; +// sparql.predefinedEndpoint = "LOCALDBPEDIA"; + +// import("http://139.18.2.37:8890/sparql","SPARQL"); +import("http://dbpedia.org/sparql","SPARQL"); +algorithm = refexamples; +reasoner = fastInstanceChecker; + +refexamples.useAllConstructor = false; +refexamples.useExistsConstructor = true; +refexamples.useCardinalityRestrictions = false; +refexamples.useNegation = false; +refexamples.maxExecutionTimeInSeconds = 10; + +//refexamples.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"}; + +sparql.instances = { + "http://dbpedia.org/resource/Benjamin_Netanyahu" + ,"http://dbpedia.org/resource/Brant_Brown" + ,"http://dbpedia.org/resource/David_Blunkett" + ,"http://dbpedia.org/resource/Democritus" + ,"http://dbpedia.org/resource/Dick_Grayson" + ,"http://dbpedia.org/resource/Edward_Marjoribanks%2C_2nd_Baron_Tweedmouth" + ,"http://dbpedia.org/resource/Elizabeth_Dole" + ,"http://dbpedia.org/resource/Franklin_Pierce" + ,"http://dbpedia.org/resource/Kurt_Waldheim" + ,"http://dbpedia.org/resource/Lamberto_Dini" + ,"http://dbpedia.org/resource/Laurence_Foley" + ,"http://dbpedia.org/resource/Philip_Stanhope%2C_4th_Earl_of_Chesterfield" + ,"http://dbpedia.org/resource/Alec_Douglas-Home" + ,"http://dbpedia.org/resource/Andrew_Bonar_Law" + ,"http://dbpedia.org/resource/Anthony_Eden" + ,"http://dbpedia.org/resource/Anthony_Eden_hat" + ,"http://dbpedia.org/resource/Archibald_Primrose%2C_5th_Earl_of_Rosebery" +,"http://dbpedia.org/resource/Arthur_Balfour" +}; + + + +-"http://dbpedia.org/resource/Benjamin_Netanyahu" +-"http://dbpedia.org/resource/Brant_Brown" +-"http://dbpedia.org/resource/David_Blunkett" +-"http://dbpedia.org/resource/Democritus" +-"http://dbpedia.org/resource/Dick_Grayson" +-"http://dbpedia.org/resource/Edward_Marjoribanks%2C_2nd_Baron_Tweedmouth" +-"http://dbpedia.org/resource/Elizabeth_Dole" +-"http://dbpedia.org/resource/Franklin_Pierce" +-"http://dbpedia.org/resource/Kurt_Waldheim" +-"http://dbpedia.org/resource/Lamberto_Dini" +-"http://dbpedia.org/resource/Laurence_Foley" +-"http://dbpedia.org/resource/Philip_Stanhope%2C_4th_Earl_of_Chesterfield" ++"http://dbpedia.org/resource/Alec_Douglas-Home" ++"http://dbpedia.org/resource/Andrew_Bonar_Law" ++"http://dbpedia.org/resource/Anthony_Eden" ++"http://dbpedia.org/resource/Anthony_Eden_hat" ++"http://dbpedia.org/resource/Archibald_Primrose%2C_5th_Earl_of_Rosebery" ++"http://dbpedia.org/resource/Arthur_Balfour" Deleted: trunk/examples/sparql/britishPrimeMinisters_local.conf =================================================================== --- trunk/examples/sparql/britishPrimeMinisters_local.conf 2009-04-15 09:22:46 UTC (rev 1702) +++ trunk/examples/sparql/britishPrimeMinisters_local.conf 2009-04-15 13:33:41 UTC (rev 1703) @@ -1,72 +0,0 @@ -/** - * Some people which are/were Prime Ministers of the UK and some random negative Examples. - * Note: DBpedia is always subject to change, solutions will change over time - - * Possible Solutions: - -1: (http://dbpedia.org/class/yago/PrimeMinistersOfTheUnitedKingdom OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) -2: (http://dbpedia.org/class/yago/LeadersOfTheBritishConservativeParty OR EXISTS http://dbpedia.org/property/termStart.TOP) (length 5, depth 3) - - * - */ - -// SPARQL options -sparql.recursionDepth = 1; - - -//for a list of predefined Filters and Endpoints see examples/sparql/README.txt -sparql.predefinedFilter = "YAGO"; -sparql.predefinedEndpoint = "LOCALDBPEDIA"; - -import("http://139.18.2.37:8890/sparql","SPARQL"); -algorithm = refexamples; -reasoner = fastInstanceChecker; - -refexamples.useAllConstructor = false; -refexamples.useExistsConstructor = true; -refexamples.useCardinalityRestrictions = false; -refexamples.useNegation = false; - -//refexamples.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"}; - -sparql.instances = { - "http://dbpedia.org/resource/Benjamin_Netanyahu" - ,"http://dbpedia.org/resource/Brant_Brown" - ,"http://dbpedia.org/resource/David_Blunkett" - ,"http://dbpedia.org/resource/Democritus" - ,"http://dbpedia.org/resource/Dick_Grayson" - ,"http://dbpedia.org/resource/Edward_Marjoribanks%2C_2nd_Baron_Tweedmouth" - ,"http://dbpedia.org/resource/Elizabeth_Dole" - ,"http://dbpedia.org/resource/Franklin_Pierce" - ,"http://dbpedia.org/resource/Kurt_Waldheim" - ,"http://dbpedia.org/resource/Lamberto_Dini" - ,"http://dbpedia.org/resource/Laurence_Foley" - ,"http://dbpedia.org/resource/Philip_Stanhope%2C_4th_Earl_of_Chesterfield" - ,"http://dbpedia.org/resource/Alec_Douglas-Home" - ,"http://dbpedia.org/resource/Andrew_Bonar_Law" - ,"http://dbpedia.org/resource/Anthony_Eden" - ,"http://dbpedia.org/resource/Anthony_Eden_hat" - ,"http://dbpedia.org/resource/Archibald_Primrose%2C_5th_Earl_of_Rosebery" -,"http://dbpedia.org/resource/Arthur_Balfour" -}; - - - --"http://dbpedia.org/resource/Benjamin_Netanyahu" --"http://dbpedia.org/resource/Brant_Brown" --"http://dbpedia.org/resource/David_Blunkett" --"http://dbpedia.org/resource/Democritus" --"http://dbpedia.org/resource/Dick_Grayson" --"http://dbpedia.org/resource/Edward_Marjoribanks%2C_2nd_Baron_Tweedmouth" --"http://dbpedia.org/resource/Elizabeth_Dole" --"http://dbpedia.org/resource/Franklin_Pierce" --"http://dbpedia.org/resource/Kurt_Waldheim" --"http://dbpedia.org/resource/Lamberto_Dini" --"http://dbpedia.org/resource/Laurence_Foley" --"http://dbpedia.org/resource/Philip_Stanhope%2C_4th_Earl_of_Chesterfield" -+"http://dbpedia.org/resource/Alec_Douglas-Home" -+"http://dbpedia.org/resource/Andrew_Bonar_Law" -+"http://dbpedia.org/resource/Anthony_Eden" -+"http://dbpedia.org/resource/Anthony_Eden_hat" -+"http://dbpedia.org/resource/Archibald_Primrose%2C_5th_Earl_of_Rosebery" -+"http://dbpedia.org/resource/Arthur_Balfour" Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-15 09:22:46 UTC (rev 1702) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-15 13:33:41 UTC (rev 1703) @@ -22,8 +22,13 @@ import java.io.File; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Collections; import java.util.Date; import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Random; import java.util.Set; import java.util.TreeSet; @@ -57,6 +62,12 @@ */ @Test public void testAllConfFiles() throws ComponentInitException { + + // if true, then examples are executed in random order (avoids the problem + // that the same examples are tested first on several runs); otherwise + // it runs the examples in alphabetical order + boolean randomize = true; + // we use a logger, which outputs few messages (warnings, errors) SimpleLayout layout = new SimpleLayout(); ConsoleAppender consoleAppender = new ConsoleAppender(layout); @@ -71,6 +82,20 @@ File f = new File(exampleDir); QuickStart.getAllConfs(f, exampleDir, confFiles); + // put all examples in a flat list + List<String> examples = new LinkedList<String>(); + for(Map.Entry<String,ArrayList<String>> entry : confFiles.entrySet()) { + for(String file : entry.getValue()) { + examples.add(entry.getKey() + file + ".conf"); + } + } + + if(randomize) { + Collections.shuffle(examples, new Random()); + } else { + Collections.sort(examples); + } + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); // ignore list (examples which are temporarily not working due @@ -99,41 +124,50 @@ //also working fine ignore.add("./examples/sparql/SilentBobWorking2.conf"); // Out of Memory Error // ignore.add("./examples/sparql/difference/DBPediaSKOS_kohl_vs_angela.conf"); // Pellet: literal cannot be cast to individual // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) - ignore.add("./examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // Out of Memory Error + ignore.add("examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // stack overflow + ignore.add("examples/krk/KRK_ONE_ZERO_fastInstance.conf"); // stack overflow + ignore.add("examples/krk/"); // too many stack overflows int failedCounter = 0; - for (String path : confFiles.keySet()) { - for (String file : confFiles.get(path)) { - String conf = path + file + ".conf"; - if(ignore.contains(conf)) { - System.out.println("Skipping " + conf + " (is on ignore list)."); - } else { - System.out.println("Testing " + conf + " (time: " + sdf.format(new Date()) + ")."); - long startTime = System.nanoTime(); - boolean success = false; - try { - // start example - Start start = new Start(new File(conf)); - start.start(false); - // test is successful if a concept was learned - assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); - start.getReasonerComponent().releaseKB(); - success = true; - } catch (Exception e) { - // unit test not succesful (exceptions are caught explicitly to find - assert ( false ); - e.printStackTrace(); - failedCounter++; - } - long timeNeeded = System.nanoTime() - startTime; - ComponentManager.getInstance().freeAllComponents(); - if(!success) { - System.out.println("TEST FAILED."); - } - System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); + int counter = 1; + int total = examples.size(); + for(String conf : examples) { + if(ignore.contains(conf)) { + System.out.println("Skipping " + conf + " (is on ignore list)."); + } else { + System.out.println("Testing " + conf + " (example " + counter + " of " + total + ", time: " + sdf.format(new Date()) + ")."); + long startTime = System.nanoTime(); + boolean success = false; + try { + // start example + Start start = new Start(new File(conf)); + start.start(false); + // test is successful if a concept was learned + assert (start.getLearningAlgorithm().getCurrentlyBestDescription() != null); + start.getReasonerComponent().releaseKB(); + success = true; + } catch (Exception e) { + // unit test not succesful (exceptions are caught explicitly to find + assert ( false ); + e.printStackTrace(); + failedCounter++; } - } + long timeNeeded = System.nanoTime() - startTime; + ComponentManager.getInstance().freeAllComponents(); + if(!success) { + System.out.println("TEST FAILED."); + } + System.out.println("Test of " + conf + " completed in " + Helper.prettyPrintNanoSeconds(timeNeeded) + "."); + } + counter++; } + +// for (String path : confFiles.keySet()) { +// for (String file : confFiles.get(path)) { +// String conf = path + file + ".conf"; +// +// } +// } System.out.println("Finished. " + failedCounter + " tests failed."); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-16 14:21:58
|
Revision: 1707 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1707&view=rev Author: jenslehmann Date: 2009-04-16 14:21:43 +0000 (Thu, 16 Apr 2009) Log Message: ----------- deleted deprecated example Modified Paths: -------------- trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf trunk/examples/sparql/Aristotle.conf trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Removed Paths: ------------- trunk/examples/sparql/Aristotle_local.conf Modified: trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2009-04-16 09:42:26 UTC (rev 1706) +++ trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2009-04-16 14:21:43 UTC (rev 1707) @@ -139,4 +139,4 @@ -"http://www.test.de/test#game6" -"http://www.test.de/test#game7" -"http://www.test.de/test#game8" --"http://www.test.de/test#game9" \ No newline at end of file +-"http://www.test.de/test#game9" Modified: trunk/examples/sparql/Aristotle.conf =================================================================== --- trunk/examples/sparql/Aristotle.conf 2009-04-16 09:42:26 UTC (rev 1706) +++ trunk/examples/sparql/Aristotle.conf 2009-04-16 14:21:43 UTC (rev 1707) @@ -14,7 +14,7 @@ sparql.predefinedFilter = "YAGO"; sparql.predefinedEndpoint = "DBPEDIA"; -import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); +import("http://dbpedia.org/sparql","SPARQL"); algorithm = refexamples; reasoner = fastInstanceChecker; Deleted: trunk/examples/sparql/Aristotle_local.conf =================================================================== --- trunk/examples/sparql/Aristotle_local.conf 2009-04-16 09:42:26 UTC (rev 1706) +++ trunk/examples/sparql/Aristotle_local.conf 2009-04-16 14:21:43 UTC (rev 1707) @@ -1,39 +0,0 @@ -/** - * Some people from Greece. - * Note: DBpedia is always subject to change, solutions will change over time - - * Possible Solution: - * Theorist OR (Mathematician AND Physicist) - * - */ - -// SPARQL options -sparql.recursionDepth = 1; - -//predefined filter (1 = YAGO based learning) -sparql.predefinedFilter = "YAGO"; -sparql.predefinedEndpoint = "LOCALDBPEDIA"; - -import("http://139.18.2.37:8890/sparql","SPARQL"); -algorithm = refexamples; -reasoner = fastInstanceChecker; - -refexamples.ignoredConcepts={"http://dbpedia.org/class/yago/Abstainer109758173"}; - -sparql.instances = { - "http://dbpedia.org/resource/Democritus", - "http://dbpedia.org/resource/Zeno_of_Elea", - "http://dbpedia.org/resource/Plato", - "http://dbpedia.org/resource/Socrates", - "http://dbpedia.org/resource/Archytas", - "http://dbpedia.org/resource/Pythagoras", - "http://dbpedia.org/resource/Philolaus" -}; - -+"http://dbpedia.org/resource/Pythagoras" -+"http://dbpedia.org/resource/Philolaus" -+"http://dbpedia.org/resource/Archytas" --"http://dbpedia.org/resource/Socrates" --"http://dbpedia.org/resource/Plato" --"http://dbpedia.org/resource/Zeno_of_Elea" --"http://dbpedia.org/resource/Democritus" Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-16 09:42:26 UTC (rev 1706) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-16 14:21:43 UTC (rev 1707) @@ -44,6 +44,8 @@ import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.Files; @@ -894,6 +896,26 @@ // System.out.println("node " + node); // System.out.println("refinement " + refinement); + /* + try { + Description c = KBParser.parseConcept("EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".\"http://www.test.de/test#WRook\""); + if(conceptComparator.compare(c, node.getConcept()) == 0) { + System.out.println("TEST"); + Set<Description> refs = operator.refine(c, 8, null); + for(Description d : refs) { + System.out.println(" " + d); + } + System.out.println(); + System.exit(0); + } + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + */ + + + extendNodeProper(node, refinement, maxLength, recDepth + 1); } @@ -905,6 +927,8 @@ } } + + private void printStatistics(boolean finalStats) { // TODO: viele Tests haben ergeben, dass man nie 100% mit der // Zeitmessung abdecken Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-16 09:42:26 UTC (rev 1706) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-04-16 14:21:43 UTC (rev 1707) @@ -131,7 +131,6 @@ // ignore.add("examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // stack overflow // ignore.add("examples/krk/KRK_ONE_ZERO_fastInstance.conf"); // stack overflow ignore.add("examples/krk/"); // too many stack overflows - ignore.add("examples/sparql/Aristotle_local.conf"); // null pointer int failedCounter = 0; int counter = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-16 18:12:12
|
Revision: 1708 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1708&view=rev Author: jenslehmann Date: 2009-04-16 18:12:06 +0000 (Thu, 16 Apr 2009) Log Message: ----------- - fixed bug occurring in KRK examples - added corresponding unit test Modified Paths: -------------- trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java Modified: trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf =================================================================== --- trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/examples/krk/KRK_ONE_ZERO_fastInstance.conf 2009-04-16 18:12:06 UTC (rev 1708) @@ -1,38 +1,23 @@ /* -DEBUG - --- loop 5279 started --- -INFO - best node EXISTS "hasPiece".EXISTS "hasLowerRankThan".("WRook" AND ALL "fileDistanceLessThan1"."WKing") [acc:100% h:0,853 q:0p-0n (REASONER), he:8 c:0] -INFO - -solutions: -INFO - EXISTS "http://www.test.de/test#hasPiece".EXISTS "http://www.test.de/test#hasLowerRankThan".("http://www.test.de/test#WRook" AND ALL "http://www.test.de/test#fileDistanceLessThan1"."http://www.test.de/test#WKing") (length 9, depth 5) -INFO - MANCHESTER: hasPiece some hasLowerRankThan some (WRook and fileDistanceLessThan1 only WKing) -DEBUG - size of candidate set: 50434 -DEBUG - properness tests (reasoner/short concept/too weak list): 0/3/56 -DEBUG - concept tests (reasoner/too weak list/overly general list/redundant concepts): 12609/56/38684/4153 -INFO - Algorithm terminated succesfully. -number of retrievals: 12 -retrieval reasoning time: 0ms ( 0ms per retrieval) -number of instance checks: 1232144 (0 multiple) -instance check reasoning time: 9s 613ms ( 0ms per instance check) -subsumption hierarchy queries: 14 -(complex) subsumption checks: 8 (0 multiple) -subsumption reasoning time: 17ms ( 2ms per subsumption check) -overall reasoning time: 9s 630ms (24,91% of overall runtime) -overall algorithm runtime: 38s 662ms + * Chess - King and Rook vs. lone King + * + * Here, we learn the difference between mate and mate in 1. + * + * Solutions: + * + * 1: hasPiece some hasLowerRankThan some (WRook and fileDistance0 only WKing) + * 2: hasPiece some hasLowerRankThan some (WRook and fileDistanceLessThan1 only WKing) + */ - - -*/ - import("KRK_ZERO_ONE.owl"); + refexamples.ignoredConcepts={ "http://www.test.de/test#ONE", "http://www.test.de/test#ZERO"}; - algorithm = refexamples; reasoner=fastInstanceChecker; - +"http://www.test.de/test#game100" +"http://www.test.de/test#game101" +"http://www.test.de/test#game102" Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLComponent2.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -205,8 +205,6 @@ options.add(CommonConfigOptions.maxClassDescriptionTests()); options.add(CommonConfigOptions.getLogLevel()); options.add(new BooleanConfigOption("usePropernessChecks", "specifies whether to check for equivalence (i.e. discard equivalent refinements)",usePropernessChecksDefault)); - options.add(new IntegerConfigOption("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",maxPosOnlyExpansionDefault)); options.add(CommonConfigOptions.getNoisePercentage()); options.add(CommonConfigOptions.getTerminateOnNoiseReached()); options.add(new StringConfigOption("startClass", "the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class)")); @@ -366,6 +364,9 @@ if(improveSubsumptionHierarchy) classHierarchy.thinOutSubsumptionHierarchy(); +// System.out.println(classHierarchy); +// System.exit(0); + // reasoner.prepareRoleHierarchy(usedRoles); // prepare datatype hierarchy only if necessary // if(reasoner.hasDatatypeSupport()) Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -44,8 +44,6 @@ import org.dllearner.learningproblems.EvaluatedDescriptionPosNeg; import org.dllearner.learningproblems.PosNegLP; import org.dllearner.learningproblems.ScorePosNeg; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; import org.dllearner.refinementoperators.RefinementOperator; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.utilities.Files; @@ -85,15 +83,6 @@ private double noise = 0.0; private int allowedMisclassifications = 0; - // positive only learning options: - // if no negatives are given, then one possible strategy is to find a very - // special concept still entailing all positive examples; - // this is realised by changing the termination criterion: a concept is a - // solution if it has been expanded x times (x is - // configurable) but no more special concept is found (all are either - // equivalent or too weak) - private int maxPosOnlyExpansion; - // search tree options private boolean writeSearchTree; private File searchTreeFile; @@ -266,7 +255,6 @@ this.usePropernessChecks = usePropernessChecks; baseURI = rs.getBaseURI(); prefixes = rs.getPrefixes(); - this.maxPosOnlyExpansion = maxPosOnlyExpansion; this.maxExecutionTimeInSeconds = maxExecutionTimeInSeconds; this.minExecutionTimeInSeconds = minExecutionTimeInSeconds; this.guaranteeXgoodDescriptions = guaranteeXgoodDescriptions; @@ -467,38 +455,6 @@ Files.appendFile(searchTreeFile, treeString); } - // special situation for positive only learning: the expanded node - // can become a solution (see explanations - // for maxPosOnlyExpansion above) - - // DEPRECATED CODE - if (false - && bestNode.isPosOnlyCandidate() - && (bestNode.getHorizontalExpansion() - bestNode.getConcept().getLength() >= maxPosOnlyExpansion)) { - - boolean solution = checkSubtreePosOnly(bestNode); - - if (solution) { - solutions.add(bestNode); - ExampleBasedNode bestChild = bestNode.getChildren().last(); - System.out.println("solution: " + bestNode.getConcept()); - System.out.println("maxPosOnlyExpansion: " + maxPosOnlyExpansion); - System.out.println("best child of this node: " + bestChild); - if(bestNode.getChildConcepts().size()<100) { - System.out.println(bestNode.getChildConcepts()); - } - System.out.println("TODO: needs to be integrated with other stopping criteria"); - System.out - .println("You tried to use this algorithm for positive only learning, which is not recommended (yet)."); - // System.out.println("Exiting."); - // System.exit(0); - } else { - // tag as non-candidate so we do not need to search again - bestNode.setPosOnlyCandidate(false); - } - - } - // Anzahl Schleifendurchläufe loop++; }// end while @@ -571,6 +527,7 @@ // System.out.println("node: " + node); // System.out.println("concept: " + concept); +// System.out.println("max length: " + maxLength); // do not execute methods if algorithm has been stopped (this means that // the algorithm @@ -896,26 +853,6 @@ // System.out.println("node " + node); // System.out.println("refinement " + refinement); - /* - try { - Description c = KBParser.parseConcept("EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".\"http://www.test.de/test#WRook\""); - if(conceptComparator.compare(c, node.getConcept()) == 0) { - System.out.println("TEST"); - Set<Description> refs = operator.refine(c, 8, null); - for(Description d : refs) { - System.out.println(" " + d); - } - System.out.println(); - System.exit(0); - } - } catch (ParseException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - */ - - - extendNodeProper(node, refinement, maxLength, recDepth + 1); } @@ -1322,45 +1259,9 @@ public ExampleBasedNode getStartNode() { return startNode; } - - // returns true if there is any meaningful node in the subtree - private boolean checkSubtreePosOnly(ExampleBasedNode node) { - for (ExampleBasedNode refinement : node.getChildren()) { - - if (!node.isTooWeak()) { - // refinement meaningful - if (isPosOnlyRefinementMeaningful(node, refinement)) - return true; - - // subtree with refinement as root contains a meaningful node - if (checkSubtreePosOnly(refinement)) - return true; - } - - } - return false; - } - - // returns whether the refinement is "meaningful", i.e. the refinement - // actually represents a different concept - // than its parent; this is needed to determine when a positive only - // learning algorithm should stop (when a node - // has been expaned x times without yielding any meaningful refinements, it - // is considered a possible solution) - private boolean isPosOnlyRefinementMeaningful(ExampleBasedNode node, ExampleBasedNode refinement) { - Description d1 = node.getConcept(); - Description d2 = refinement.getConcept(); - // check whether d2 can be shortened, e.g. male AND male => male - Description shortConcept = ConceptTransformation.getShortConcept(d2, conceptComparator); - if (conceptComparator.compare(d1, shortConcept) != 0) - return false; - return true; - } - - /** - * In this function it is calculated if the algorithm should stop. + * In this function it is calculated whether the algorithm should stop. * This is not always depends whether an actual solution was found * The algorithm stops if: * 1. the object attribute stop is set to true (possibly by an outside source) Modified: trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/core/configurators/ROLComponent2Configurator.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -31,7 +31,7 @@ * automatically generated, do not edit manually. * run org.dllearner.scripts.ConfigJavaGenerator to update **/ -public class ROLComponent2Configurator implements Configurator { +public class ROLComponent2Configurator extends RefinementOperatorConfigurator implements Configurator { private boolean reinitNecessary = false; @SuppressWarnings("unused") Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -372,7 +372,7 @@ public Set<Description> refine(Description description, int maxLength, List<Description> knownRefinements, Description currDomain) { -// logger.trace(description + " " + currDomain + " " + maxLength); +// System.out.println("|- " + description + " " + currDomain + " " + maxLength); // actions needing to be performed if this is the first time the // current domain is used @@ -399,7 +399,6 @@ } refinements = (TreeSet<Description>) topARefinementsCumulative.get(currDomain).get(maxLength).clone(); } - // refinements.addAll(subHierarchy.getMoreSpecialConcepts(description)); } else if(description instanceof Nothing) { // cannot be further refined @@ -881,7 +880,9 @@ if(useNegation) { Set<Description> m2tmp = subHierarchy.getSuperClasses(new Nothing()); for(Description c : m2tmp) { - m2.add(new Negation(c)); + if(!(c instanceof Thing)) { + m2.add(new Negation(c)); + } } } @@ -968,9 +969,11 @@ SortedSet<Description> m2tmp = subHierarchy.getSuperClasses(new Nothing()); for(Description c : m2tmp) { - if(c instanceof Thing) - m2.add(c); - else { +// if(c instanceof Thing) +// m2.add(c); +// else { + // we obviously do not add \top (\top refines \top does not make sense) + if(!(c instanceof Thing)) { NamedClass a = (NamedClass) c; if(!isNotADisjoint(a, nc) && isNotAMeaningful(a, nc)) m2.add(new Negation(a)); Modified: trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/scripts/ConfigJavaGenerator.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -39,6 +39,7 @@ import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.configurators.CELOEConfigurator; +import org.dllearner.core.configurators.ROLComponent2Configurator; import org.dllearner.core.configurators.ROLearnerConfigurator; import org.dllearner.core.configurators.RefinementOperatorConfigurator; import org.dllearner.core.options.ConfigOption; @@ -65,6 +66,7 @@ private static final SortedSet<String> EXTENDSREFINEMENTOPERATOR = new TreeSet<String>(Arrays.asList(new String[]{ ROLearnerConfigurator.class.getSimpleName(), + ROLComponent2Configurator.class.getSimpleName(), CELOEConfigurator.class.getSimpleName(), })); Modified: trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/test/junit/RefinementOperatorTests.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -24,18 +24,27 @@ import java.io.File; import java.net.MalformedURLException; import java.util.Set; +import java.util.TreeSet; +import org.dllearner.algorithms.refinement2.ROLComponent2; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.owl.ClassHierarchy; import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.Thing; import org.dllearner.kb.OWLFile; +import org.dllearner.learningproblems.PosNegLPStandard; import org.dllearner.parser.KBParser; import org.dllearner.parser.ParseException; import org.dllearner.reasoning.OWLAPIReasoner; import org.dllearner.refinementoperators.RhoDRDown; import org.dllearner.test.junit.TestOntologies.TestOntology; +import org.dllearner.utilities.Helper; import org.junit.Test; /** @@ -115,6 +124,56 @@ assertTrue(results.size()==desiredResultSize); } + @Test + public void rhoDRDownTest3() throws ParseException, LearningProblemUnsupportedException { + ReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.KRK_ZERO_ONE); + baseURI = reasoner.getBaseURI(); + + // create learning algorithm in order to test under similar conditions than + // within a learning algorithm + ComponentManager cm = ComponentManager.getInstance(); + LearningProblem lp = cm.learningProblem(PosNegLPStandard.class, reasoner); + ROLComponent2 la = cm.learningAlgorithm(ROLComponent2.class, lp, reasoner); + + Set<NamedClass> ignoredConcepts = new TreeSet<NamedClass>(); + ignoredConcepts.add(new NamedClass("http://www.test.de/test#ZERO")); + ignoredConcepts.add(new NamedClass("http://www.test.de/test#ONE")); + Set<NamedClass> usedConcepts = Helper.computeConceptsUsingIgnoreList(reasoner, ignoredConcepts); + + ClassHierarchy classHierarchy = reasoner.getClassHierarchy().cloneAndRestrict(usedConcepts); + classHierarchy.thinOutSubsumptionHierarchy(); + RhoDRDown op = new RhoDRDown( + reasoner, + classHierarchy, + Thing.instance, + la.getConfigurator() + ); + + Description concept = KBParser.parseConcept("EXISTS \"http://www.test.de/test#hasPiece\".EXISTS \"http://www.test.de/test#hasLowerRankThan\".(\"http://www.test.de/test#WRook\" AND TOP)"); + Set<Description> results = op.refine(concept,8); + + for(Description result : results) { + System.out.println(result.toString("http://www.test.de/test#",null)); + } + + int desiredResultSize = 8; + if(results.size() != desiredResultSize) { + System.out.println(results.size() + " results found, but should be " + desiredResultSize + "."); + } + + // the 8 refinements found on 2009/04/16 are as follows: + // EXISTS hasPiece.EXISTS hasLowerRankThan.(BKing AND WRook) + // EXISTS hasPiece.EXISTS hasLowerRankThan.(WKing AND WRook) + // EXISTS hasPiece.EXISTS hasLowerRankThan.(WRook AND WRook) + // EXISTS hasPiece.EXISTS hasLowerRankThan.(WRook AND (NOT BKing)) + // EXISTS hasPiece.EXISTS hasLowerRankThan.(WRook AND (NOT WKing)) + // EXISTS hasPiece.EXISTS hasLowerRankThan.(WRook AND (NOT WRook)) + // EXISTS hasPiece.>= 2 hasLowerRankThan.(WRook AND TOP) + // >= 2 hasPiece.EXISTS hasLowerRankThan.(WRook AND TOP) + + assertTrue(results.size()==desiredResultSize); + } + private String uri(String name) { return "\""+baseURI+name+"\""; } Modified: trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-04-16 14:21:43 UTC (rev 1707) +++ trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-04-16 18:12:06 UTC (rev 1708) @@ -41,7 +41,7 @@ */ public final class TestOntologies { - public enum TestOntology { EMPTY, SIMPLE, SIMPLE_NO_DR, SIMPLE_NO_DISJOINT, SIMPLE_NO_DR_DISJOINT, SIMPLE2, SIMPLE3, R1SUBR2, DATA1, FIVE_ROLES, FATHER_OE, CARCINOGENESIS, EPC_OE }; + public enum TestOntology { EMPTY, SIMPLE, SIMPLE_NO_DR, SIMPLE_NO_DISJOINT, SIMPLE_NO_DR_DISJOINT, SIMPLE2, SIMPLE3, R1SUBR2, DATA1, FIVE_ROLES, FATHER_OE, CARCINOGENESIS, EPC_OE, KRK_ZERO_ONE }; public static ReasonerComponent getTestOntology(TestOntology ont) { String kbString = ""; @@ -115,7 +115,9 @@ owlFile = "examples/carcinogenesis/carcinogenesis.owl"; } else if(ont.equals(TestOntology.EPC_OE)) { owlFile = "examples/epc/sap_epc_oe.owl"; - } + } else if(ont.equals(TestOntology.KRK_ZERO_ONE)) { + owlFile = "examples/krk/KRK_ZERO_ONE.owl"; + } try { ComponentManager cm = ComponentManager.getInstance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-17 10:28:38
|
Revision: 1712 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1712&view=rev Author: jenslehmann Date: 2009-04-17 10:28:36 +0000 (Fri, 17 Apr 2009) Log Message: ----------- extended build script to include manual (but not the LaTeX source) Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/gui trunk/bin/gui.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/build.xml trunk/src/dl-learner/org/dllearner/Info.java Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/dllearner 2009-04-17 10:28:36 UTC (rev 1712) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/dllearner.bat 2009-04-17 10:28:36 UTC (rev 1712) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/gui 2009-04-17 10:28:36 UTC (rev 1712) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/gui.bat 2009-04-17 10:28:36 UTC (rev 1712) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/quickstart 2009-04-17 10:28:36 UTC (rev 1712) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/quickstart.bat 2009-04-17 10:28:36 UTC (rev 1712) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/ws 2009-04-17 10:28:36 UTC (rev 1712) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/bin/ws.bat 2009-04-17 10:28:36 UTC (rev 1712) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file +java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/build.xml 2009-04-17 10:28:36 UTC (rev 1712) @@ -149,8 +149,9 @@ <!-- copy documentation excluding developer documentation --> <copy toDir="${release_tmp_dir}/doc"> <fileset dir="doc"> - <exclude name="eclipse/" /> - <exclude name="javadoc/" /> + <!-- <exclude name="eclipse/" /> + <exclude name="javadoc/" /> --> + <exclude name="manual/" /> </fileset> </copy> @@ -181,13 +182,18 @@ <fileset dir="${source_dir}" includes="**/*.java,**/*.html,**/*.gif,**/*.jjt,build.xml"/> </copy> + <!-- copy manual --> + <copy toFile="${release_tmp_dir}/doc/manual.pdf" file="doc/manual/manual.pdf" /> + <!-- create copy developer documentation --> + <!-- <copy todir="${release_tmp_dir}/doc/eclipse/"> <fileset dir="doc/eclipse/"/> </copy> <copy todir="${release_tmp_dir}/doc/javadoc/"> <fileset dir="doc/javadoc/"/> - </copy> + </copy> + --> <!-- create backup (= standard build + source code + developer documentation) --> <tar longfile="gnu" destfile="dllearner-${today}.tar.gz" compression="gzip"> Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2009-04-17 09:51:53 UTC (rev 1711) +++ trunk/src/dl-learner/org/dllearner/Info.java 2009-04-17 10:28:36 UTC (rev 1712) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2009-02-17"; + public static final String build = "2009-04-17"; } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-20 10:21:14
|
Revision: 1716 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1716&view=rev Author: jenslehmann Date: 2009-04-20 10:21:12 +0000 (Mon, 20 Apr 2009) Log Message: ----------- - added possibility to query for algorithms supporting a given learning problem in component manager - GUI: when selecting class learning problem, the option classToDescribe is now mandatory - GUI: made sure that only appropriate learning algorithms wrt. a given learning problem can be selected - GUI: files ending with nt or rdf are now selectable by default Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/gui/ComponentPanel.java trunk/src/dl-learner/org/dllearner/gui/Config.java trunk/src/dl-learner/org/dllearner/gui/ExampleFileChooser.java trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/utilities/datastructures/Maps.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/build.xml 2009-04-20 10:21:12 UTC (rev 1716) @@ -4,7 +4,7 @@ <!-- directory settings --> <property name="lib_dir" value="lib" /> <property name="source_dir" value="src/dl-learner" /> - <property name="protege_dir" value="C:\Program Files\Protege_4.0_beta\plugins" /> + <property name="protege_dir" value="/home/jl/programme/Protege_4.0_beta/plugins" /> <property name="class_dir" value="classes" /> <property name="php_client_dir" value="src/php-client" /> Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -40,6 +40,7 @@ import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; +import java.util.Map.Entry; import org.apache.log4j.Logger; import org.dllearner.cli.ConfMapper; @@ -48,6 +49,7 @@ import org.dllearner.core.options.InvalidConfigOptionValueException; import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.utilities.Files; +import org.dllearner.utilities.datastructures.Maps; /** * Central manager class for DL-Learner. There are currently four types of @@ -85,7 +87,8 @@ private static Map<Class<? extends Component>, List<ConfigOption<?>>> componentOptions; private static Map<Class<? extends Component>, Map<String, ConfigOption<?>>> componentOptionsByName; private static Map<Class<? extends LearningAlgorithm>, Collection<Class<? extends LearningProblem>>> algorithmProblemsMapping; - + private static Map<Class<? extends LearningProblem>, Collection<Class<? extends LearningAlgorithm>>> problemAlgorithmsMapping; + private ConfMapper confMapper = new ConfMapper(); // list of default values of config options @@ -116,7 +119,7 @@ learningProblems = new TreeSet<Class<? extends LearningProblem>>(classComparator); learningAlgorithms = new TreeSet<Class<? extends LearningAlgorithm>>(classComparator); algorithmProblemsMapping = new TreeMap<Class<? extends LearningAlgorithm>, Collection<Class<? extends LearningProblem>>>( - classComparator); + classComparator); // create classes from strings for (String componentString : componentsString) { @@ -143,13 +146,14 @@ e.printStackTrace(); } } + problemAlgorithmsMapping = Maps.revertCollectionMap(algorithmProblemsMapping); componentNames = new HashMap<Class<? extends Component>, String>(); // read in all configuration options componentOptions = new HashMap<Class<? extends Component>, List<ConfigOption<?>>>(); componentOptionsByName = new HashMap<Class<? extends Component>, Map<String, ConfigOption<?>>>(); // configOptionDefaults = new HashMap<ConfigOption<?>,Object>(); - + for (Class<? extends Component> component : components) { String name = (String) invokeStaticMethod(component, "getName"); @@ -169,8 +173,6 @@ } - // System.out.println(components); - // System.out.println(learningProblems); } /** @@ -683,6 +685,23 @@ } /** + * Returns the set of learning algorithms, which support the given learning problem type. + * @param learningProblem A learning problem type. + * @return The set of learning algorithms applicable for this learning problem. + */ + public List<Class<? extends LearningAlgorithm>> getApplicableLearningAlgorithms(Class<? extends LearningProblem> learningProblem) { + List<Class<? extends LearningAlgorithm>> algorithms = new LinkedList<Class<? extends LearningAlgorithm>>(); + for(Entry<Class<? extends LearningProblem>,Collection<Class<? extends LearningAlgorithm>>> entry : problemAlgorithmsMapping.entrySet()) { + Class<? extends LearningProblem> prob = entry.getKey(); + if(prob.isAssignableFrom(learningProblem)) { + algorithms.addAll(entry.getValue()); + } + } +// System.out.println(learningProblem + ": " + algorithms); + return algorithms; + } + + /** * Returns a list of all available learning algorithms in this instance * of <code>ComponentManager</code>. * @return the components A list of learning algorithm classes available in this Modified: trunk/src/dl-learner/org/dllearner/gui/ComponentPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/ComponentPanel.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/gui/ComponentPanel.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -29,12 +29,15 @@ import javax.swing.JComboBox; import javax.swing.JPanel; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.core.Component; import org.dllearner.core.KnowledgeSource; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.LearningProblem; import org.dllearner.core.LearningProblemUnsupportedException; import org.dllearner.core.ReasonerComponent; +import org.dllearner.learningproblems.ClassLearningProblem; +import org.dllearner.learningproblems.PosOnlyLP; /** * Class displaying a component (and its options). @@ -107,7 +110,8 @@ } else if (panelClass == LearningProblem.class) { selectableComponents.addAll(config.getComponentManager().getLearningProblems()); } else if (panelClass == LearningAlgorithm.class) { - selectableComponents.addAll(config.getComponentManager().getLearningAlgorithms()); +// selectableComponents.addAll(config.getComponentManager().getLearningAlgorithms()); + selectableComponents.addAll(config.getComponentManager().getApplicableLearningAlgorithms(config.getLearningProblem().getClass())); } // set default component class (move it to first position) @@ -151,6 +155,16 @@ // change component and update option panel Class<? extends Component> c = selectableComponents.get(comboBox.getSelectedIndex()); currentComponent = changeInstance(c); + // we may have to change the learning algorithm depending on the learning problem + if(c.equals(ClassLearningProblem.class) || c.equals(PosOnlyLP.class)) { + try { + config.changeLearningAlgorithm(CELOE.class); + } catch (LearningProblemUnsupportedException e1) { + // cannot happend since CELOE supports class learning problem + e1.printStackTrace(); + } + } + updateOptionPanel(); // if the component does not have mandatory values, we can // enable the following tabs @@ -201,6 +215,21 @@ */ public void panelActivated() { // hook method, which does nothing yet + if(panelClass.equals(LearningAlgorithm.class)) { + // update selectable components + selectableComponents.clear(); + selectableComponents.addAll(config.getComponentManager().getApplicableLearningAlgorithms(config.getLearningProblem().getClass())); + // clear combo box and add selectable items to it + comboBox.removeActionListener(this); + comboBox.removeAllItems(); + // recreate combo box + for (int i = 0; i < selectableComponents.size(); i++) { + comboBox.addItem(config.getComponentManager().getComponentName( + selectableComponents.get(i))); + } + comboBox.addActionListener(this); + update(); + } } // creates an instance of the specified component class Modified: trunk/src/dl-learner/org/dllearner/gui/Config.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/Config.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/gui/Config.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -41,7 +41,9 @@ import org.dllearner.kb.KBFile; import org.dllearner.kb.OWLFile; import org.dllearner.kb.sparql.SparqlKnowledgeSource; +import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.learningproblems.PosNegLP; +import org.dllearner.learningproblems.PosOnlyLP; import org.dllearner.parser.ParseException; /** @@ -548,6 +550,16 @@ .size() == 0) { return false; } + } else if (component instanceof PosOnlyLP) { + if (cm.getConfigOptionValue(component, "positiveExamples") == null + || ((Set<String>) cm.getConfigOptionValue(component, "positiveExamples")) + .size() == 0) { + return false; + } + } else if (component instanceof ClassLearningProblem) { + if (cm.getConfigOptionValue(component, "classToDescribe") == null) { + return false; + } } else if (component instanceof SparqlKnowledgeSource) { if (cm.getConfigOptionValue(component, "instances") == null || ((Set<String>) cm.getConfigOptionValue(component, "instances")).size() == 0) { Modified: trunk/src/dl-learner/org/dllearner/gui/ExampleFileChooser.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/ExampleFileChooser.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/gui/ExampleFileChooser.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -34,20 +34,36 @@ private static final long serialVersionUID = 1566010391199697892L; - public ExampleFileChooser(final String fileEnding) { + private final String description; + + // public ExampleFileChooser(final String fileEnding) { + public ExampleFileChooser(final String ... fileEndings) { super(new File("examples/")); + String display = ""; + for(String fileEnding : fileEndings) { + display += "*."+ fileEnding + " "; + } + display += "files"; + description = display; + FileFilter filter = new FileFilter() { @Override public boolean accept(File f) { - if (f.isDirectory()) + if (f.isDirectory()) { return true; - return f.getName().toLowerCase().endsWith("." + fileEnding); + } + for(String fileEnding : fileEndings) { + if(f.getName().toLowerCase().endsWith("." + fileEnding)) { + return true; + } + } + return false; } @Override public String getDescription() { - return fileEnding + " files"; // name for filter + return description; } }; Modified: trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/gui/widgets/WidgetPanelURL.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -70,7 +70,7 @@ if (e.getSource() == chooseLocalButton) { JFileChooser fc; if (component instanceof OWLFile) { - fc = new ExampleFileChooser("owl"); + fc = new ExampleFileChooser("owl","rdf","nt"); } else { fc = new ExampleFileChooser("kb"); } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-04-19 16:38:14 UTC (rev 1715) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -76,7 +76,7 @@ Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); options.add(new StringConfigOption("classToDescribe", "class of which a description should be learned", null, true, false)); StringConfigOption type = new StringConfigOption("type", "Whether to learn an equivalence class or super class axiom or domain/range of a property.","equivalence"); - type.setAllowedValues(new String[] {"equivalence", "superClass", "domain", "range"}); + type.setAllowedValues(new String[] {"equivalence", "superClass"}); // , "domain", "range"}); options.add(type); return options; } Added: trunk/src/dl-learner/org/dllearner/utilities/datastructures/Maps.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/datastructures/Maps.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/datastructures/Maps.java 2009-04-20 10:21:12 UTC (rev 1716) @@ -0,0 +1,78 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.utilities.datastructures; + +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; + +/** + * @author Jens Lehmann + * + */ +public class Maps { + + /** + * Reverts a map, i.e. if the map contains an entry x => y, then the + * returned map contains an entry y => x. (The minimal map with this + * property is returned.) + * + * @param <X> + * Type of map keys. + * @param <Y> + * Type of map values + * @param map + * The map to invert. + * @return A reverted map. + */ + public static <X, Y> Map<Y, Collection<X>> revert(Map<X, Y> map) { + Map<Y, Collection<X>> result = new HashMap<Y, Collection<X>>(); + + for (Map.Entry<X, Y> entry : map.entrySet()) { + X x = entry.getKey(); + Y y = entry.getValue(); + Collection<X> s = result.get(y); + if (s == null) { + result.put(y, s = new HashSet<X>()); + } + s.add(x); + } + return result; + } + + public static <X, Y> Map<Y, Collection<X>> revertCollectionMap(Map<X, Collection<Y>> map) { + Map<Y, Collection<X>> result = new HashMap<Y, Collection<X>>(); + + for (Map.Entry<X, Collection<Y>> entry : map.entrySet()) { + X x = entry.getKey(); + Collection<Y> y = entry.getValue(); + for (Y value : y) { + Collection<X> s = result.get(value); + if (s == null) { + result.put(value, s = new HashSet<X>()); + } + s.add(x); + } + } + return result; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-20 11:02:22
|
Revision: 1717 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1717&view=rev Author: jenslehmann Date: 2009-04-20 11:02:19 +0000 (Mon, 20 Apr 2009) Log Message: ----------- added ant task to automatically build the manual for a new release Modified Paths: -------------- trunk/build.xml trunk/doc/manual/manual.tex Added Paths: ----------- trunk/lib/ant_latex.jar Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-04-20 10:21:12 UTC (rev 1716) +++ trunk/build.xml 2009-04-20 11:02:19 UTC (rev 1717) @@ -28,7 +28,7 @@ </path> <!-- build target --> - <target name="full_release" depends="javadoc,build" description="full release, javadoc, scripts"> + <target name="full_release" depends="manual,javadoc,build" description="full release, javadoc, scripts"> </target> <!-- build target --> @@ -281,6 +281,31 @@ <echo file="bin/gui" message="#!/bin/bash${line.separator}java -Xmx${max_memory}m -Djava.library.path=lib/fact/ -cp ${pathStringUnix} org.dllearner.gui.StartGUI $@"/> </target> + <!-- generate manual --> + <taskdef name="latex" classname="de.dokutransdata.antlatex.LaTeX" + classpath="lib/ant_latex.jar"/> + <target name="manual"> + + <!-- automatically adds correct build number in manual --> + <replaceregexp file="doc/manual/manual.tex" + match="DL-Learner (.*) command line interface" + replace="DL-Learner ${today} command line interface" + byline="true"/> + + <!-- run pdflatex and bibtex over doc/manual/ --> + <latex + latexfile="manual.tex" + verbose="off" + clean="on" + pdftex="on" + workingDir="doc/manual"> + <bibtex + run="on" + workingDir="doc/manual/" + /> + </latex> + </target> + <!-- generate Javadoc --> <target name="javadoc"> <pathconvert refid="classpath" property="jdocclasspath"/> Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-04-20 10:21:12 UTC (rev 1716) +++ trunk/doc/manual/manual.tex 2009-04-20 11:02:19 UTC (rev 1717) @@ -69,7 +69,7 @@ \emph{Conf files}, e.g. \verb|examples/father.conf| in this case, describe the learning problem and specify which algorithm you want to use to solve it. In the simplest case they just say where to find the background knowledge to use (in the OWL file \verb|examples/father.owl| in this case) and the positive and negative examples (marked by ``+'' and ``-'', respectively). When running the above command, you should get something similar to the following: \begin{verbatim} -DL-Learner 2008-10-13 command line interface +DL-Learner 2009-04-20 command line interface starting component manager ... OK (157ms) initialising component "OWL file" ... OK (0ms) initialising component "fast instance checker" ... OK (842ms) Added: trunk/lib/ant_latex.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/ant_latex.jar ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-04-20 15:12:17
|
Revision: 1719 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1719&view=rev Author: jenslehmann Date: 2009-04-20 15:12:11 +0000 (Mon, 20 Apr 2009) Log Message: ----------- method to find all geo-locations in DBpedia and write them to an N-Triple file Modified Paths: -------------- trunk/README trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaPoint.java Modified: trunk/README =================================================================== --- trunk/README 2009-04-20 12:14:59 UTC (rev 1718) +++ trunk/README 2009-04-20 15:12:11 UTC (rev 1719) @@ -14,4 +14,5 @@ DL-Learner is Open Source and licenced unter the GNU General Public License. Documentation for DL-Learner (e.g. various configuration options) can be found -in the "doc" directory and at http://dl-learner.org. +in the "doc" directory and at http://dl-learner.org. We recommend to read +doc/manual.pdf to get started. Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java 2009-04-20 12:14:59 UTC (rev 1718) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlEndpoint.java 2009-04-20 15:12:11 UTC (rev 1719) @@ -172,6 +172,18 @@ return new SparqlEndpoint(u, defaultGraphURIs, new LinkedList<String>()); } + public static SparqlEndpoint getEndpointLOCALGeoData() { + URL u = null; + try { + u = new URL("http://139.18.2.37:8890/sparql"); + } catch (Exception e) { + e.printStackTrace(); + } + LinkedList<String> defaultGraphURIs=new LinkedList<String>(); + defaultGraphURIs.add("http://linkedgeodata.org"); + return new SparqlEndpoint(u, defaultGraphURIs, new LinkedList<String>()); + } + public static SparqlEndpoint getEndpointlocalJoseki() { URL u = null; try { Modified: trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java 2009-04-20 12:14:59 UTC (rev 1718) +++ trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java 2009-04-20 15:12:11 UTC (rev 1719) @@ -20,6 +20,8 @@ package org.dllearner.scripts.matching; import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.net.URI; @@ -28,6 +30,7 @@ import org.dllearner.kb.sparql.SPARQLTasks; import org.dllearner.kb.sparql.SparqlEndpoint; +import org.dllearner.kb.sparql.SparqlQuery; import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; @@ -41,8 +44,24 @@ */ public class DBpediaLinkedGeoData { + private static File dbpediaFile = new File("log/DBpedia_POIs.nt"); + private static boolean regenerateFile = false; + + private static SparqlEndpoint dbpediaEndpoint = SparqlEndpoint.getEndpointLOCALDBpedia(); + private static SparqlEndpoint geoDataEndpoint = SparqlEndpoint.getEndpointLOCALGeoData(); + public static void main(String[] args) throws IOException { + // download all objects having geo-coordinates from DBpedia if necessary + if(!dbpediaFile.exists() || regenerateFile) { + createDBpediaFile(); + } + + // read file point by point + // for each point: call match method + + System.exit(0); + // we start from the DBpedia URI and try to find the corresponding // OSM URI (assuming that each location having coordinates in Wikipedia also // exists in OSM) @@ -90,4 +109,58 @@ } + // downloads information about DBpedia into a separate file + private static void createDBpediaFile() throws IOException { + + // use this to set the "chunk size" for getting DBpedia points + int limit = 1000; + int offset = 0; + + int counter = 0; + FileOutputStream fos = new FileOutputStream(dbpediaFile, true); + + do { + counter = 0; + + // query DBpedia for all objects having geo-coordinates + String queryStr = "SELECT ?object, ?lat, ?long, ?label WHERE {"; + queryStr += "?object <http://www.w3.org/2003/01/geo/wgs84_pos#lat> ?lat ."; + queryStr += "?object <http://www.w3.org/2003/01/geo/wgs84_pos#long> ?long ."; + queryStr += "?object rdfs:label ?label . }"; + queryStr += "LIMIT " + limit + " OFFSET " + offset; + + SparqlQuery query = new SparqlQuery(queryStr, dbpediaEndpoint); + ResultSet rs = query.send(); + + while(rs.hasNext()) { + QuerySolution qs = rs.nextSolution(); + + String object = qs.get("object").toString(); + String geoLat = qs.getLiteral("lat").getString(); + String geoLong = qs.getLiteral("long").getString(); + String label = qs.getLiteral("label").getString(); + + String content = "<" + object + ">" + " <http://www.w3.org/2000/01/rdf-schema#label> \"" + label + "\" .\n"; + content += "<" + object + ">" + " <http://www.w3.org/2003/01/geo/wgs84_pos#lat> \"" + geoLat + "\"^^<http://www.w3.org/2001/XMLSchema#float> .\n"; + content += "<" + object + ">" + " <http://www.w3.org/2003/01/geo/wgs84_pos#long> \"" + geoLong + "\"^^<http://www.w3.org/2001/XMLSchema#float> .\n"; + + fos.write(content.getBytes()); + + counter++; + } + + offset += limit; + System.out.println(offset + " points queried."); + + } while(counter == limit); + + + fos.close(); + + } + + private static URI findLinkedGeoDataMatch(DBpediaPoint dbpediaPoint) { + + return null; + } } Added: trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaPoint.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaPoint.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaPoint.java 2009-04-20 15:12:11 UTC (rev 1719) @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2007-2009, Jens Lehmann + * + * This file is part of DL-Learner. + * + * DL-Learner is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * DL-Learner is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +package org.dllearner.scripts.matching; + +/** + * @author Jens Lehmann + * + */ +public class DBpediaPoint { + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-05-06 09:51:00
|
Revision: 1738 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1738&view=rev Author: jenslehmann Date: 2009-05-06 09:50:58 +0000 (Wed, 06 May 2009) Log Message: ----------- several small improvements Modified Paths: -------------- trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/gui trunk/bin/gui.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/build.xml trunk/doc/manual/manual.tex trunk/src/dl-learner/org/dllearner/Info.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/dllearner 2009-05-06 09:50:58 UTC (rev 1738) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .:./lib/ant_latex.jar:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.7.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-modularity.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.Start $@ \ No newline at end of file Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/dllearner.bat 2009-05-06 09:50:58 UTC (rev 1738) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .;.\lib\ant_latex.jar;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.7.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-modularity.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.Start %* \ No newline at end of file Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/gui 2009-05-06 09:50:58 UTC (rev 1738) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .:./lib/ant_latex.jar:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.7.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-modularity.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.gui.StartGUI $@ \ No newline at end of file Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/gui.bat 2009-05-06 09:50:58 UTC (rev 1738) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .;.\lib\ant_latex.jar;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.7.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-modularity.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.gui.StartGUI %* \ No newline at end of file Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/quickstart 2009-05-06 09:50:58 UTC (rev 1738) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .:./lib/ant_latex.jar:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.7.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-modularity.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/quickstart.bat 2009-05-06 09:50:58 UTC (rev 1738) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .;.\lib\ant_latex.jar;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.7.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-modularity.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.cli.QuickStart \ No newline at end of file Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/ws 2009-05-06 09:50:58 UTC (rev 1738) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -Djava.library.path=lib/fact/ -cp .:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.2.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .:./lib/ant_latex.jar:./lib/dig1.1-xmlbeans.jar:./lib/fact/FaCTpp-OWLAPI-v1.1.11.jar:./lib/ini4j-0.3.2.jar:./lib/jamon-2.7.jar:./lib/jena/antlr-2.7.5.jar:./lib/jena/arq.jar:./lib/jena/commons-logging-1.1.1.jar:./lib/jena/concurrent.jar:./lib/jena/icu4j_3_4.jar:./lib/jena/iri.jar:./lib/jena/jena.jar:./lib/jena/json.jar:./lib/jena/xercesImpl.jar:./lib/junit-4.4.jar:./lib/log4j.jar:./lib/mysql/mysql-connector-java-5.1.6-bin.jar:./lib/ore-tool/swingx-0.9.7.jar:./lib/owlapi/owlapi-bin.jar:./lib/pellet/aterm-java-1.6.jar:./lib/pellet/pellet-core.jar:./lib/pellet/pellet-datatypes.jar:./lib/pellet/pellet-el.jar:./lib/pellet/pellet-explanation.jar:./lib/pellet/pellet-modularity.jar:./lib/pellet/pellet-owlapi.jar:./lib/pellet/pellet-rules.jar:./lib/pellet/relaxngDatatype.jar:./lib/pellet/xsdlib.jar:./lib/protege/org.protege.editor.core.application.jar:./lib/protege/org.protege.editor.owl.jar:./lib/secondstring-20060615.jar:./lib/xbean.jar:./lib/dllearner.jar org.dllearner.server.DLLearnerWSStart $@ \ No newline at end of file Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/bin/ws.bat 2009-05-06 09:50:58 UTC (rev 1738) @@ -1 +1 @@ -java -Xmx512m -Djava.library.path=lib/fact/ -cp .;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.2.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file +java -Xmx1024m -Djava.library.path=lib/fact/ -cp .;.\lib\ant_latex.jar;.\lib\dig1.1-xmlbeans.jar;.\lib\fact\FaCTpp-OWLAPI-v1.1.11.jar;.\lib\ini4j-0.3.2.jar;.\lib\jamon-2.7.jar;.\lib\jena\antlr-2.7.5.jar;.\lib\jena\arq.jar;.\lib\jena\commons-logging-1.1.1.jar;.\lib\jena\concurrent.jar;.\lib\jena\icu4j_3_4.jar;.\lib\jena\iri.jar;.\lib\jena\jena.jar;.\lib\jena\json.jar;.\lib\jena\xercesImpl.jar;.\lib\junit-4.4.jar;.\lib\log4j.jar;.\lib\mysql\mysql-connector-java-5.1.6-bin.jar;.\lib\ore-tool\swingx-0.9.7.jar;.\lib\owlapi\owlapi-bin.jar;.\lib\pellet\aterm-java-1.6.jar;.\lib\pellet\pellet-core.jar;.\lib\pellet\pellet-datatypes.jar;.\lib\pellet\pellet-el.jar;.\lib\pellet\pellet-explanation.jar;.\lib\pellet\pellet-modularity.jar;.\lib\pellet\pellet-owlapi.jar;.\lib\pellet\pellet-rules.jar;.\lib\pellet\relaxngDatatype.jar;.\lib\pellet\xsdlib.jar;.\lib\protege\org.protege.editor.core.application.jar;.\lib\protege\org.protege.editor.owl.jar;.\lib\secondstring-20060615.jar;.\lib\xbean.jar;.\lib\dllearner.jar org.dllearner.server.DLLearnerWSStart %* \ No newline at end of file Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/build.xml 2009-05-06 09:50:58 UTC (rev 1738) @@ -17,7 +17,7 @@ <!-- other settings --> <!-- maximum amount of allocated memory in startup scripts --> - <property name ="max_memory" value="512" /> + <property name ="max_memory" value="1024" /> <!-- set up classpath --> <path id="classpath"> Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/doc/manual/manual.tex 2009-05-06 09:50:58 UTC (rev 1738) @@ -69,7 +69,7 @@ \emph{Conf files}, e.g. \verb|examples/father.conf| in this case, describe the learning problem and specify which algorithm you want to use to solve it. In the simplest case they just say where to find the background knowledge to use (in the OWL file \verb|examples/father.owl| in this case) and the positive and negative examples (marked by ``+'' and ``-'', respectively). When running the above command, you should get something similar to the following: \begin{verbatim} -DL-Learner 2009-04-20 command line interface +DL-Learner 2009-05-06 command line interface starting component manager ... OK (157ms) initialising component "OWL file" ... OK (0ms) initialising component "fast instance checker" ... OK (842ms) Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/src/dl-learner/org/dllearner/Info.java 2009-05-06 09:50:58 UTC (rev 1738) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2009-04-20"; + public static final String build = "2009-05-06"; } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2009-05-06 09:50:58 UTC (rev 1738) @@ -293,6 +293,9 @@ } else { // instantiate Pellet reasoner reasoner = new org.mindswap.pellet.owlapi.Reasoner(manager); + // we register Pellet as ontology change listener, otherwise Pellet + // will not refresh when the ontology is modified + manager.addOntologyChangeListener((org.mindswap.pellet.owlapi.Reasoner)reasoner); //set classification output to "none", while default is "console" PelletOptions.USE_CLASSIFICATION_MONITOR = PelletOptions.MonitorType.valueOf("NONE"); @@ -301,7 +304,7 @@ Logger pelletLogger = Logger.getLogger("org.mindswap.pellet"); pelletLogger.setLevel(Level.WARN); } - + /* Set<OWLOntology> importsClosure = manager.getImportsClosure(ontology); System.out.println("imports closure : " + importsClosure); @@ -1060,11 +1063,11 @@ try { // workaround due to a bug in Pellet 2.0RC (see PelletBug.java und PelletBug2.java) - if(configurator.getReasonerType().equals("pellet")) { - consistent = ((org.mindswap.pellet.owlapi.Reasoner)reasoner).isConsistent(); - } else { +// if(configurator.getReasonerType().equals("pellet")) { +// consistent = ((org.mindswap.pellet.owlapi.Reasoner)reasoner).isConsistent(); +// } else { consistent = reasoner.isConsistent(ontology); - } +// } } catch (OWLReasonerException e) { e.printStackTrace(); } Modified: trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java 2009-05-05 13:43:32 UTC (rev 1737) +++ trunk/src/dl-learner/org/dllearner/scripts/matching/DBpediaLinkedGeoData.java 2009-05-06 09:50:58 UTC (rev 1738) @@ -312,7 +312,7 @@ String line=""; while ((line = rd.readLine()) != null) { - if(line.contains("<http://linkedgeodata.org/vocabulary#name>") || line.contains("<http://linkedgeodata.org/vocabulary/#name%25en>")) { + if(line.contains("<http://linkedgeodata.org/vocabulary#name>") || line.contains("<http://linkedgeodata.org/vocabulary/#name%25en>") || line.contains("<http://linkedgeodata.org/vocabulary/#int_name>")) { int first = line.indexOf("\"") + 1; int last = line.lastIndexOf("\""); String label = line.substring(first, last); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-05-06 10:37:23
|
Revision: 1739 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1739&view=rev Author: jenslehmann Date: 2009-05-06 10:37:08 +0000 (Wed, 06 May 2009) Log Message: ----------- fixed problem in GUI help in release Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/gui/tutorial.html trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-05-06 09:50:58 UTC (rev 1738) +++ trunk/build.xml 2009-05-06 10:37:08 UTC (rev 1739) @@ -118,7 +118,7 @@ <!-- we also need to copy some images, which should be included in dllearner.jar --> <copy toDir="classes_tmp" > - <fileset dir="${source_dir}" includes="**/*.gif"/> + <fileset dir="${source_dir}" includes="**/*.gif,**/*.html"/> </copy> <mkdir dir="${release_tmp_dir}"/> <mkdir dir="${release_tmp_dir}/lib/"/> Modified: trunk/src/dl-learner/org/dllearner/gui/tutorial.html =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/tutorial.html 2009-05-06 09:50:58 UTC (rev 1738) +++ trunk/src/dl-learner/org/dllearner/gui/tutorial.html 2009-05-06 10:37:08 UTC (rev 1739) @@ -27,21 +27,23 @@ <p> <i>Example:</i><br /> Suppose you want to learn the definition of a class in an existing ontology. In this case, -you can proceed as follows:<br /> -1. In the tab "Knowledge Source", choose an OWL file containing your ontology.<br /> -2. Click on the tab "Reasoner". We recommend to the defaults unchanged here, but you - are free to modify the settings and choose the reasoner you like.<br /> -3. Click on the tab "Learning Problem". This may take a while, since the reasoner will now +you can proceed as follows: +<ol> +<li>In the tab "Knowledge Source", choose an OWL file containing your ontology.</li> +<li>Click on the tab "Reasoner". We recommend to the defaults unchanged here, but you + are free to modify the settings and choose the reasoner you like.</li> +<li>Click on the tab "Learning Problem". This may take a while, since the reasoner will now read the ontology you specified in step 1. Since you want to learn the definition of a class, use the drop down box and select "Class Learning Problem". After this, set the value of - the option "classToDescribe" to the desired class.<br /> -4. Click on the "Learning Algorithm" tab. Here, you can select a learning algorithm and - modify its settings. If you are unsure what to do, just stick with the default values.<br /> -5. Click on the "Run" tab and press the "Start" button. The algorithm is now running + the option "classToDescribe" to the desired class.</li> +<li>Click on the "Learning Algorithm" tab. Here, you can select a learning algorithm and + modify its settings. If you are unsure what to do, just stick with the default values.</li> +<li>Click on the "Run" tab and press the "Start" button. The algorithm is now running and the currently best solutions found are displayed in the panel below (using Manchester OWL Syntax) along with some reasoning statistics. Depending on the learning algorithm and settings, the run may not terminate (in reasonable time). In such a case you can use - the "Stop" button to gracefully stop the algorithm.<br /> + the "Stop" button to gracefully stop the algorithm.</li> +</ol> For explanations of components in each step, please consult the DL-Learner manual. </p><br /> Modified: trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-05-06 09:50:58 UTC (rev 1738) +++ trunk/src/dl-learner/org/dllearner/test/junit/ExampleTests.java 2009-05-06 10:37:08 UTC (rev 1739) @@ -70,7 +70,7 @@ boolean randomize = true; // GPs can be excluded temporarily (because those tests are very time-consuming) - boolean testGP = false; + boolean testGP = true; // we use a logger, which outputs few messages (warnings, errors) SimpleLayout layout = new SimpleLayout(); @@ -130,7 +130,7 @@ // ignore.add("./examples/family-benchmark/Aunt.conf"); // did not terminate so far (waited 45 minutes) => disallowing ALL helps (TODO find out details) // ignore.add("examples/krk/KRK_ZERO_against_1to5_fastInstance.conf"); // stack overflow // ignore.add("examples/krk/KRK_ONE_ZERO_fastInstance.conf"); // stack overflow - ignore.add("examples/krk/"); // too many stack overflows +// ignore.add("examples/krk/"); // too many stack overflows int failedCounter = 0; int counter = 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-05-06 10:53:28
|
Revision: 1740 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1740&view=rev Author: jenslehmann Date: 2009-05-06 10:53:22 +0000 (Wed, 06 May 2009) Log Message: ----------- fixed two load/save bugs in GUI Modified Paths: -------------- trunk/doc/configOptions.txt trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java trunk/src/dl-learner/org/dllearner/core/options/URLConfigOption.java Modified: trunk/doc/configOptions.txt =================================================================== --- trunk/doc/configOptions.txt 2009-05-06 10:37:08 UTC (rev 1739) +++ trunk/doc/configOptions.txt 2009-05-06 10:53:22 UTC (rev 1740) @@ -196,13 +196,7 @@ default value: true conf file usage: fastInstanceChecker.defaultNegation = true; -option name: forallRetrievalSemantics -description: This option controls how to interpret the all quantifier in orall r.C. The standard option isto return all those which do not have an r-filler not in C. The domain semantics is to use thosewhich are in the domain of r and do not have an r-filler not in C. The forallExists semantics is touse those which have at least one r-filler and do not have an r-filler not in C. -allowed values: String [domain, forallExists, standard] -default value: forallExists -conf file usage: fastInstanceChecker.forallRetrievalSemantics = forallExists; - component: fast retrieval reasoner (org.dllearner.reasoning.FastRetrievalReasoner) ================================================================================== @@ -225,160 +219,124 @@ * Learning Problems * ********************* -component: unnamed component (org.dllearner.learningproblems.ClassLearningProblem) -================================================================================== +component: class learning problem (org.dllearner.learningproblems.ClassLearningProblem) +======================================================================================= conf file usage: problem = classLearning; option name: classToDescribe description: class of which a description should be learned -allowed values: String [] +allowed values: URL default value: not set (mandatory) conf file usage: classLearning.classToDescribe = ; option name: type -description: Whether to learn an equivalence class or super class axiom. +description: whether to learn an equivalence class or super class axiom allowed values: String [equivalence, superClass] default value: equivalence conf file usage: classLearning.type = equivalence; -component: two valued inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) -=================================================================================================== +component: pos neg learning problem (org.dllearner.learningproblems.PosNegLPStandard) +===================================================================================== -conf file usage: problem = posNegInclusionLP; +conf file usage: problem = posNegLPStandard; option name: positiveExamples description: positive examples allowed values: Set<String> default value: not set (mandatory) -conf file usage: posNegInclusionLP.positiveExamples = ; +conf file usage: posNegLPStandard.positiveExamples = ; option name: negativeExamples description: negative examples allowed values: Set<String> default value: not set (mandatory) -conf file usage: posNegInclusionLP.negativeExamples = ; +conf file usage: posNegLPStandard.negativeExamples = ; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. allowed values: boolean default value: false -conf file usage: posNegInclusionLP.useRetrievalForClassficiation = false; +conf file usage: posNegLPStandard.useRetrievalForClassficiation = false; option name: percentPerLenghtUnit description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one allowed values: double min 0.0 max 1.0 default value: 0.05 -conf file usage: posNegInclusionLP.percentPerLenghtUnit = 0.05; +conf file usage: posNegLPStandard.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. allowed values: String [never, oneCheck, twoChecks] default value: twoChecks -conf file usage: posNegInclusionLP.useMultiInstanceChecks = twoChecks; +conf file usage: posNegLPStandard.useMultiInstanceChecks = twoChecks; -component: two valued definition learning problem (org.dllearner.learningproblems.PosNegLPStandard) -=================================================================================================== - -conf file usage: problem = posNegDefinitionLP; - -option name: positiveExamples -description: positive examples -allowed values: Set<String> -default value: not set (mandatory) -conf file usage: posNegDefinitionLP.positiveExamples = ; - -option name: negativeExamples -description: negative examples -allowed values: Set<String> -default value: not set (mandatory) -conf file usage: posNegDefinitionLP.negativeExamples = ; - -option name: useRetrievalForClassficiation -description: Specifies whether to use retrieval or instance checks for testing a concept. -allowed values: boolean -default value: false -conf file usage: posNegDefinitionLP.useRetrievalForClassficiation = false; - -option name: percentPerLenghtUnit -description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one -allowed values: double min 0.0 max 1.0 -default value: 0.05 -conf file usage: posNegDefinitionLP.percentPerLenghtUnit = 0.05; - -option name: useMultiInstanceChecks -description: See UseMultiInstanceChecks enum. -allowed values: String [never, oneCheck, twoChecks] -default value: twoChecks -conf file usage: posNegDefinitionLP.useMultiInstanceChecks = twoChecks; - - component: three valued definition learning problem (org.dllearner.learningproblems.PosNegLPStrict) =================================================================================================== -conf file usage: problem = posNegDefinitionLPStrict; +conf file usage: problem = posNegLPStrict; option name: positiveExamples description: positive examples allowed values: Set<String> default value: not set (mandatory) -conf file usage: posNegDefinitionLPStrict.positiveExamples = ; +conf file usage: posNegLPStrict.positiveExamples = ; option name: negativeExamples description: negative examples allowed values: Set<String> default value: not set (mandatory) -conf file usage: posNegDefinitionLPStrict.negativeExamples = ; +conf file usage: posNegLPStrict.negativeExamples = ; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. allowed values: boolean default value: false -conf file usage: posNegDefinitionLPStrict.useRetrievalForClassficiation = false; +conf file usage: posNegLPStrict.useRetrievalForClassficiation = false; option name: percentPerLenghtUnit description: describes the reduction in classification accuracy in percent one is willing to accept for reducing the length of the concept by one allowed values: double min 0.0 max 1.0 default value: 0.05 -conf file usage: posNegDefinitionLPStrict.percentPerLenghtUnit = 0.05; +conf file usage: posNegLPStrict.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. allowed values: String [never, oneCheck, twoChecks] default value: twoChecks -conf file usage: posNegDefinitionLPStrict.useMultiInstanceChecks = twoChecks; +conf file usage: posNegLPStrict.useMultiInstanceChecks = twoChecks; option name: penaliseNeutralExamples description: if set to true neutral examples are penalised allowed values: boolean default value: not set -conf file usage: posNegDefinitionLPStrict.penaliseNeutralExamples = ; +conf file usage: posNegLPStrict.penaliseNeutralExamples = ; option name: accuracyPenalty description: penalty for pos/neg examples which are classified as neutral allowed values: double default value: 1.0 -conf file usage: posNegDefinitionLPStrict.accuracyPenalty = 1.0; +conf file usage: posNegLPStrict.accuracyPenalty = 1.0; option name: errorPenalty description: penalty for pos. examples classified as negative or vice versa allowed values: double default value: 3.0 -conf file usage: posNegDefinitionLPStrict.errorPenalty = 3.0; +conf file usage: posNegLPStrict.errorPenalty = 3.0; -component: positive only definition learning problem (org.dllearner.learningproblems.PosOnlyLP) -=============================================================================================== +component: pos only learning problem (org.dllearner.learningproblems.PosOnlyLP) +=============================================================================== -conf file usage: problem = null; +conf file usage: problem = posOnlyLP; option name: positiveExamples description: positive examples allowed values: Set<String> default value: not set (mandatory) -conf file usage: null.positiveExamples = ; +conf file usage: posOnlyLP.positiveExamples = ; *********************** @@ -408,11 +366,11 @@ conf file usage: algorithm = random; -option name: numberOfTrees +option name: numberOfGuesses description: number of randomly generated concepts/trees allowed values: int -default value: 5 -conf file usage: random.numberOfTrees = 5; +default value: 100 +conf file usage: random.numberOfGuesses = 100; option name: maxDepth description: maximum depth of generated concepts/trees @@ -465,8 +423,8 @@ option name: useNegation description: specifies whether negation is used in the learning algorothm allowed values: boolean -default value: true -conf file usage: celoe.useNegation = true; +default value: false +conf file usage: celoe.useNegation = false; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm @@ -495,10 +453,16 @@ option name: maxDepth description: maximum depth of description allowed values: int -default value: 4 -conf file usage: celoe.maxDepth = 4; +default value: 7 +conf file usage: celoe.maxDepth = 7; +option name: maxNrOfResults +description: 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). +allowed values: int min 1 max 100 +default value: 10 +conf file usage: celoe.maxNrOfResults = 10; + component: standard EL learning algorithm (org.dllearner.algorithms.el.ELLearningAlgorithm) =========================================================================================== @@ -954,12 +918,6 @@ default value: false conf file usage: refexamples.usePropernessChecks = false; -option name: maxPosOnlyExpansion -description: 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 -allowed values: int -default value: 4 -conf file usage: refexamples.maxPosOnlyExpansion = 4; - option name: noisePercentage description: the (approximated) percentage of noise within the examples allowed values: double min 0.0 max 100.0 Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2009-05-06 10:37:08 UTC (rev 1739) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2009-05-06 10:53:22 UTC (rev 1740) @@ -62,6 +62,7 @@ import org.dllearner.core.options.StringConfigOption; import org.dllearner.core.options.StringSetConfigOption; import org.dllearner.core.options.StringTupleListConfigOption; +import org.dllearner.core.options.URLConfigOption; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; @@ -388,6 +389,19 @@ (StringConfigOption) configOption, option.getStringValue()); cm.applyConfigEntry(component, entry); + } else if (configOption instanceof URLConfigOption && option.isStringOption()) { + + ConfigEntry<URL> entry = null; + try { + entry = new ConfigEntry<URL>( + (URLConfigOption) configOption, new URL(option.getStringValue())); + } catch (MalformedURLException e) { + handleError("The type of conf file entry \"" + option.getFullName() + + "\" is not correct: value \"" + option.getValue() + + "\" not valid a URL!"); + } + cm.applyConfigEntry(component, entry); + } else if (configOption instanceof IntegerConfigOption && option.isIntegerOption()) { ConfigEntry<Integer> entry = new ConfigEntry<Integer>( Modified: trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java 2009-05-06 10:37:08 UTC (rev 1739) +++ trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java 2009-05-06 10:53:22 UTC (rev 1740) @@ -120,7 +120,7 @@ @Override public String getValueFormatting(String value) { if (value != null) - return value.toString() + ";"; + return "\"" + value.toString() + "\";"; else return null; } Modified: trunk/src/dl-learner/org/dllearner/core/options/URLConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/URLConfigOption.java 2009-05-06 10:37:08 UTC (rev 1739) +++ trunk/src/dl-learner/org/dllearner/core/options/URLConfigOption.java 2009-05-06 10:53:22 UTC (rev 1740) @@ -96,7 +96,7 @@ */ @Override public String getValueFormatting(URL value) { - return value.toString(); + return "\"" + value.toString() + "\";"; } /* (non-Javadoc) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-05-27 10:03:39
|
Revision: 1773 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1773&view=rev Author: jenslehmann Date: 2009-05-27 10:03:32 +0000 (Wed, 27 May 2009) Log Message: ----------- fixed Protege plugin update problems Modified Paths: -------------- trunk/build.xml trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2009-05-27 09:53:20 UTC (rev 1772) +++ trunk/build.xml 2009-05-27 10:03:32 UTC (rev 1773) @@ -370,7 +370,8 @@ </copy> <javac srcdir="${source}" destdir="${temp}" - debug="on"> + debug="on" + target="1.5"> <classpath refid="classpath"/> </javac> <jar destfile="${release}/DL-Learner-protege-plugin.jar" manifest="${temp}/META-INF/MANIFEST.MF"> Modified: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2009-05-27 09:53:20 UTC (rev 1772) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2009-05-27 10:03:32 UTC (rev 1773) @@ -3,12 +3,12 @@ Bundle-Name: DL-Learner Plugin Bundle-SymbolicName: org.dllearner.tools.protege;singleton:=true Bundle-Category: protege -Bundle-Description: blablabla -Bundle-Vendor: blablabla -Bundle-DocURL: blablabla +Bundle-Description: Protege DL-Learner Plugin +Bundle-Vendor: DL-Learner Project +Bundle-DocURL: http://dl-learner.org/wiki/ProtegePlugin Bundle-ClassPath: .,lib/junit-4.4.jar,lib/jamon-2.7.jar,lib/pellet/pellet-core.jar,lib/pellet/pellet-datatypes.jar,lib/pellet/pellet-el.jar,lib/pellet/pellet-explanation.jar,lib/pellet/pellet-owlapi.jar,lib/pellet/pellet-rules.jar,lib/pellet/aterm-java-1.6.jar,lib/jena/json.jar,lib/pellet/relaxngDatatype.jar,lib/pellet/xsdlib.jar,lib/jena/commons-logging-1.1.1.jar,lib/ore-tool/swingx-0.9.2.jar Import-Package: org.osgi.framework,org.apache.log4j Export-Package: lib -Bundle-Version: 1.0.0 +Bundle-Version: 0.5.2 Bundle-Activator: org.protege.editor.core.plugin.DefaultPluginActivator Require-Bundle: org.eclipse.equinox.registry,org.eclipse.equinox.common,org.protege.editor.core.application,org.protege.editor.owl,org.semanticweb.owl.owlapi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2009-06-03 16:05:05
|
Revision: 1790 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1790&view=rev Author: lorenz_b Date: 2009-06-03 16:05:00 +0000 (Wed, 03 Jun 2009) Log Message: ----------- new reasoner only based on pellet Modified Paths: -------------- trunk/lib/components.ini Added Paths: ----------- trunk/src/dl-learner/org/dllearner/reasoning/PelletReasoner.java Modified: trunk/lib/components.ini =================================================================== --- trunk/lib/components.ini 2009-06-03 16:03:06 UTC (rev 1789) +++ trunk/lib/components.ini 2009-06-03 16:05:00 UTC (rev 1790) @@ -10,6 +10,7 @@ org.dllearner.reasoning.DIGReasoner org.dllearner.reasoning.FastRetrievalReasoner org.dllearner.reasoning.FastInstanceChecker +org.dllearner.reasoning.PelletReasoner # learning problems org.dllearner.learningproblems.PosNegLPStandard org.dllearner.learningproblems.PosNegLPStrict Added: trunk/src/dl-learner/org/dllearner/reasoning/PelletReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/PelletReasoner.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/reasoning/PelletReasoner.java 2009-06-03 16:05:00 UTC (rev 1790) @@ -0,0 +1,858 @@ +package org.dllearner.reasoning; + +import java.io.File; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeMap; +import java.util.TreeSet; +import java.util.Map.Entry; + +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.configurators.Configurator; +import org.dllearner.core.owl.Axiom; +import org.dllearner.core.owl.Constant; +import org.dllearner.core.owl.Datatype; +import org.dllearner.core.owl.DatatypeProperty; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Entity; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.KB; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.core.owl.Nothing; +import org.dllearner.core.owl.ObjectProperty; +import org.dllearner.core.owl.Thing; +import org.dllearner.core.owl.TypedConstant; +import org.dllearner.core.owl.UntypedConstant; +import org.dllearner.kb.OWLAPIOntology; +import org.dllearner.kb.OWLFile; +import org.dllearner.kb.sparql.SparqlKnowledgeSource; +import org.dllearner.reasoning.ReasonerType; +import org.dllearner.utilities.owl.ConceptComparator; +import org.dllearner.utilities.owl.OWLAPIAxiomConvertVisitor; +import org.dllearner.utilities.owl.OWLAPIConverter; +import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; +import org.dllearner.utilities.owl.RoleComparator; +import org.mindswap.pellet.PelletOptions; +import org.mindswap.pellet.owlapi.Reasoner; +import org.mindswap.pellet.utils.SetUtils; +import org.mindswap.pellet.utils.progress.ProgressMonitor; +import org.semanticweb.owl.apibinding.OWLManager; +import org.semanticweb.owl.inference.OWLReasonerException; +import org.semanticweb.owl.model.AddAxiom; +import org.semanticweb.owl.model.OWLAnnotation; +import org.semanticweb.owl.model.OWLAxiom; +import org.semanticweb.owl.model.OWLClass; +import org.semanticweb.owl.model.OWLConstant; +import org.semanticweb.owl.model.OWLDataFactory; +import org.semanticweb.owl.model.OWLDataProperty; +import org.semanticweb.owl.model.OWLDataRange; +import org.semanticweb.owl.model.OWLDataType; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLEntity; +import org.semanticweb.owl.model.OWLIndividual; +import org.semanticweb.owl.model.OWLLabelAnnotation; +import org.semanticweb.owl.model.OWLNamedObject; +import org.semanticweb.owl.model.OWLObjectProperty; +import org.semanticweb.owl.model.OWLOntology; +import org.semanticweb.owl.model.OWLOntologyChangeException; +import org.semanticweb.owl.model.OWLOntologyCreationException; +import org.semanticweb.owl.model.OWLOntologyFormat; +import org.semanticweb.owl.model.OWLOntologyManager; +import org.semanticweb.owl.model.OWLOntologyStorageException; +import org.semanticweb.owl.model.OWLTypedConstant; +import org.semanticweb.owl.model.OWLUntypedConstant; +import org.semanticweb.owl.model.RemoveAxiom; +import org.semanticweb.owl.model.UnknownOWLOntologyException; +import org.semanticweb.owl.util.SimpleURIMapper; +import org.semanticweb.owl.vocab.NamespaceOWLOntologyFormat; + +import com.clarkparsia.explanation.PelletExplanation; + +public class PelletReasoner extends ReasonerComponent { + + private Reasoner reasoner; + private OWLOntologyManager manager; + private OWLOntology ontology; + // the data factory is used to generate OWL API objects + private OWLDataFactory factory; + + private ConceptComparator conceptComparator = new ConceptComparator(); + private RoleComparator roleComparator = new RoleComparator(); + + Set<NamedClass> atomicConcepts = new TreeSet<NamedClass>(conceptComparator); + Set<ObjectProperty> atomicRoles = new TreeSet<ObjectProperty>(roleComparator); + SortedSet<DatatypeProperty> datatypeProperties = new TreeSet<DatatypeProperty>(); + SortedSet<DatatypeProperty> booleanDatatypeProperties = new TreeSet<DatatypeProperty>(); + SortedSet<DatatypeProperty> doubleDatatypeProperties = new TreeSet<DatatypeProperty>(); + SortedSet<DatatypeProperty> intDatatypeProperties = new TreeSet<DatatypeProperty>(); + SortedSet<Individual> individuals = new TreeSet<Individual>(); + + // namespaces + private Map<String, String> prefixes = new TreeMap<String,String>(); + private String baseURI; + + // references to OWL API ontologies + private List<OWLOntology> owlAPIOntologies = new LinkedList<OWLOntology>(); + + public PelletReasoner(Set<KnowledgeSource> sources) { + super(sources); + // TODO Auto-generated constructor stub + } + + public void loadOntologies() { + Comparator<OWLNamedObject> namedObjectComparator = new Comparator<OWLNamedObject>() { + public int compare(OWLNamedObject o1, OWLNamedObject o2) { + return o1.getURI().compareTo(o2.getURI()); + } + }; + Set<OWLClass> classes = new TreeSet<OWLClass>(namedObjectComparator); + Set<OWLObjectProperty> owlObjectProperties = new TreeSet<OWLObjectProperty>( + namedObjectComparator); + Set<OWLDataProperty> owlDatatypeProperties = new TreeSet<OWLDataProperty>( + namedObjectComparator); + Set<OWLIndividual> owlIndividuals = new TreeSet<OWLIndividual>( + namedObjectComparator); + + Set<OWLOntology> allImports = new HashSet<OWLOntology>(); + prefixes = new TreeMap<String, String>(); + + for (KnowledgeSource source : sources) { + + if (source instanceof OWLFile + || source instanceof SparqlKnowledgeSource + || source instanceof OWLAPIOntology) { + URL url = null; + if (source instanceof OWLFile) { + url = ((OWLFile) source).getURL(); + } + + try { + + if (source instanceof OWLAPIOntology) { + ontology = ((OWLAPIOntology) source).getOWLOntolgy(); + } else if (source instanceof SparqlKnowledgeSource) { + ontology = ((SparqlKnowledgeSource) source) + .getOWLAPIOntology(); + } else { + ontology = manager.loadOntologyFromPhysicalURI(url + .toURI()); + } + + owlAPIOntologies.add(ontology); + // imports includes the ontology itself + Set<OWLOntology> imports = manager + .getImportsClosure(ontology); + allImports.addAll(imports); + // System.out.println(imports); + for (OWLOntology ont : imports) { + classes.addAll(ont.getReferencedClasses()); + owlObjectProperties.addAll(ont + .getReferencedObjectProperties()); + owlDatatypeProperties.addAll(ont + .getReferencedDataProperties()); + owlIndividuals.addAll(ont.getReferencedIndividuals()); + } + + // if several knowledge sources are included, then we can + // only + // guarantee that the base URI is from one of those sources + // (there + // can't be more than one); but we will take care that all + // prefixes are + // correctly imported + OWLOntologyFormat format = manager + .getOntologyFormat(ontology); + if (format instanceof NamespaceOWLOntologyFormat) { + prefixes.putAll(((NamespaceOWLOntologyFormat) format) + .getNamespacesByPrefixMap()); + baseURI = prefixes.get(""); + prefixes.remove(""); + } + + // read in primitives + for(OWLClass owlClass : classes) + atomicConcepts.add(new NamedClass(owlClass.getURI().toString())); + for(OWLObjectProperty owlProperty : owlObjectProperties) + atomicRoles.add(new ObjectProperty(owlProperty.getURI().toString())); + for(OWLDataProperty owlProperty : owlDatatypeProperties) { + DatatypeProperty dtp = new DatatypeProperty(owlProperty.getURI().toString()); + Set<OWLDataRange> ranges = owlProperty.getRanges(allImports); + Iterator<OWLDataRange> it = ranges.iterator(); + if(it.hasNext()) { + OWLDataRange range = it.next(); + if(range.isDataType()) { + URI uri = ((OWLDataType)range).getURI(); + if(uri.equals(Datatype.BOOLEAN.getURI())) + booleanDatatypeProperties.add(dtp); + else if(uri.equals(Datatype.DOUBLE.getURI())) + doubleDatatypeProperties.add(dtp); + else if(uri.equals(Datatype.INT.getURI())) + intDatatypeProperties.add(dtp); + } + } + datatypeProperties.add(dtp); + } + for(OWLIndividual owlIndividual : owlIndividuals) { + individuals.add(new Individual(owlIndividual.getURI().toString())); + } + + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + // all other sources are converted to KB and then to an + // OWL API ontology + } else { + KB kb = source.toKB(); + // System.out.println(kb.toString(null,null)); + + URI ontologyURI = URI.create("http://example.com"); + ontology = null; + try { + ontology = manager.createOntology(ontologyURI); + } catch (OWLOntologyCreationException e) { + e.printStackTrace(); + } + OWLAPIAxiomConvertVisitor + .fillOWLOntology(manager, ontology, kb); + owlAPIOntologies.add(ontology); + allImports.add(ontology); + atomicConcepts.addAll(kb.findAllAtomicConcepts()); + atomicRoles.addAll(kb.findAllAtomicRoles()); + individuals.addAll(kb.findAllIndividuals()); + // TODO: add method to find datatypes + } + } + reasoner.loadOntologies(allImports); + } + + public boolean isConsistent(){ + return reasoner.isConsistent(); + } + + public Set<Set<OWLAxiom>> getInconsistencyReasons(){ + PelletExplanation expGen = new PelletExplanation(manager, reasoner.getLoadedOntologies()); + + return expGen.getInconsistencyExplanations(); + } + + @Override + public ReasonerType getReasonerType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void releaseKB() { + reasoner.clearOntologies(); + reasoner.dispose(); + + } + + @Override + public Configurator getConfigurator() { + // TODO Auto-generated method stub + return null; + } + + public OWLOntologyManager getOWLOntologyManager(){ + return manager; + } + + @Override + public void init() throws ComponentInitException { + // reset variables (otherwise subsequent initialisation with + // different knowledge sources will merge both) + atomicConcepts = new TreeSet<NamedClass>(conceptComparator); + atomicRoles = new TreeSet<ObjectProperty>(roleComparator); + datatypeProperties = new TreeSet<DatatypeProperty>(); + booleanDatatypeProperties = new TreeSet<DatatypeProperty>(); + doubleDatatypeProperties = new TreeSet<DatatypeProperty>(); + intDatatypeProperties = new TreeSet<DatatypeProperty>(); + individuals = new TreeSet<Individual>(); + + // create OWL API ontology manager + manager = OWLManager.createOWLOntologyManager(); + factory = manager.getOWLDataFactory(); + //set classification output to "none", while default is "console" + PelletOptions.USE_CLASSIFICATION_MONITOR = PelletOptions.MonitorType.NONE; + // change log level to WARN for Pellet, because otherwise log + // output will be very large + Logger pelletLogger = Logger.getLogger("org.mindswap.pellet"); + pelletLogger.setLevel(Level.WARN); + reasoner = new Reasoner(manager); + manager.addOntologyChangeListener(reasoner); + + } + + public void classify(){ + reasoner.classify(); + } + + public void addProgressMonitor(ProgressMonitor monitor){ + reasoner.getKB().getTaxonomyBuilder().setProgressMonitor(monitor); + } + + @Override + public String getBaseURI() { + return baseURI; + } + + @Override + public SortedSet<Individual> getIndividuals() { + return individuals; + } + + @Override + public Set<NamedClass> getNamedClasses() { + return Collections.unmodifiableSet(atomicConcepts); + } + + @Override + public Set<ObjectProperty> getObjectProperties() { + return Collections.unmodifiableSet(atomicRoles); + } + + @Override + public Map<String, String> getPrefixes() { + return prefixes; + } + + public Set<Description> getComplementClasses(Description desc){ + OWLDescription owlDesc = OWLAPIDescriptionConvertVisitor.getOWLDescription(desc); + Set<Description> complements = new HashSet<Description>(); + for(OWLClass comp : SetUtils.union(reasoner.getDisjointClasses(owlDesc))){ + complements.add(OWLAPIConverter.convertClass(comp)); + } + for(OWLClass comp : reasoner.getComplementClasses(owlDesc)){ + complements.add(OWLAPIConverter.convertClass(comp)); + } + return complements; + + } + + + + @Override + public SortedSet<DatatypeProperty> getDatatypePropertiesImpl() { + return datatypeProperties; + } + + + + + @Override + public boolean isSuperClassOfImpl(Description superConcept, Description subConcept) { + +// System.out.println("super: " + superConcept + "; sub: " + subConcept); + return reasoner.isSubClassOf(OWLAPIDescriptionConvertVisitor.getOWLDescription(subConcept), OWLAPIDescriptionConvertVisitor.getOWLDescription(superConcept)); + + } + + @Override + protected TreeSet<Description> getSuperClassesImpl(Description concept) { + Set<Set<OWLClass>> classes = null; + + classes = reasoner.getSuperClasses(OWLAPIDescriptionConvertVisitor.getOWLDescription(concept)); + + return getFirstClasses(classes); + } + + @Override + protected TreeSet<Description> getSubClassesImpl(Description concept) { + Set<Set<OWLClass>> classes = null; + + classes = reasoner.getSubClasses(OWLAPIDescriptionConvertVisitor.getOWLDescription(concept)); + + return getFirstClasses(classes); + } + + @Override + protected TreeSet<ObjectProperty> getSuperPropertiesImpl(ObjectProperty role) { + Set<Set<OWLObjectProperty>> properties; + + properties = reasoner.getSuperProperties(OWLAPIConverter.getOWLAPIObjectProperty(role)); + + return getFirstObjectProperties(properties); + } + + @Override + protected TreeSet<ObjectProperty> getSubPropertiesImpl(ObjectProperty role) { + Set<Set<OWLObjectProperty>> properties; + + properties = reasoner.getSubProperties(OWLAPIConverter.getOWLAPIObjectProperty(role)); + + return getFirstObjectProperties(properties); + } + + @Override + protected TreeSet<DatatypeProperty> getSuperPropertiesImpl(DatatypeProperty role) { + Set<Set<OWLDataProperty>> properties; + + properties = reasoner.getSuperProperties(OWLAPIConverter.getOWLAPIDataProperty(role)); + + return getFirstDatatypeProperties(properties); + } + + @Override + protected TreeSet<DatatypeProperty> getSubPropertiesImpl(DatatypeProperty role) { + Set<Set<OWLDataProperty>> properties; + + properties = reasoner.getSubProperties(OWLAPIConverter.getOWLAPIDataProperty(role)); + + return getFirstDatatypeProperties(properties); + } + + @Override + public boolean hasTypeImpl(Description concept, Individual individual) { + OWLDescription d = OWLAPIDescriptionConvertVisitor.getOWLDescription(concept); + OWLIndividual i = factory.getOWLIndividual(URI.create(individual.getName())); + try { + return reasoner.hasType(i,d,false); + } catch (OWLReasonerException e) { + e.printStackTrace(); + throw new Error("Instance check error in OWL API."); + } + } + + @Override + public SortedSet<Individual> getIndividualsImpl(Description concept) { +// OWLDescription d = getOWLAPIDescription(concept); + OWLDescription d = OWLAPIDescriptionConvertVisitor.getOWLDescription(concept); + Set<OWLIndividual> individuals = null; + + individuals = reasoner.getIndividuals(d, false); + + SortedSet<Individual> inds = new TreeSet<Individual>(); + for(OWLIndividual ind : individuals) + inds.add(new Individual(ind.getURI().toString())); + return inds; + } + + @Override + public Set<NamedClass> getTypesImpl(Individual individual) { + Set<Set<OWLClass>> result = null; + + result = reasoner.getTypes(factory.getOWLIndividual(URI.create(individual.getName())),false); + + return getFirstClassesNoTopBottom(result); + } + + @Override + public boolean isSatisfiableImpl() { + + return reasoner.isSatisfiable(factory.getOWLThing()); + + } + + @Override + public Description getDomainImpl(ObjectProperty objectProperty) { + OWLObjectProperty prop = OWLAPIConverter.getOWLAPIObjectProperty(objectProperty); + + // Pellet returns a set of sets of named class, which are more + // general than the actual domain/range + Set<Set<OWLDescription>> set = reasoner.getDomains(prop); + return getDescriptionFromReturnedDomain(set); + + } + + @Override + public Description getDomainImpl(DatatypeProperty datatypeProperty) { + OWLDataProperty prop = OWLAPIConverter + .getOWLAPIDataProperty(datatypeProperty); + + Set<Set<OWLDescription>> set = reasoner.getDomains(prop); + return getDescriptionFromReturnedDomain(set); + + } + + @Override + public Description getRangeImpl(ObjectProperty objectProperty) { + OWLObjectProperty prop = OWLAPIConverter + .getOWLAPIObjectProperty(objectProperty); + + Set<OWLDescription> set = reasoner.getRanges(prop); + if (set.size() == 0) + return new Thing(); + OWLClass oc = (OWLClass) set.iterator().next(); + return new NamedClass(oc.getURI().toString()); + + } + + private Description getDescriptionFromReturnedDomain(Set<Set<OWLDescription>> set) { + if(set.size()==0) + return new Thing(); + + Set<OWLDescription> union = new HashSet<OWLDescription>(); + Set<OWLDescription> domains = new HashSet<OWLDescription>(); + + for(Set<OWLDescription> descs : set){ + for(OWLDescription desc : descs){ + union.add(desc); + } + } + for(OWLDescription desc : union){ + boolean isSuperClass = false; + for(Description d : getClassHierarchy().getSubClasses(OWLAPIConverter.convertClass(desc.asOWLClass()))){ + if(union.contains(OWLAPIConverter.getOWLAPIDescription(d))){ + isSuperClass = true; + break; + } + } + if(!isSuperClass){ + domains.add(desc); + } + } + + OWLClass oc = (OWLClass) domains.iterator().next(); + String str = oc.getURI().toString(); + if(str.equals("http://www.w3.org/2002/07/owl#Thing")) { + return new Thing(); + } else { + return new NamedClass(str); + } + } + + @Override + public Map<Individual, SortedSet<Individual>> getPropertyMembersImpl(ObjectProperty atomicRole) { + OWLObjectProperty prop = OWLAPIConverter.getOWLAPIObjectProperty(atomicRole); + Map<Individual, SortedSet<Individual>> map = new TreeMap<Individual, SortedSet<Individual>>(); + for(Individual i : individuals) { + OWLIndividual ind = factory.getOWLIndividual(URI.create(i.getName())); + + // get all related individuals via OWL API + Set<OWLIndividual> inds = null; + + inds = reasoner.getRelatedIndividuals(ind, prop); + + + // convert data back to DL-Learner structures + SortedSet<Individual> is = new TreeSet<Individual>(); + for(OWLIndividual oi : inds) + is.add(new Individual(oi.getURI().toString())); + map.put(i, is); + } + return map; + } + + @Override + protected Map<ObjectProperty,Set<Individual>> getObjectPropertyRelationshipsImpl(Individual individual) { + OWLIndividual ind = factory.getOWLIndividual(URI.create(individual.getName())); + Map<OWLObjectProperty,Set<OWLIndividual>> mapAPI = null; + + mapAPI = reasoner.getObjectPropertyRelationships(ind); + + Map<ObjectProperty,Set<Individual>> map = new TreeMap<ObjectProperty, Set<Individual>>(); + for(Entry<OWLObjectProperty,Set<OWLIndividual>> entry : mapAPI.entrySet()) { + ObjectProperty prop = OWLAPIConverter.convertObjectProperty(entry.getKey()); + Set<Individual> inds = OWLAPIConverter.convertIndividuals(entry.getValue()); + map.put(prop, inds); + } + return map; + } + + @Override + public Set<Individual> getRelatedIndividualsImpl(Individual individual, ObjectProperty objectProperty) { + OWLIndividual ind = factory.getOWLIndividual(URI.create(individual.getName())); + OWLObjectProperty prop = OWLAPIConverter.getOWLAPIObjectProperty(objectProperty); + Set<OWLIndividual> inds = null; + + inds = reasoner.getRelatedIndividuals(ind, prop); + + // convert data back to DL-Learner structures + SortedSet<Individual> is = new TreeSet<Individual>(); + for(OWLIndividual oi : inds) { + is.add(new Individual(oi.getURI().toString())); + } + return is; + } + + @Override + public Set<Constant> getRelatedValuesImpl(Individual individual, DatatypeProperty datatypeProperty) { + OWLIndividual ind = factory.getOWLIndividual(URI.create(individual.getName())); + OWLDataProperty prop = OWLAPIConverter.getOWLAPIDataProperty(datatypeProperty); + Set<OWLConstant> constants = null; + + constants = reasoner.getRelatedValues(ind, prop); + + return OWLAPIConverter.convertConstants(constants); + } + + public Map<Individual, SortedSet<Double>> getDoubleValues( + DatatypeProperty datatypeProperty) { + OWLDataProperty prop = OWLAPIConverter + .getOWLAPIDataProperty(datatypeProperty); + Map<Individual, SortedSet<Double>> map = new TreeMap<Individual, SortedSet<Double>>(); + for (Individual i : individuals) { + OWLIndividual ind = factory.getOWLIndividual(URI + .create(i.getName())); + + // get all related individuals via OWL API + Set<OWLConstant> inds = null; + + inds = reasoner.getRelatedValues(ind, prop); + + // convert data back to DL-Learner structures + SortedSet<Double> is = new TreeSet<Double>(); + for (OWLConstant oi : inds) { + Double d = Double.parseDouble(oi.getLiteral()); + is.add(d); + } + map.put(i, is); + } + return map; + } + + @Override + public Map<Individual, SortedSet<Constant>> getDatatypeMembersImpl(DatatypeProperty datatypeProperty) { + OWLDataProperty prop = OWLAPIConverter.getOWLAPIDataProperty(datatypeProperty); + Map<Individual, SortedSet<Constant>> map = new TreeMap<Individual, SortedSet<Constant>>(); + for(Individual i : individuals) { + OWLIndividual ind = factory.getOWLIndividual(URI.create(i.getName())); + + // get all related values via OWL API + Set<OWLConstant> constants = null; + + constants = reasoner.getRelatedValues(ind, prop); + + + // convert data back to DL-Learner structures + SortedSet<Constant> is = new TreeSet<Constant>(); + for(OWLConstant oi : constants) { + // for typed constants we have to figure out the correct + // data type and value + if(oi instanceof OWLTypedConstant) { + Datatype dt = OWLAPIConverter.convertDatatype(((OWLTypedConstant)oi).getDataType()); + is.add(new TypedConstant(oi.getLiteral(),dt)); + // for untyped constants we have to figure out the value + // and language tag (if any) + } else { + OWLUntypedConstant ouc = (OWLUntypedConstant) oi; + if(ouc.hasLang()) + is.add(new UntypedConstant(ouc.getLiteral(), ouc.getLang())); + else + is.add(new UntypedConstant(ouc.getLiteral())); + } + } + // only add individuals using the datatype property + if(is.size()>0) + map.put(i, is); + } + return map; + } + + // OWL API often returns a set of sets of classes, where each inner + // set consists of equivalent classes; this method picks one class + // from each inner set to flatten the set of sets + private TreeSet<Description> getFirstClasses(Set<Set<OWLClass>> setOfSets) { + TreeSet<Description> concepts = new TreeSet<Description>(conceptComparator); + for(Set<OWLClass> innerSet : setOfSets) { + // take one element from the set and ignore the rest + // (TODO: we need to make sure we always ignore the same concepts) + OWLClass concept = innerSet.iterator().next(); + if(concept.isOWLThing()) { + concepts.add(new Thing()); + } else if(concept.isOWLNothing()) { + concepts.add(new Nothing()); + } else { + concepts.add(new NamedClass(concept.getURI().toString())); + } + } + return concepts; + } + + private Set<NamedClass> getFirstClassesNoTopBottom(Set<Set<OWLClass>> setOfSets) { + Set<NamedClass> concepts = new HashSet<NamedClass>(); + for(Set<OWLClass> innerSet : setOfSets) { + // take one element from the set and ignore the rest + // (TODO: we need to make sure we always ignore the same concepts) + OWLClass concept = innerSet.iterator().next(); + if(!concept.isOWLThing() && !concept.isOWLNothing()) + concepts.add(new NamedClass(concept.getURI().toString())); + } + return concepts; + } + + private TreeSet<ObjectProperty> getFirstObjectProperties(Set<Set<OWLObjectProperty>> setOfSets) { + TreeSet<ObjectProperty> roles = new TreeSet<ObjectProperty>(roleComparator); + for(Set<OWLObjectProperty> innerSet : setOfSets) { + // take one element from the set and ignore the rest + // (TODO: we need to make sure we always ignore the same concepts) + OWLObjectProperty property = innerSet.iterator().next(); + roles.add(new ObjectProperty(property.getURI().toString())); + } + return roles; + } + + private TreeSet<DatatypeProperty> getFirstDatatypeProperties(Set<Set<OWLDataProperty>> setOfSets) { + TreeSet<DatatypeProperty> roles = new TreeSet<DatatypeProperty>(roleComparator); + for(Set<OWLDataProperty> innerSet : setOfSets) { + OWLDataProperty property = innerSet.iterator().next(); + roles.add(new DatatypeProperty(property.getURI().toString())); + } + return roles; + } + + @SuppressWarnings({"unused"}) + private Set<Description> owlClassesToAtomicConcepts(Set<OWLClass> owlClasses) { + Set<Description> concepts = new HashSet<Description>(); + for(OWLClass owlClass : owlClasses) + concepts.add(OWLAPIConverter.convertClass(owlClass)); + return concepts; + } + + public static void exportKBToOWL(File owlOutputFile, KB kb, URI ontologyURI) { + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + //URI ontologyURI = URI.create("http://example.com"); + URI physicalURI = owlOutputFile.toURI(); + SimpleURIMapper mapper = new SimpleURIMapper(ontologyURI, physicalURI); + manager.addURIMapper(mapper); + OWLOntology ontology; + try { + ontology = manager.createOntology(ontologyURI); + // OWLAPIReasoner.fillOWLAPIOntology(manager, ontology, kb); + OWLAPIAxiomConvertVisitor.fillOWLOntology(manager, ontology, kb); + manager.saveOntology(ontology); + } catch (OWLOntologyCreationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (UnknownOWLOntologyException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (OWLOntologyStorageException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + /** + * Test + * + * @param args + */ + public static void main(String[] args) { + String uri = "http://www.co-ode.org/ontologies/pizza/2007/02/12/pizza.owl"; + + OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); + try { + manager.loadOntologyFromPhysicalURI(URI.create(uri)); + new org.mindswap.pellet.owlapi.Reasoner(manager); + System.out.println("Reasoner loaded succesfully."); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * @return the booleanDatatypeProperties + */ + @Override + public SortedSet<DatatypeProperty> getBooleanDatatypePropertiesImpl() { + return booleanDatatypeProperties; + } + + /** + * @return the doubleDatatypeProperties + */ + @Override + public SortedSet<DatatypeProperty> getDoubleDatatypePropertiesImpl() { + return doubleDatatypeProperties; + } + + /** + * @return the intDatatypeProperties + */ + @Override + public SortedSet<DatatypeProperty> getIntDatatypePropertiesImpl() { + return intDatatypeProperties; + } + + + public OWLOntology getOWLAPIOntologies() { + return reasoner.getLoadedOntologies().iterator().next(); + } + + /*public void setReasonerType(String type){ + configurator.setReasonerType(type); + }*/ + +// @Override +// public boolean hasDatatypeSupport() { +// return true; +// } + + @Override + public Set<NamedClass> getInconsistentClassesImpl() { + Set<NamedClass> concepts = new HashSet<NamedClass>(); + + for (OWLClass concept : reasoner.getInconsistentClasses()){ + concepts.add(new NamedClass(concept.getURI().toString())); + } + + return concepts; + } + + + public Set<OWLClass> getInconsistentOWLClasses() { + return reasoner.getInconsistentClasses(); + } + + @Override + @SuppressWarnings("unchecked") + public Set<Constant> getLabelImpl(Entity entity) { + OWLEntity owlEntity = OWLAPIConverter.getOWLAPIEntity(entity); + Set<OWLAnnotation> labelAnnotations = owlEntity.getAnnotations(owlAPIOntologies.get(0), URI.create("http://www.w3.org/2000/01/rdf-schema#label")); + Set<Constant> annotations = new HashSet<Constant>(); + for(OWLAnnotation label : labelAnnotations) { + OWLConstant c = ((OWLLabelAnnotation)label).getAnnotationValue(); + annotations.add(OWLAPIConverter.convertConstant(c)); + } + return annotations; + } + + /* (non-Javadoc) + * @see org.dllearner.core.BaseReasoner#remainsSatisfiable(org.dllearner.core.owl.Axiom) + */ + @Override + public boolean remainsSatisfiableImpl(Axiom axiom) { + boolean consistent = true; + OWLAxiom axiomOWLAPI = OWLAPIAxiomConvertVisitor.convertAxiom(axiom); + + try { + manager.applyChange(new AddAxiom(ontology, axiomOWLAPI)); + } catch (OWLOntologyChangeException e1) { + e1.printStackTrace(); + } + + consistent = reasoner.isConsistent(ontology); + + + try { + manager.applyChange(new RemoveAxiom(ontology, axiomOWLAPI)); + } catch (OWLOntologyChangeException e) { + e.printStackTrace(); + } + + return consistent; + } + + public Reasoner getReasoner() { + return reasoner; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-06-12 11:30:55
|
Revision: 1795 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1795&view=rev Author: jenslehmann Date: 2009-06-12 11:30:46 +0000 (Fri, 12 Jun 2009) Log Message: ----------- adapted architecture picture for ontology engineering Modified Paths: -------------- trunk/src/php-examples/Suggestions.php Added Paths: ----------- trunk/resources/architecture_celoe.png trunk/resources/architecture_celoe.svg Property Changed: ---------------- trunk/src/dl-learner/org/dllearner/core/owl/NamedClass.java Added: trunk/resources/architecture_celoe.png =================================================================== (Binary files differ) Property changes on: trunk/resources/architecture_celoe.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/resources/architecture_celoe.svg =================================================================== --- trunk/resources/architecture_celoe.svg (rev 0) +++ trunk/resources/architecture_celoe.svg 2009-06-12 11:30:46 UTC (rev 1795) @@ -0,0 +1,371 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="architecture_celoe.svg" + sodipodi:docbase="/home/jl/promotion/dl-learner-svn/trunk/resources" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/jl/promotion/dl-learner-svn/trunk/resources/architecture_celoe.png" + inkscape:export-xdpi="147.28065" + inkscape:export-ydpi="147.28065"> + <defs + id="defs4"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective64" /> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0.0" + refX="0.0" + id="TriangleOutL" + style="overflow:visible"> + <path + id="path3302" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.8)" /> + </marker> + <marker + inkscape:stockid="TriangleOutM" + orient="auto" + refY="0.0" + refX="0.0" + id="TriangleOutM" + style="overflow:visible"> + <path + id="path3299" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.4)" /> + </marker> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Lend" + style="overflow:visible;"> + <path + id="path3379" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) rotate(180) translate(1,0)" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.7" + inkscape:cx="375" + inkscape:cy="577.14286" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="1280" + inkscape:window-height="954" + inkscape:window-x="-5" + inkscape:window-y="-3" + showgrid="false" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <g + id="g2753" + transform="translate(0,28)"> + <rect + y="177.64302" + x="50.494846" + height="89.010307" + width="249.01031" + id="rect2160" + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.98969221;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <text + id="text2162" + y="203.79076" + x="71.428574" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + style="font-size:18px" + y="203.79076" + x="71.428574" + id="tspan2164" + sodipodi:role="line">background knowledge</tspan><tspan + style="font-size:18px" + id="tspan2166" + y="226.29076" + x="71.428574" + sodipodi:role="line"> (OWL ontology or</tspan><tspan + style="font-size:18px" + id="tspan2168" + y="248.79076" + x="71.428574" + sodipodi:role="line"> SPARQL endpoint)</tspan></text> + </g> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.07453477;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3169" + width="248.92546" + height="88.925468" + x="400.53726" + y="369.87546" /> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.97974563;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3171" + width="249.02025" + height="89.020256" + x="50.489872" + y="369.06635" /> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3173" + width="304.28571" + height="97.14286" + x="205.71428" + y="556.64783" /> + <g + id="g2760" + transform="translate(0,29.442843)"> + <rect + y="176.24979" + x="400.53046" + height="88.939102" + width="248.9391" + id="rect3167" + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06090128;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <text + id="text3175" + y="213.79076" + x="442.85712" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + xml:space="preserve"><tspan + id="tspan3179" + y="213.79076" + x="442.85712" + sodipodi:role="line">information about </tspan><tspan + id="tspan2721" + y="236.29076" + x="442.85712" + sodipodi:role="line">class to describe</tspan></text> + </g> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="77.14286" + y="395.21933" + id="text3181"><tspan + sodipodi:role="line" + id="tspan3183" + x="77.14286" + y="395.21933"> reasoner</tspan><tspan + sodipodi:role="line" + x="77.14286" + y="417.71933" + id="tspan3185">(Pellet, FaCT, KAON2,</tspan><tspan + sodipodi:role="line" + x="77.14286" + y="440.21933" + id="tspan3423">Racer Pro, HermiT)</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="430" + y="396.64789" + id="text3187"><tspan + sodipodi:role="line" + x="430" + y="396.64789" + id="tspan3191">measuring quality of</tspan><tspan + sodipodi:role="line" + x="430" + y="419.14789" + id="tspan2719"> class expression </tspan><tspan + sodipodi:role="line" + x="430" + y="441.64789" + id="tspan2727"> (heuristics)</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="214.28572" + y="596.64789" + id="text3193"><tspan + sodipodi:role="line" + x="214.28572" + y="596.64789" + id="tspan2709">generation of class expressions</tspan><tspan + sodipodi:role="line" + x="214.28572" + y="619.14789" + id="tspan2715">using a refinement operator</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="-347.21228" + y="507.72968" + id="text3413" + transform="matrix(2.6333242e-3,-0.9999965,0.9999965,2.6333242e-3,0,0)"><tspan + sodipodi:role="line" + id="tspan3415" + x="-347.21228" + y="507.72968">use</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.64779848;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.59119395, 2.59119395;stroke-dashoffset:0;stroke-opacity:1" + d="M 162.85714,361.27485 L 162.85714,309.28729" + id="path3419" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.97576565;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.90306258, 3.90306258;stroke-dashoffset:0;stroke-opacity:1" + d="M 395.95553,408.43421 C 365.52641,422.06523 335.22418,433.61629 307.34169,405.51055" + id="path3421" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="-347.34915" + y="151.48549" + id="text3425" + transform="matrix(2.6333246e-3,-0.9999965,0.9999965,2.6333246e-3,0,0)"><tspan + sodipodi:role="line" + id="tspan3427" + x="-347.34915" + y="151.48549">use</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.90932429;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.7279727, 2.7279727;stroke-dashoffset:0;stroke-opacity:1" + d="M 544.48318,465.45996 C 504.89558,458.38783 475.6447,491.54308 451.56873,544.83742" + id="path3451" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.98453361;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.95360103, 2.95360103;stroke-dashoffset:0;stroke-opacity:1" + d="M 475.85156,549.83705 C 521.04331,557.09936 554.43503,523.05257 581.91927,468.32516" + id="path3453" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.64693761;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.58775042, 2.58775042;stroke-dashoffset:0;stroke-opacity:1" + d="M 518.57143,360.94183 L 518.57143,309.02341" + id="path3455" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="565.71429" + y="519.50507" + id="text3457"><tspan + sodipodi:role="line" + id="tspan3459" + x="565.71429" + y="519.50507">test</tspan><tspan + sodipodi:role="line" + x="565.71429" + y="542.00507" + id="tspan3461">expression</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="391.42859" + y="498.07648" + id="text3463"><tspan + sodipodi:role="line" + id="tspan3465" + x="391.42859" + y="498.07648">return</tspan><tspan + sodipodi:role="line" + x="391.42859" + y="520.57648" + id="tspan3467">quality</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94272459;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.82817393, 2.82817393;stroke-dashoffset:0;stroke-opacity:1" + d="M 217.62905,548.94843 C 176.19401,556.21074 145.57809,522.16395 120.37857,467.43654" + id="path3469" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.91076428;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.73229266, 2.73229266;stroke-dashoffset:0;stroke-opacity:1" + d="M 154.30839,465.51986 C 194.02146,458.44773 223.36506,491.60298 247.51734,544.89732" + id="path3471" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="237.14285" + y="490.93359" + id="text3473"><tspan + sodipodi:role="line" + id="tspan3475" + x="237.14285" + y="490.93359">query</tspan><tspan + sodipodi:role="line" + x="237.14285" + y="513.43359" + id="tspan3477">results</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="88.571426" + y="535.21936" + id="text3479"><tspan + sodipodi:role="line" + id="tspan3481" + x="88.571426" + y="535.21936">query</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="314.28571" + y="439.50504" + id="text3485"><tspan + sodipodi:role="line" + id="tspan3487" + x="314.28571" + y="439.50504">instance</tspan><tspan + sodipodi:role="line" + x="314.28571" + y="462.00504" + id="tspan3489">checks</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.89501047;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.5800417, 3.5800417;stroke-dashoffset:0;stroke-opacity:1" + d="M 305.42618,385.92792 C 334.98062,374.12036 364.41182,364.11452 391.49283,388.46048" + id="path3491" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="318.57144" + y="363.79077" + id="text3493"><tspan + sodipodi:role="line" + id="tspan3495" + x="318.57144" + y="363.79077">results</tspan></text> + </g> +</svg> Modified: trunk/src/php-examples/Suggestions.php =================================================================== --- trunk/src/php-examples/Suggestions.php 2009-06-11 14:57:29 UTC (rev 1794) +++ trunk/src/php-examples/Suggestions.php 2009-06-12 11:30:46 UTC (rev 1795) @@ -15,7 +15,7 @@ $id = $client->generateID(); $ksID=$client->addKnowledgeSource($id,"sparql","http://dbpedia.org/sparql"); -$client->applyConfigEntryInt($id, $ksID, "recursionDepth", 1); +$client->applyConfigEntryInt($id, $ksID, "recursionDepth", 2); $filterClasses=array("http://xmlns.com/foaf/","http://dbpedia.org/class/yago/","http://dbpedia.org/ontology/Resource"); // $relatedInstances = $client->getNegativeExamples($id,$ksID,$examples,count($examples),"http://dbpedia.org/resource/",$filterClasses); // $relatedInstances = $relatedInstances->item; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |