You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(120) |
Sep
(36) |
Oct
(116) |
Nov
(17) |
Dec
(44) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(143) |
Feb
(192) |
Mar
(74) |
Apr
(84) |
May
(105) |
Jun
(64) |
Jul
(49) |
Aug
(120) |
Sep
(159) |
Oct
(156) |
Nov
(51) |
Dec
(28) |
2009 |
Jan
(17) |
Feb
(55) |
Mar
(33) |
Apr
(57) |
May
(54) |
Jun
(28) |
Jul
(6) |
Aug
(16) |
Sep
(38) |
Oct
(30) |
Nov
(26) |
Dec
(52) |
2010 |
Jan
(7) |
Feb
(91) |
Mar
(65) |
Apr
(2) |
May
(14) |
Jun
(25) |
Jul
(38) |
Aug
(48) |
Sep
(80) |
Oct
(70) |
Nov
(75) |
Dec
(77) |
2011 |
Jan
(68) |
Feb
(53) |
Mar
(51) |
Apr
(35) |
May
(65) |
Jun
(101) |
Jul
(29) |
Aug
(230) |
Sep
(95) |
Oct
(49) |
Nov
(110) |
Dec
(63) |
2012 |
Jan
(41) |
Feb
(42) |
Mar
(25) |
Apr
(46) |
May
(51) |
Jun
(44) |
Jul
(45) |
Aug
(29) |
Sep
(12) |
Oct
(9) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(12) |
Feb
(14) |
Mar
(7) |
Apr
(16) |
May
(54) |
Jun
(27) |
Jul
(11) |
Aug
(5) |
Sep
(85) |
Oct
(27) |
Nov
(37) |
Dec
(32) |
2014 |
Jan
(8) |
Feb
(29) |
Mar
(5) |
Apr
(3) |
May
(22) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <jen...@us...> - 2009-02-25 16:52:51
|
Revision: 1633 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1633&view=rev Author: jenslehmann Date: 2009-02-25 16:52:45 +0000 (Wed, 25 Feb 2009) Log Message: ----------- small changes Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-25 16:32:26 UTC (rev 1632) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-25 16:52:45 UTC (rev 1633) @@ -197,7 +197,7 @@ @Override public EvaluatedDescription getCurrentlyBestEvaluatedDescription() { - return bestEvaluatedDescriptions.getSet().last(); + return bestEvaluatedDescriptions.getBest(); } @Override Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-25 16:32:26 UTC (rev 1632) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-25 16:52:45 UTC (rev 1633) @@ -102,7 +102,7 @@ public List<Description> toDescriptionList() { List<Description> list = new LinkedList<Description>(); - for(EvaluatedDescription ed : set) { + for(EvaluatedDescription ed : set.descendingSet()) { list.add(ed.getDescription()); } return list; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-25 16:32:31
|
Revision: 1632 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1632&view=rev Author: jenslehmann Date: 2009-02-25 16:32:26 +0000 (Wed, 25 Feb 2009) Log Message: ----------- GUI bug fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java Modified: trunk/src/dl-learner/org/dllearner/gui/RunPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2009-02-25 16:26:08 UTC (rev 1631) +++ trunk/src/dl-learner/org/dllearner/gui/RunPanel.java 2009-02-25 16:32:26 UTC (rev 1632) @@ -46,9 +46,12 @@ import java.util.List; import java.util.Map; -import javax.swing.*; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.algorithms.refinement2.ROLComponent2; import org.dllearner.core.EvaluatedDescription; import org.dllearner.learningproblems.PosNegLPStandard; @@ -383,7 +386,7 @@ Map<String,String> prefixes = config.getReasoner().getPrefixes(); String string = ""; for (EvaluatedDescription d : solutions) { - string += "accuracy: " + (df.format(((EvaluatedDescriptionPosNeg)d).getAccuracy()*100)) + "%: \t" + string += "accuracy: " + (df.format(d.getAccuracy()*100)) + "%: \t" + d.getDescription().toManchesterSyntaxString(baseURI, prefixes) + "\n"; } return string; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-25 16:26:19
|
Revision: 1631 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1631&view=rev Author: jenslehmann Date: 2009-02-25 16:26:08 +0000 (Wed, 25 Feb 2009) Log Message: ----------- - wrote a method which detects whether a description can be transformed to another one by removing parts of it - CELOE is guaranteed not to return descriptions with the same accuracy where one can be transformed to the other - CELOE does not extend correct nodes further than description length Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java trunk/src/dl-learner/org/dllearner/core/owl/ClassHierarchy.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/utilities/owl/ConceptTransformation.java trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -21,6 +21,7 @@ import java.text.DecimalFormat; import java.util.Collection; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -133,7 +134,8 @@ options.add(CommonConfigOptions.valueFreqencyThreshold()); options.add(CommonConfigOptions.useCardinalityRestrictions()); options.add(CommonConfigOptions.cardinalityLimit()); - options.add(CommonConfigOptions.useNegation()); + // by default, we do not use negation (should be configurable in GUI) + options.add(CommonConfigOptions.useNegation(false)); options.add(CommonConfigOptions.useBooleanDatatypes()); options.add(CommonConfigOptions.useDoubleDatatypes()); options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10)); @@ -227,7 +229,7 @@ // highest accuracy so far double highestAccuracy = 0.0; - OENode bestNode; + OENode nextNode; addNode(startClass, null); @@ -242,12 +244,12 @@ } // chose best node according to heuristics - bestNode = nodes.last(); - int horizExp = bestNode.getHorizontalExpansion(); + nextNode = getNextNodeToExpand(); + int horizExp = nextNode.getHorizontalExpansion(); // apply operator Monitor mon = MonitorFactory.start("refineNode"); - TreeSet<Description> refinements = refineNode(bestNode); + TreeSet<Description> refinements = refineNode(nextNode); mon.stop(); while(refinements.size() != 0) { @@ -260,7 +262,7 @@ if(length > horizExp && refinement.getDepth() <= maxDepth) { Monitor mon2 = MonitorFactory.start("addNode"); - boolean added = addNode(refinement, bestNode); + boolean added = addNode(refinement, nextNode); mon2.stop(); // if refinements have the same length, we apply the operator again @@ -293,6 +295,23 @@ isRunning = false; } + 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 + // (rationale: further extension is likely to add irrelevant syntactical constructs) + Iterator<OENode> it = nodes.descendingIterator(); + while(it.hasNext()) { + OENode node = it.next(); + if(node.getAccuracy() < 1.0 || node.getHorizontalExpansion() < node.getDescription().getLength()) { + return node; + } + } + + // this should practically never be called, since for any reasonable learning + // task, we will always have at least one node with less than 100% accuracy + return nodes.last(); + } + // 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 @@ -356,7 +375,21 @@ if(isCandidate) { Description niceDescription = rewriteNode(node); - bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); + + // another test: none of the other suggested descriptions should be + // a subdescription of this one unless accuracy is different + boolean shorterDescriptionExists = false; + for(EvaluatedDescription ed : bestEvaluatedDescriptions.getSet()) { + if(ed.getAccuracy()==accuracy && ConceptTransformation.isSubdescription(niceDescription, ed.getDescription())) { + shorterDescriptionExists = true; + break; + } + } + + if(!shorterDescriptionExists) { + bestEvaluatedDescriptions.add(niceDescription, accuracy, learningProblem); + } + } return true; @@ -379,8 +412,14 @@ } toTest.addAll(reasoner.getClassHierarchy().getSuperClasses(d)); } - return true; } + + // we do not want to have negations of sibling classes on the outermost level + // (they are expressed more naturally by saying that the siblings are disjoint, + // so it is reasonable not to include them in solutions) + Set<Description> siblingClasses = reasoner.getClassHierarchy().getSiblingClasses(classToDescribe); + + return true; } // determine whether a named class occurs on the outermost level, i.e. property depth 0 @@ -405,10 +444,29 @@ return false; } + private boolean occursNegatedOnFirstLevel(Description description, Description clazz) { + if(description instanceof NamedClass) { + if(description.equals(clazz)) { + 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 private Description rewriteNode(OENode node) { Description description = node.getDescription(); -// 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 @@ -423,7 +481,6 @@ private void reset() { // set all values back to their default values (used for running // the algorithm more than once) -// candidates.clear(); nodes = new TreeSet<OENode>(new OEHeuristicRuntime()); descriptions = new TreeSet<Description>(new ConceptComparator()); bestEvaluatedDescriptions.getSet().clear(); @@ -456,15 +513,11 @@ } private String getSolutionString() { -// 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; -// } } return str; } Modified: trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/core/configurators/RefinementOperatorConfigurator.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -23,10 +23,35 @@ * Common options of refinement operators (manually created interface). * * @author Jens Lehmann - * + * */ public abstract class RefinementOperatorConfigurator { public abstract boolean getUseCardinalityRestrictions(); + + public abstract boolean getUseNegation(); + + public abstract boolean getUseAllConstructor(); + + public abstract boolean getUseExistsConstructor(); + + public abstract boolean getUseBooleanDatatypes(); + // below are optional parameters (neutral return values choosen) + + public boolean getUseHasValueConstructor() { + return false; + } + + public int getValueFrequencyThreshold() { + return 3; + } + + public int getCardinalityLimit() { + return 5; + } + + public boolean getUseDoubleDatatypes() { + return false; + } } Modified: trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/core/options/CommonConfigOptions.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -147,6 +147,10 @@ return new BooleanConfigOption("useNegation", "specifies whether negation is used in the learning algorothm",useNegationDefault); } + public static BooleanConfigOption useNegation(boolean defaultValue) { + return new BooleanConfigOption("useNegation", "specifies whether negation is used in the learning algorothm",defaultValue); + } + public static BooleanConfigOption useBooleanDatatypes() { return new BooleanConfigOption("useBooleanDatatypes", "specifies whether boolean datatypes are used in the learning algorothm",useBooleanDatatypesDefault); } Modified: trunk/src/dl-learner/org/dllearner/core/owl/ClassHierarchy.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/ClassHierarchy.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/core/owl/ClassHierarchy.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -89,6 +89,25 @@ } /** + * Computes the siblings of the specified descriptions. Siblings are all those + * classes, which are subclasses of a parent of a class and not equal to the + * class itself. Note that retrieving siblings is computationally more + * expensive than descending/ascending the hierarchy as siblings are computed + * when required and not cached. + * @param description A named class. + * @return A set of named classes, which are siblings of the given class. + */ + public SortedSet<Description> getSiblingClasses(Description description) { + Set<Description> superClasses = subsumptionHierarchyUp.get(description); + TreeSet<Description> siblingClasses = new TreeSet<Description>(conceptComparator); + for(Description superClass : superClasses) { + siblingClasses.addAll(subsumptionHierarchyDown.get(superClass)); + } + siblingClasses.remove(description); + return siblingClasses; + } + + /** * This method modifies the subsumption hierarchy such that for each class, * there is only a single path to reach it via upward and downward * refinement respectively. Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -857,7 +857,7 @@ // Negation neg = new Negation(subConcept); // Intersection c = new Intersection(neg,superConcept); // return fastRetrieval.calculateSets(c).getPosSet().isEmpty(); - return rc.isSuperClassOf(superConcept, subConcept); + return rc.isSuperClassOfImpl(superConcept, subConcept); } /** Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -191,8 +191,15 @@ this.rs = reasoner; this.subHierarchy = subHierarchy; this.startClass = startClass; + useAllConstructor = configurator.getUseAllConstructor(); + useExistsConstructor = configurator.getUseExistsConstructor(); + useHasValueConstructor = configurator.getUseHasValueConstructor(); + frequencyThreshold = configurator.getValueFrequencyThreshold(); useCardinalityRestrictions = configurator.getUseCardinalityRestrictions(); - // TODO add more options from configurator object + cardinalityLimit = configurator.getCardinalityLimit(); + useNegation = configurator.getUseNegation(); + useBooleanDatatypes = configurator.getUseBooleanDatatypes(); + useDoubleDatatypes = configurator.getUseDoubleDatatypes(); init(); } Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/ConceptTransformation.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -59,6 +59,8 @@ public static long shorteningTimeNs = 0; private static long shorteningTimeNsStart = 0; + private static ConceptComparator descComp = new ConceptComparator(); + public static void cleanConceptNonRecursive(Description concept) { // cleaningTimeNsStart = System.nanoTime(); @@ -487,4 +489,85 @@ } } + /** + * Tests whether a description is a subdescription in the sense that when + * parts of <code>description</code> can be removed to yield <code>subdescription</code>. + * + * @param description A description. + * @param subDescription A potential subdescription. + * @return True if <code>subdescription</code> is indeed a sub description and false + * otherwise. + */ + public static boolean isSubdescription(Description description, Description subDescription) { +// if(description instanceof Thing) { +// return (subDescription instanceof Thing); +// } else if(description instanceof Nothing) { +// return (subDescription instanceof Thing); +// } else if(description instanceof NamedClass) { +// return ((subDescription instanceof NamedClass) && (((NamedClass)description).getName().equals(((NamedClass)subDescription).getName()))); +// } + + List<Description> children = description.getChildren(); + List<Description> subChildren = subDescription.getChildren(); + + // no children: both have to be equal + if(children.size()==0) { + return (descComp.compare(description, subDescription)==0); + // one child: both have to be of the same class, type, and the first + // child has to be sub description of the other child + } else if(children.size()==1) { + return (subChildren.size() == 1) && description.getClass().equals(subDescription.getClass()) && isSubdescription(children.get(0), subChildren.get(0)); + // intersection or union + } else { + // test whether subdescription corresponds to an element of the + // intersection/union + if(subChildren.size()<2) { + for(Description child : children) { + if(isSubdescription(child, subDescription)) { + return true; + } + } + return false; + } + + // make sure that both are of the same type and subdescription actually has fewer children + if(!description.getClass().equals(subDescription.getClass()) || subChildren.size() > children.size()) { + return false; + } + + // comparing everything is quadratic; the faster linear variant (below) + // using + + for(Description subChild : subChildren) { + boolean foundMatch = false; + for(Description child : children) { + if(isSubdescription(child, subChild)) { + foundMatch = true; + break; + } + } + if(!foundMatch) { + return false; + } + } + + return true; + +// // method core; traverse the descriptions in linear time using ordered +// // normal form (TODO: does not always work e.g. A2 \sqcap (A1 \sqcup A3) + // and A1 \sqcap A2 -> it won't find the A2 match because it has advanced + // beyond it already) +// int j = 0; +// for(Description child : children) { +// if(isSubdescription(child, subChildren.get(j))) { +// j++; +// } +// if(j == subChildren.size()) { +// return true; +// } +// } +// // there is at least one child we could not match +// return false; + } + } } Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java 2009-02-25 13:17:50 UTC (rev 1630) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java 2009-02-25 16:26:08 UTC (rev 1631) @@ -32,6 +32,7 @@ import org.dllearner.core.owl.ObjectAllRestriction; import org.dllearner.core.owl.ObjectMaxCardinalityRestriction; import org.dllearner.core.owl.ObjectMinCardinalityRestriction; +import org.dllearner.core.owl.ObjectProperty; import org.dllearner.core.owl.ObjectSomeRestriction; import org.dllearner.core.owl.Thing; import org.dllearner.core.owl.Union; @@ -51,6 +52,8 @@ private ConceptComparator conceptComparator = new ConceptComparator(); private Map<Description,Map<Description,Boolean>> cachedSubclassOf = new TreeMap<Description,Map<Description,Boolean>>(conceptComparator); + private boolean beautify = false; + public DescriptionMinimizer(ReasonerComponent reasoner) { this.reasoner = reasoner; } @@ -104,6 +107,12 @@ if(description.getChild(0) instanceof Thing) { return Thing.instance; } + // we rewrite \forall r.\bot to \neg \exists r.\top + // which is longer but easier to understand for humans + if(beautify && description.getChild(0) instanceof Nothing) { + ObjectProperty p = (ObjectProperty)((ObjectAllRestriction)description).getRole(); + return new Negation(new ObjectSomeRestriction(p, Thing.instance)); + } return description; } else if(description instanceof Negation) { // \neg \bot \equiv \top This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-25 13:17:54
|
Revision: 1630 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1630&view=rev Author: heeroyuy Date: 2009-02-25 13:17:50 +0000 (Wed, 25 Feb 2009) Log Message: ----------- -removed error Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-25 13:03:17 UTC (rev 1629) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-25 13:17:50 UTC (rev 1630) @@ -27,6 +27,7 @@ import org.protege.editor.owl.ui.frame.OWLDisjointClassesAxiomFrameSection; import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSection; import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; +import org.protege.editor.owl.ui.frame.OWLSubClassAxiomFrameSection; import org.semanticweb.owl.model.OWLClass; import org.semanticweb.owl.model.OWLDescription; @@ -58,6 +59,7 @@ //equi.getEditor().getEditorComponent().validate(); sub = new OWLSubClassAxiomFrameSection(editorKit, this); OWLFrameSectionRowObjectEditor<OWLDescription> editor = sub.getObjectEditor(); + System.out.println("test"); OWLClassDescriptionEditor edi = (OWLClassDescriptionEditor)editor; edi.addPanel(view); // own OWLEquivalentClassesAxiomFrameSection to add the dllearner plugin This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-25 13:03:23
|
Revision: 1629 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1629&view=rev Author: heeroyuy Date: 2009-02-25 13:03:17 +0000 (Wed, 25 Feb 2009) Log Message: ----------- -first try to integrate the plugin into protege -removed checkstyle warnings -javadoc Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.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/IndividualObject.java trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/OptionPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanelHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestListCellRenderer.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestListItem.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -54,25 +54,24 @@ MouseListener, ListSelectionListener, ListDataListener { // This is the DLLearnerModel. - - //private static Logger logger = Logger.getLogger(ActionHandler.class); - private DLLearnerModel model; + private final DLLearnerModel model; // This is the id that checks if the equivalent class or subclass button is // pressed in protege - private String id; + private final String id; // this is a boolean that checked if the advanced button was pressed or not. private boolean toggled; // This is the Tread of the DL-Learner private EvaluatedDescription evaluatedDescription; // This is the view of the DL-Learner tab. - private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; + //private final OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; private Timer timer; private LearningAlgorithm la; private SuggestionRetriever retriever; private final Color colorRed = new Color(139, 0, 0); private final Color colorGreen = new Color(0, 139, 0); + private final DLLearnerView view; /** * This is the constructor for the action handler. * @@ -87,6 +86,14 @@ * */ public ActionHandler(ActionHandler a, DLLearnerModel m, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view, String i) { + this.view = null; + this.id = i; + this.model = m; + toggled = false; + + } + + public ActionHandler(ActionHandler a, DLLearnerModel m, DLLearnerView view, String i) { this.view = view; this.id = i; this.model = m; @@ -295,7 +302,7 @@ SwingWorker<List<? extends EvaluatedDescription>, List<? extends EvaluatedDescription>> { private Thread dlLearner; - private DefaultListModel dm = new DefaultListModel(); + private final DefaultListModel dm = new DefaultListModel(); @SuppressWarnings("unchecked") @Override @@ -382,12 +389,10 @@ if(eval.getDescription().toString().contains(ontology)) { //dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); if(model.isConsistent(eval)) { - dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); - i++; + dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass) eval).getAccuracy()*100)); break; } else { - dm.add(i, new SuggestListItem(colorRed, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); - i++; + dm.add(i, new SuggestListItem(colorRed, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass) eval).getAccuracy()*100)); view.setIsInconsistent(true); break; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -20,13 +20,15 @@ package org.dllearner.tools.protege; import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.editor.OWLClassDescriptionEditor; import org.protege.editor.owl.ui.frame.AbstractOWLFrame; import org.protege.editor.owl.ui.frame.InheritedAnonymousClassesFrameSection; import org.protege.editor.owl.ui.frame.OWLClassAssertionAxiomIndividualSection; import org.protege.editor.owl.ui.frame.OWLDisjointClassesAxiomFrameSection; -//import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSection; -//import org.protege.editor.owl.ui.frame.OWLSubClassAxiomFrameSection; +import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSection; +import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; import org.semanticweb.owl.model.OWLClass; +import org.semanticweb.owl.model.OWLDescription; /** * This class manages the list of the lists for equivalent classes and so on. @@ -37,9 +39,9 @@ * */ public class ButtonList extends AbstractOWLFrame<OWLClass> { - private OWLEquivalentClassesAxiomFrameSection equi; - private OWLSubClassAxiomFrameSection sub; - //private DLLearnerView view; + private final OWLEquivalentClassesAxiomFrameSection equi; + private final OWLSubClassAxiomFrameSection sub; + private final DLLearnerView view; /** * Constructor of the Buttonlist. * @@ -49,12 +51,15 @@ super(editorKit.getModelManager().getOWLOntologyManager()); equi = new OWLEquivalentClassesAxiomFrameSection(editorKit, this); - //view = new DLLearnerView(equi.getName(), editorKit); - //OWLFrameSectionRowObjectEditor<OWLDescription> edit = equi.getObjectEditor(); - //OWLClassDescriptionEditor ed = (OWLClassDescriptionEditor)edit; - //ed.addPanel(view); + view = new DLLearnerView(equi.getName(), editorKit); + OWLFrameSectionRowObjectEditor<OWLDescription> edit = equi.getObjectEditor(); + OWLClassDescriptionEditor ed = (OWLClassDescriptionEditor)edit; + ed.addPanel(view); //equi.getEditor().getEditorComponent().validate(); sub = new OWLSubClassAxiomFrameSection(editorKit, this); + OWLFrameSectionRowObjectEditor<OWLDescription> editor = sub.getObjectEditor(); + OWLClassDescriptionEditor edi = (OWLClassDescriptionEditor)editor; + edi.addPanel(view); // own OWLEquivalentClassesAxiomFrameSection to add the dllearner plugin // to the // OWLClassDescritpionEditor Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -66,7 +66,7 @@ // The Sting is for components that are available in the DL-Learner - private String[] componenten = { "org.dllearner.kb.OWLFile", + private final String[] componenten = { "org.dllearner.kb.OWLFile", "org.dllearner.reasoning.OWLAPIReasoner", "org.dllearner.reasoning.FastInstanceChecker", "org.dllearner.reasoning.FastRetrievalReasoner", @@ -78,7 +78,7 @@ // Component Manager that manages the components of the DL-Learner - private ComponentManager cm; + private final ComponentManager cm; private static final String EQUIVALENT_CLASS_AXIOM_STRING = "Suggest equivalent class"; private static final String SUPER_CLASS_AXIOM_STRING = "Suggest super class"; @@ -87,7 +87,7 @@ // The View of the DL-Learner Plugin - private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; + //private final OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; // The Learning problem that is used to learn new concepts @@ -103,7 +103,7 @@ // Necessary to get the currently loaded Ontology - private OWLEditorKit editor; + private final OWLEditorKit editor; // The Reasoner which is used to learn @@ -111,7 +111,7 @@ // A Set of Descriptions in OWL Syntax which the DL-Learner suggested - private Set<OWLDescription> owlDescription; + private final Set<OWLDescription> owlDescription; // The most fitting Description in OWL Syntax which the DL-Learner suggested @@ -119,7 +119,7 @@ // String to distinguish between Equivalent classes and sub classes - private String id; + private final String id; // The new Concept which is learned by the DL-Learner @@ -131,11 +131,11 @@ // A Set of Descriptions in OWL Syntax which the DL-Learner suggested - private Set<OWLDescription> ds; + private final Set<OWLDescription> ds; // The model for the suggested Descriptions - private DefaultListModel suggestModel; + private final DefaultListModel suggestModel; // The Individuals of the Ontology @@ -154,12 +154,13 @@ private DefaultListModel posListModel; private DefaultListModel negListModel; - private Set<KnowledgeSource> sources; + private final Set<KnowledgeSource> sources; private boolean hasIndividuals; private NamedClass currentConcept; private Vector<IndividualObject> individualVector; private Set<String> ontologieURI; - private boolean ontologyConsistent; + private final boolean ontologyConsistent; + private final DLLearnerView view; // This is a List of evaluated descriptions to get more information of the // suggested concept @@ -170,8 +171,6 @@ * * @param editorKit * Editor Kit to get the currently loaded Ontology - * @param h - * OWLFrame(OWLClass) to get the base uri of the Ontology * @param id * String if it learns a subclass or a superclass. * @param view @@ -180,6 +179,24 @@ public DLLearnerModel(OWLEditorKit editorKit, String id, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view) { editor = editorKit; this.id = id; + this.view = null; + ontologyConsistent = true; + instancesCount = 0; + owlDescription = new HashSet<OWLDescription>(); + posListModel = new DefaultListModel(); + negListModel = new DefaultListModel(); + ComponentManager.setComponentClasses(componenten); + individualVector = new Vector<IndividualObject>(); + cm = ComponentManager.getInstance(); + ds = new HashSet<OWLDescription>(); + suggestModel = new DefaultListModel(); + ontologieURI = new HashSet<String>(); + sources = new HashSet<KnowledgeSource>(); + } + + public DLLearnerModel(OWLEditorKit editorKit, String id, DLLearnerView view) { + editor = editorKit; + this.id = id; this.view = view; ontologyConsistent = true; instancesCount = 0; @@ -266,6 +283,10 @@ // rs = cm.reasoningService(reasoner); } + /** + * This method returns the fast instance checker reasoner. + * @return fast instance checker reasoner + */ public FastInstanceChecker getReasoner() { return reasoner; } @@ -326,15 +347,6 @@ } alreadyLearned = true; } - - /** - * This method returns the Concepts from the DL-Learner. - * - * @return Array of learned Concepts. - - public Description[] getSolutions() { - return description; - }*/ /** * Starts the learning algorithm. @@ -361,9 +373,10 @@ return individualVector; } + /** * This method sets the positive examples for learning. - * @param ind + * @param ind Set of Individuals */ public void setIndividuals(Set<Individual> ind) { individual = ind; @@ -372,7 +385,7 @@ /** * This method sets the uri sting for the currently used * for learning. - * @param uri + * @param uri Set of uris */ public void setOntologyURIString(Set<String> uri) { this.ontologieURI = uri; @@ -388,7 +401,7 @@ /** * Sets if the ontology has individuals. - * @param has + * @param has boolean if concept has Individuals */ public void setHasIndividuals(boolean has) { this.hasIndividuals = has; @@ -406,17 +419,6 @@ } /** - * This method gets an array of concepts from the DL-Learner and stores it - * in the description array. - * - * @param list - * Array of concepts from DL-Learner - - public void setDescriptionList(Description[] list) { - description = list; - }*/ - - /** * This method returns the PosListModel. * * @return DefaultListModel posListModel @@ -445,16 +447,6 @@ } /** - * This method resets the array of concepts from the DL_Learner. It is - * called after the DL-Learner tab is closed. - - public void resetSuggestionList() { - for (int i = 0; i < description.length; i++) { - description[i] = null; - } - }*/ - - /** * This method resets the model for the suggest panel. It is called befor * the DL-Learner learns the second time or when the DL-Learner tab is * closed. @@ -498,9 +490,15 @@ return oldConceptOWLAPI; } + /** + * This method returns a set of OWL descriptions that should + * be added to the OWL file. + * @return Set of OWL descriptions + */ public Set<OWLDescription> getDescriptions() { return ds; } + /** * This method returns the currently learned description in OWLDescription * format. @@ -589,7 +587,7 @@ */ public boolean isConsistent(EvaluatedDescription eDescription) { boolean isConsistent = false; - if (((EvaluatedDescriptionClass)eDescription).getCoveredInstances().size() < instancesCount) { + if (((EvaluatedDescriptionClass) eDescription).getCoveredInstances().size() < instancesCount) { isConsistent = false; } else { isConsistent = true; @@ -659,7 +657,7 @@ /** * Sets the positive examples. - * @param list + * @param list list of positive Expamles */ public void setPosListModel(DefaultListModel list) { this.posListModel = list; @@ -667,7 +665,7 @@ /** * Sets the negative examples. - * @param list + * @param list list of negative examples */ public void setNegListModel(DefaultListModel list) { this.negListModel = list; @@ -675,7 +673,7 @@ /** * Sets the individual vector. - * @param indi + * @param indi Vector of Individuals */ public void setIndividualVector(Vector<IndividualObject> indi) { this.individualVector = indi; @@ -683,19 +681,25 @@ /** * This sets the current concept. - * @param current + * @param current currently selected class */ public void setCurrentConcept(NamedClass current) { this.currentConcept = current; } /** + * This method returns a set of individuals belonging to the + * currently selected class. * @return the individual */ public Set<Individual> getIndividual() { return individual; } + /** + * This method sets the number of instances. + * @param i number of instances + */ public void setInstancesCount(int i) { instancesCount = i; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,3 +1,22 @@ +/** + * 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.tools.protege; import java.awt.BorderLayout; @@ -19,7 +38,13 @@ import org.protege.editor.owl.OWLEditorKit; import org.protege.editor.owl.ui.editor.OWLDescriptionEditor; import org.semanticweb.owl.model.OWLDescription; - +/** + * This class is responsible for the view of the dllearner. It renders the + * output for the user and is the graphical component of the plugin. + * + * @author Christian Koetteritzsch + * + */ public class DLLearnerView extends JPanel implements OWLDescriptionEditor{ @@ -27,19 +52,19 @@ //private OWLClassDescriptionEditorWithDLLearnerTab mainWindow; // this is the Component which shows the view of the dllearner private static final String TITLE = "DL-Learner"; - private JComponent learner; + private final JComponent learner; // Accept button to add the learned concept to the owl - private JButton accept; + private final JButton accept; // Runbutton to start the learning algorithm - private JButton run; + private final JButton run; // This is the label for the advanced button. - private JLabel adv; + private final JLabel adv; // This is the color for the error message. It is red. @@ -47,19 +72,19 @@ // This is the text area for the error message when an error occurred - private JTextArea errorMessage; + private final JTextArea errorMessage; // Advanced Button to activate/deactivate the example select panel - private JToggleButton advanced; + private final JToggleButton advanced; // Action Handler that manages the Button actions - private ActionHandler action; + private final ActionHandler action; // This is the model of the dllearner plugin which includes all data - private DLLearnerModel model; + private final DLLearnerModel model; // Panel for the suggested concepts @@ -67,48 +92,48 @@ // Selection panel for the positive and negative examples - private PosAndNegSelectPanel posPanel; + private final PosAndNegSelectPanel posPanel; // Picture for the advanced button when it is not toggled - private ImageIcon icon; + private final ImageIcon icon; // Picture of the advanced button when it is toggled - private JPanel addButtonPanel; - private JLabel wikiPane; - private ImageIcon toggledIcon; - private JTextArea hint; + private final JPanel addButtonPanel; + private final JLabel wikiPane; + private final ImageIcon toggledIcon; + private final JTextArea hint; private boolean isInconsistent; // This is the Panel for more details of the suggested concept private MoreDetailForSuggestedConceptsPanel detail; //private OWLFrame<OWLClass> frame; private ReadingOntologyThread readThread; - //private OWLEditorKit editorKit; + private final OWLEditorKit editorKit; /** * The constructor for the DL-Learner tab in the class description * editor. * - * @param current OWLFrame + * @param editor OWLEditorKit * @param label String - * @param dlLearner OWLClassDescriptionEditorWithDLLearnerTab */ public DLLearnerView(String label, OWLEditorKit editor) { //mainWindow = dlLearner; - //editorKit = editor; + editorKit = editor; wikiPane = new JLabel("<html>See <a href=\"http://dl-learner.org/wiki/ProtegePlugin\">http://dl-learner.org/wiki/ProtegePlugin</a> for an introduction.</html>"); URL iconUrl = this.getClass().getResource("arrow.gif"); icon = new ImageIcon(iconUrl); URL toggledIconUrl = this.getClass().getResource("arrow2.gif"); toggledIcon = new ImageIcon(toggledIconUrl); - //model = new DLLearnerModel(editorKit, label, this); + model = new DLLearnerModel(editorKit, label, this); sugPanel = new SuggestClassPanel(); - //action = new ActionHandler(this.action, model, this, label); + action = new ActionHandler(this.action, model, this, label); adv = new JLabel("Advanced Settings"); advanced = new JToggleButton(icon); advanced.setVisible(true); run = new JButton(label); accept = new JButton("ADD"); + System.out.println("blub"); addButtonPanel = new JPanel(new BorderLayout()); sugPanel.addSuggestPanelMouseListener(action); errorMessage = new JTextArea(); @@ -122,10 +147,11 @@ learner.setPreferredSize(new Dimension(600, 520)); accept.setPreferredSize(new Dimension(290, 50)); advanced.setName("Advanced"); - //posPanel = new PosAndNegSelectPanel(model, action, this); + posPanel = new PosAndNegSelectPanel(model, action); addAcceptButtonListener(this.action); addRunButtonListener(this.action); addAdvancedButtonListener(this.action); + this.makeView(); } @@ -145,13 +171,6 @@ } /** - * Returns the Mainwindow where the Plugin is integratet. - * @return OWLClassDescriptionWithDLLearnerTab MainWindow - */ - //public OWLClassDescriptionEditorWithDLLearnerTab getMainWindow() { - // return mainWindow; - //} - /** * This Method renders the view of the plugin. */ public void makeView() { @@ -159,7 +178,7 @@ model.clearVector(); hint.setText("To get suggestions for class descriptions, please click the button above."); isInconsistent = false; - //readThread = new ReadingOntologyThread(editorKit, this, model); + readThread = new ReadingOntologyThread(editorKit, null, this, model); readThread.start(); //TODO: runbutton wird auf enable gesetzt obwohl keine instanzdaten vorhanden sind. @@ -179,8 +198,6 @@ advanced.setBounds(10, 200, 20, 20); sugPanel.setVisible(true); posPanel.setVisible(false); - //posPanel.getAddToNegPanelButton().setEnabled(false); - //posPanel.getAddToPosPanelButton().setEnabled(false); posPanel.setBounds(10, 230, 490, 250); accept.setBounds(510, 40, 80, 110); hint.setBounds(10, 150, 490, 35); @@ -218,16 +235,14 @@ public void setHintMessage(String message) { hint.setText(message); } + + /** + * This method returns the hint panel. + * @return hint panel + */ public JTextArea getHintPanel() { return hint; } - /** - * This Method returns the DL_Learner tab. - * @return JComponent - */ - public JComponent getLearnerPanel() { - return learner; - } /** * Sets the panel to select/deselect the examples visible/invisible. @@ -238,28 +253,14 @@ } /** - * Returns nothing. - * @return null - */ - public JPanel getOptionPanel() { - return null; - } - - /** * Returns the AddButton. * @return JButton */ public JButton getAddButton() { return accept; } + /** - * This Method updates the the view of protege after - * adding a new concept. - */ - //public void updateWindow() { - // mainWindow.getHandler().handleEditingFinished(mainWindow.getEditedObjects()); - //} - /** * Returns all added descriptions. * @return Set(OWLDescription) */ @@ -327,8 +328,6 @@ run.removeActionListener(action); accept.removeActionListener(action); advanced.removeActionListener(action); - //posPanel.removeListeners(action); - //posPanel.removeHelpButtonListener(action); } /** @@ -374,7 +373,7 @@ @Override public JComponent getComponent() { - return this; + return learner; } @Override Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,3 +1,22 @@ +/** + * 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.tools.protege; import java.awt.Color; @@ -13,34 +32,46 @@ import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.owl.Individual; - +/** + * This class draws the graphical coverage of a learned concept. + * @author Christian Koetteritzsch + * + */ public class GraphicalCoveragePanel extends JPanel { private static final long serialVersionUID = 855436961912515267L; - private static final int height =250; - private static final int width = 250; - private static final int maxNumberOfIndividualPoints = 20; - private static final int gap = 20; + private static final int HEIGHT =250; + private static final int WIDTH = 250; + private static final int MAX_NUMBER_OF_INDIVIDUAL_POINTS = 20; + private static final int GAP = 20; private int shiftXAxis; private int distortionOld; - private Ellipse2D oldConcept; + private final Ellipse2D oldConcept; private Ellipse2D newConcept; - private EvaluatedDescription eval; - private DLLearnerModel model; - private String conceptNew; - private Vector<IndividualPoint> posCovIndVector; - private Vector<IndividualPoint> posNotCovIndVector; - private Vector<IndividualPoint> points; - private GraphicalCoveragePanelHandler handler; + private final EvaluatedDescription eval; + private final DLLearnerModel model; + private final String conceptNew; + private final Vector<IndividualPoint> posCovIndVector; + private final Vector<IndividualPoint> posNotCovIndVector; + private final Vector<IndividualPoint> points; + private final GraphicalCoveragePanelHandler handler; private int adjustment; - private MoreDetailForSuggestedConceptsPanel panel; + private final MoreDetailForSuggestedConceptsPanel panel; /** + * * This is the constructor for the GraphicalCoveragePanel. + * + * @param desc EvaluatedDescription + * @param m DLLearnerModel + * @param concept String + * @param w width + * @param h height + * @param p MoreDetailForSuggestedConceptsPanel */ public GraphicalCoveragePanel(EvaluatedDescription desc, DLLearnerModel m, String concept, int w, int h, MoreDetailForSuggestedConceptsPanel p) { - setPreferredSize(new Dimension(width, height)); + setPreferredSize(new Dimension(WIDTH, HEIGHT)); setVisible(true); setForeground(Color.GREEN); repaint(); @@ -53,30 +84,23 @@ points = new Vector<IndividualPoint>(); this.computeGraphics(); handler = new GraphicalCoveragePanelHandler(this); - oldConcept = new Ellipse2D.Float(5, 25+adjustment, width-distortionOld, height-distortionOld); - newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width, height); + oldConcept = new Ellipse2D.Float(5, 25+adjustment, WIDTH-distortionOld, HEIGHT-distortionOld); + newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, WIDTH, HEIGHT); this.computeIndividualPoints(); this.addMouseMotionListener(handler); this.addPropertyChangeListener(handler); } - - public void drawCoverageForLearnedClassDescription( - Set<Individual> posCovInd, Set<Individual> posNotCovInd, - Set<Individual> negCovInd) { - - - } @Override protected void paintComponent(Graphics g) { Graphics2D g2D; g2D = (Graphics2D) g; g2D.setColor(Color.GREEN); - g2D.draw (oldConcept); + g2D.draw(oldConcept); g2D.drawString(model.getOldConceptOWLAPI().toString(), 10, 15); g2D.setColor(Color.RED); - g2D.draw (newConcept); - g2D.drawString(conceptNew, 10 + width, 15); + g2D.draw(newConcept); + g2D.drawString(conceptNew, 10 + WIDTH, 15); @@ -93,15 +117,15 @@ } private void computeGraphics(){ - int add = ((EvaluatedDescriptionClass)eval).getAdditionalInstances().size(); + int add = ((EvaluatedDescriptionClass) eval).getAdditionalInstances().size(); distortionOld = 0; adjustment = 0; - double additional = ((EvaluatedDescriptionClass)eval).getAddition(); - double coverage = ((EvaluatedDescriptionClass)eval).getCoverage(); - shiftXAxis = (int) Math.round(width* (1-coverage)); + double additional = ((EvaluatedDescriptionClass) eval).getAddition(); + double coverage = ((EvaluatedDescriptionClass) eval).getCoverage(); + shiftXAxis = (int) Math.round(WIDTH* (1-coverage)); if(add != 0) { - distortionOld = (int) Math.round(width*additional); - newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width, height); + distortionOld = (int) Math.round(WIDTH*additional); + newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, WIDTH, HEIGHT); adjustment = (int) Math.round(newConcept.getCenterY()/4); } @@ -109,7 +133,7 @@ } private void computeIndividualPoints() { - Set<Individual> posInd = ((EvaluatedDescriptionClass)eval).getCoveredInstances(); + Set<Individual> posInd = ((EvaluatedDescriptionClass) eval).getCoveredInstances(); int i = 0; double x = 20; @@ -117,11 +141,11 @@ boolean flag = true; for(Individual ind : posInd) { flag = true; - if(i<maxNumberOfIndividualPoints) { + if(i<MAX_NUMBER_OF_INDIVIDUAL_POINTS) { while(flag) { if(x >= oldConcept.getMaxX()) { x = (int) oldConcept.getMinX(); - y = y + gap; + y = y + GAP; } if(y >= oldConcept.getMaxY()) { @@ -130,7 +154,7 @@ if(x >= newConcept.getMaxX()) { x = (int) newConcept.getMinX(); - y = y + gap; + y = y + GAP; } if(y >= newConcept.getMaxY()) { @@ -140,30 +164,30 @@ while(x < newConcept.getMaxX()) { if(newConcept.contains(x, y) && oldConcept.contains(x, y)) { - posCovIndVector.add(new IndividualPoint("+",(int)x,(int)y,ind.toString())); + posCovIndVector.add(new IndividualPoint("+", (int) x, (int) y, ind.toString())); i++; flag = false; - x = x + gap; + x = x + GAP; break; } else { - x = x + gap; + x = x + GAP; } } } } } - Set<Individual> posNotCovInd = ((EvaluatedDescriptionClass)eval).getAdditionalInstances(); + Set<Individual> posNotCovInd = ((EvaluatedDescriptionClass) eval).getAdditionalInstances(); int j = 0; x = 20; y = 20; for(Individual ind : posNotCovInd) { flag = true; - if(j<maxNumberOfIndividualPoints) { + if(j<MAX_NUMBER_OF_INDIVIDUAL_POINTS) { while(flag) { if(x >= newConcept.getMaxX()) { x = (int) oldConcept.getMinX(); - y = y + gap; + y = y + GAP; } if(y >= newConcept.getMaxY()) { @@ -173,13 +197,13 @@ while(x < newConcept.getMaxX()) { if(!oldConcept.contains(x, y) && newConcept.contains(x, y)) { - posNotCovIndVector.add(new IndividualPoint("-",(int)x,(int)y,ind.toString())); + posNotCovIndVector.add(new IndividualPoint("-", (int) x, (int) y, ind.toString())); j++; flag = false; - x = x + gap; + x = x + GAP; break; } else { - x = x + gap; + x = x + GAP; } } } @@ -193,11 +217,11 @@ y = 20; for(Individual ind : notCovInd) { flag = true; - if(k<maxNumberOfIndividualPoints) { + if(k < MAX_NUMBER_OF_INDIVIDUAL_POINTS) { while(flag) { if(x >= oldConcept.getMaxX()) { x = (int) oldConcept.getMinX(); - y = y + gap; + y = y + GAP; } if(y >= oldConcept.getMaxY()) { @@ -207,13 +231,13 @@ while(x < oldConcept.getMaxX()) { if(oldConcept.contains(x, y) && !newConcept.contains(x, y)) { - posNotCovIndVector.add(new IndividualPoint("-",(int)x,(int)y,ind.toString())); + posNotCovIndVector.add(new IndividualPoint("-", (int) x, (int) y, ind.toString())); k++; flag = false; - x = x + gap; + x = x + GAP; break; } else { - x = x + gap; + x = x + GAP; } } } @@ -223,14 +247,27 @@ points.addAll(posNotCovIndVector); } + /** + * This method returns a Vector of all individuals that are drawn + * in the panel. + * @return Vector of Individuals + */ public Vector<IndividualPoint> getIndividualVector() { return points; } + /** + * This method returns the GraphicalCoveragePanel. + * @return GraphicalCoveragePanel + */ public GraphicalCoveragePanel getGraphicalCoveragePanel() { return this; } + /** + * This method returns the MoreDetailForSuggestedConceptsPanel. + * @return MoreDetailForSuggestedConceptsPanel + */ public MoreDetailForSuggestedConceptsPanel getMoreDetailForSuggestedConceptsPanel() { return panel; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,3 +1,22 @@ +/** + * 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.tools.protege; import java.awt.event.MouseEvent; @@ -7,11 +26,19 @@ import java.util.Vector; - +/** + * This class takes care of all events happening in the GraphicalCoveragePanel. + * @author Christian Koetteritzsch + * + */ public class GraphicalCoveragePanelHandler implements MouseMotionListener, PropertyChangeListener { - private GraphicalCoveragePanel panel; + private final GraphicalCoveragePanel panel; + /** + * This is the constructor for the handler. + * @param p GraphicalCoveragePanel + */ public GraphicalCoveragePanelHandler(GraphicalCoveragePanel p) { this.panel = p; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/IndividualObject.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/IndividualObject.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/IndividualObject.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -25,7 +25,7 @@ */ public class IndividualObject { - private String normalIndividual; + private final String normalIndividual; private boolean isPos; /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,12 +1,44 @@ +/** + * 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.tools.protege; +/** + * This class is a datastructure for one individual shown in + * the GraphicalCoveragePanel. + * @author Christian Koetteritzsch + * + */ public class IndividualPoint { private String point; private int xAxis; private int yAxis; - private String individual; + private final String individual; + /** + * Constructor of the class. + * @param p display String + * @param x coordinate on the x axis + * @param y coordinate on the y axis + * @param ind Name of the Individual + */ public IndividualPoint(String p, int x, int y, String ind) { this.point = p; this.xAxis = x; @@ -15,6 +47,7 @@ } /** + * This method sets the display string of the individual. * @param point the point to set */ public void setPoint(String point) { @@ -22,6 +55,7 @@ } /** + * This method returns the display string of the individual. * @return the point */ public String getPoint() { @@ -29,6 +63,7 @@ } /** + * This method sets the x axis coordinate. * @param xAxis the xAxis to set */ public void setXAxis(int xAxis) { @@ -36,6 +71,7 @@ } /** + * This method returns the x axis coordinate. * @return the xAxis */ public int getXAxis() { @@ -43,6 +79,7 @@ } /** + * This method sets the y axis coordinate. * @param yAxis the yAxis to set */ public void setYAxis(int yAxis) { @@ -50,12 +87,17 @@ } /** + * This method returns the y axis coordinate. * @return the yAxis */ public int getYAxis() { return yAxis; } + /** + * This method returns the name of the Individual. + * @return name of the Individual + */ public String getIndividualName() { return individual; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -50,7 +50,7 @@ // Model of the dllearner - private DLLearnerModel model; + private final DLLearnerModel model; // Textarea to render the accuracy of the concept @@ -115,12 +115,12 @@ private JTextArea conceptText; private final Color colorRed = new Color(139, 0, 0); private final Color colorGreen = new Color(0, 139, 0); - private static final int height = 500; - private static final int width = 600; + private static final int HEIGHT = 500; + private static final int WIDTH = 600; private GraphicalCoveragePanel p; - private JButton allPositiveIndividuals; - private JButton allNegativeIndividuals; - private MoreDetailForSuggestedConceptsPanelHandler handler; + private final JButton allPositiveIndividuals; + private final JButton allNegativeIndividuals; + private final MoreDetailForSuggestedConceptsPanelHandler handler; /** * This is the constructor for the Panel. * @param model DLLearnerModel @@ -128,7 +128,7 @@ public MoreDetailForSuggestedConceptsPanel(DLLearnerModel model) { super(); setLayout(null); - setPreferredSize(new Dimension(width, height)); + setPreferredSize(new Dimension(WIDTH, HEIGHT)); this.model = model; handler = new MoreDetailForSuggestedConceptsPanelHandler(model); allPositiveIndividuals = new JButton("old"); @@ -216,10 +216,10 @@ //panel for the informations of the selected concept //this method adds the informations for the selected concept to the panel setInformation(); - p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), width, height-200, this); + p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), WIDTH, HEIGHT-200, this); p.setBounds(5, 110, 600, 300); detailPopup = new JDialog(); - detailPopup.setSize(width, height); + detailPopup.setSize(WIDTH, HEIGHT); //window will be disposed if the x button is pressed detailPopup.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); detailPopup.setVisible(true); @@ -242,21 +242,23 @@ add(allPositiveIndividuals); add(allNegativeIndividuals); handler.setEvaluadtedDescription(eval); - /* - add(coveredPositiveExamples); - add(notCoveredPositiveExamples); - add(coveredNegativeExamples); - add(notCoveredNegativeExamples); - add(posCoveredScroll); - add(posNotCoveredScroll); - add(negCoveredScroll); - add(negNotCoveredScroll);*/ detailPopup.add(this); } + + /** + * This method returns the Button where you can get + * all individuals of the old concept. + * @return JButton + */ public JButton getAllPositiveindividuals() { return allPositiveIndividuals; } + /** + * This method returns the Button where you can get + * all individuals of the new concept. + * @return JButton + */ public JButton getAllNegativeIndividuals() { return allNegativeIndividuals; } @@ -278,63 +280,8 @@ } //sets the accuracy of the concept - double acc = ((EvaluatedDescriptionClass)eval).getAccuracy()*100; + double acc = ((EvaluatedDescriptionClass) eval).getAccuracy()*100; accuracyText.setText(String.valueOf(acc)+"%"); - - //Sets positive Covered Examples for the detail panel - /*Set<Individual> indi = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); - for(Individual ind : indi) { - for(String ontology : ontologiesStrings) { - if(ind.toString().contains(ontology)) { - JLabel posLabel = new JLabel(ind.toManchesterSyntaxString(ontology, null)); - posLabel.setForeground(colorGreen); - posCoveredPanel.add(posLabel); - break; - } - } } - - - - //sets the positive examples that are not covered - Set<Individual> individuals = ((EvaluatedDescriptionPosNeg)eval).getNotCoveredPositives(); - for(Individual ind : individuals) { - for(String onto : ontologiesStrings) { - if(ind.toString().contains(onto)) { - JLabel posLabel = new JLabel(ind.toManchesterSyntaxString(onto, null)); - posLabel.setForeground(colorRed); - posNotCoveredPanel.add(posLabel); - break; - } - } - } - - - //sets the negative examples that are covered - Set<Individual> negCoveredIndi = ((EvaluatedDescriptionPosNeg)eval).getCoveredNegatives(); - for(Individual negIndi : negCoveredIndi) { - for(String ont : ontologiesStrings) { - if(negIndi.toString().contains(ont)) { - JLabel posLabel = new JLabel(negIndi.toManchesterSyntaxString(ont, null)); - posLabel.setForeground(colorRed); - negCoveredPanel.add(posLabel); - break; - } - } - } - - //sets the negative examples that are not covered - Set<Individual> negNotCoveredIndi = ((EvaluatedDescriptionPosNeg)eval).getNotCoveredNegatives(); - for(Individual negNotIndi : negNotCoveredIndi) { - for(String ontol : ontologiesStrings) { - if(negNotIndi.toString().contains(ontol)) { - JLabel posLabel = new JLabel(negNotIndi.toManchesterSyntaxString(ontol, null)); - posLabel.setForeground(colorGreen); - negNotCoveredPanel.add(posLabel); - break; - } - } - }*/ } - } } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,3 +1,22 @@ +/** + * 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.tools.protege; import java.awt.event.ActionEvent; @@ -8,16 +27,25 @@ import javax.swing.JOptionPane; import org.dllearner.algorithms.EvaluatedDescriptionClass; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.owl.Individual; +/** + * This class takes care of all events happening in the MoreDetailForSuggestedConceptsPanelHandler. + * @author Christian Koetteritzsch + * + */ public class MoreDetailForSuggestedConceptsPanelHandler implements ActionListener{ private static final String OLD_BUTTON_LABEL = "old"; private static final String NEW_BUTTON_LABEL = "new"; - private DLLearnerModel model; + private final DLLearnerModel model; private EvaluatedDescription eval; + + /** + * This is the constructor of the MoreDetailForSuggestedConceptsPanelHandler. + * @param m Model of the DL-Learner + */ public MoreDetailForSuggestedConceptsPanelHandler(DLLearnerModel m) { model = m; } @@ -39,8 +67,8 @@ } if(a.getActionCommand().equals(NEW_BUTTON_LABEL)) { - Set<Individual> posInd = ((EvaluatedDescriptionClass)eval).getCoveredInstances(); - posInd.addAll(((EvaluatedDescriptionClass)eval).getAdditionalInstances()); + Set<Individual> posInd = ((EvaluatedDescriptionClass) eval).getCoveredInstances(); + posInd.addAll(((EvaluatedDescriptionClass) eval).getAdditionalInstances()); Set<String> uri = model.getOntologyURIString(); String toolTip = "This are the Individuals beloning to\n "; for(String u : uri) { @@ -49,7 +77,7 @@ } } - for(Individual ind : posInd ) { + for(Individual ind : posInd) { for(String u : uri) { if(ind.toString().contains(u)) { @@ -64,6 +92,10 @@ } + /** + * This method sets the currently selected evaluated description. + * @param e evaluated description + */ public void setEvaluadtedDescription(EvaluatedDescription e) { eval = e; } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,5 +1,5 @@ /** - * Copyright (C) 2007-2008, Jens Lehmann + * Copyright (C) 2007-2009, Jens Lehmann * * This file is part of DL-Learner. * @@ -80,26 +80,26 @@ private static final String SUGGEST_EQUIVALENT_CLASS_LABEL = "Suggest equivalent class"; private static final String SUGGEST_SUBCLASS_LABEL = "Suggest super class"; - private OWLEditorKit editorKit; + private final OWLEditorKit editorKit; - private ExpressionEditor<OWLDescription> editor; + private final ExpressionEditor<OWLDescription> editor; - private JComponent editingComponent; + private final JComponent editingComponent; - private JTabbedPane tabbedPane; + private final JTabbedPane tabbedPane; private DLLearnerView dllearner; - private ActionHandler action; + private final ActionHandler action; private OWLClassSelectorPanel classSelectorPanel; private ObjectRestrictionCreatorPanel restrictionCreatorPanel; - //private OWLDescription initialDescription; + //private final OWLDescription initialDescription; - private Set<InputVerificationStatusChangedListener> listeners = new HashSet<InputVerificationStatusChangedListener>(); + private final Set<InputVerificationStatusChangedListener> listeners = new HashSet<InputVerificationStatusChangedListener>(); - private ChangeListener changeListener = new ChangeListener() { + private final ChangeListener changeListener = new ChangeListener() { public void stateChanged(ChangeEvent changeEvent) { handleVerifyEditorContents(); } @@ -286,8 +286,6 @@ */ public void removeStatusChangedListener( InputVerificationStatusChangedListener listener) { - //TODO: Suchen - //System.out.println("Comp: "+editorKit.getWorkspace().getComponents()); listeners.remove(listener); editor.removeStatusChangedListener(listener); } @@ -302,22 +300,22 @@ public class DLLearnerView extends JPanel { private static final long serialVersionUID = 624829578325729385L; - private OWLClassDescriptionEditorWithDLLearnerTab mainWindow; + private final OWLClassDescriptionEditorWithDLLearnerTab mainWindow; // this is the Component which shows the view of the dllearner - private JComponent learner; + private final JComponent learner; // Accept button to add the learned concept to the owl - private JButton accept; + private final JButton accept; // Runbutton to start the learning algorithm - private JButton run; + private final JButton run; // This is the label for the advanced button. - private JLabel adv; + private final JLabel adv; // This is the color for the error message. It is red. @@ -325,19 +323,19 @@ // This is the text area for the error message when an error occurred - private JTextArea errorMessage; + private final JTextArea errorMessage; // Advanced Button to activate/deactivate the example select panel - private JToggleButton advanced; + private final JToggleButton advanced; // Action Handler that manages the Button actions - private ActionHandler action; + private final ActionHandler action; // This is the model of the dllearner plugin which includes all data - private DLLearnerModel model; + private final DLLearnerModel model; // Panel for the suggested concepts @@ -345,21 +343,21 @@ // Selection panel for the positive and negative examples - private PosAndNegSelectPanel posPanel; + private final PosAndNegSelectPanel posPanel; // Picture for the advanced button when it is not toggled - private ImageIcon icon; + private final ImageIcon icon; // Picture of the advanced button when it is toggled - private JPanel addButtonPanel; - private JLabel wikiPane; - private ImageIcon toggledIcon; - private JTextArea hint; + private final JPanel addButtonPanel; + private final JLabel wikiPane; + private final ImageIcon toggledIcon; + private final JTextArea hint; private boolean isInconsistent; // This is the Panel for more details of the suggested concept private MoreDetailForSuggestedConceptsPanel detail; - private OWLFrame<OWLClass> frame; + private final OWLFrame<OWLClass> frame; private ReadingOntologyThread readThread; /** @@ -401,7 +399,7 @@ learner.setPreferredSize(new Dimension(600, 520)); accept.setPreferredSize(new Dimension(290, 50)); advanced.setName("Advanced"); - posPanel = new PosAndNegSelectPanel(model, action, this); + posPanel = new PosAndNegSelectPanel(model, action); addAcceptButtonListener(this.action); addRunButtonListener(this.action); addAdvancedButtonListener(this.action); @@ -427,9 +425,9 @@ * Returns the Mainwindow where the Plugin is integratet. * @return OWLClassDescriptionWithDLLearnerTab MainWindow */ - public OWLClassDescriptionEditorWithDLLearnerTab getMainWindow() { + /*public OWLClassDescriptionEditorWithDLLearnerTab getMainWindow() { return mainWindow; - } + }*/ /** * This Method renders the view of the plugin. */ @@ -458,8 +456,6 @@ advanced.setBounds(10, 200, 20, 20); sugPanel.setVisible(true); posPanel.setVisible(false); - //posPanel.getAddToNegPanelButton().setEnabled(false); - //posPanel.getAddToPosPanelButton().setEnabled(false); posPanel.setBounds(10, 230, 490, 250); accept.setBounds(510, 40, 80, 110); hint.setBounds(10, 150, 490, 35); @@ -497,16 +493,14 @@ public void setHintMessage(String message) { hint.setText(message); } + + /** + * This method returns the hint panel. + * @return hint panel + */ public JTextArea getHintPanel() { return hint; } - /** - * This Method returns the DL_Learner tab. - * @return JComponent - */ - public JComponent getLearnerPanel() { - return learner; - } /** * Sets the panel to select/deselect the examples visible/invisible. @@ -516,13 +510,6 @@ posPanel.setVisible(visible); } - /** - * Returns nothing. - * @return null - */ - public JPanel getOptionPanel() { - return null; - } /** * Returns the AddButton. @@ -661,13 +648,13 @@ private static final long serialVersionUID = 1695484991927845068L; - private OWLObjectPropertySelectorPanel objectPropertySelectorPanel; + private final OWLObjectPropertySelectorPanel objectPropertySelectorPanel; - private OWLClassSelectorPanel classSelectorPanel; + private final OWLClassSelectorPanel classSelectorPanel; - private JSpinner cardinalitySpinner; + private final JSpinner cardinalitySpinner; - private JComboBox typeCombo; + private final JComboBox typeCombo; public ObjectRestrictionCreatorPanel() { objectPropertySelectorPanel = new OWLObjectPropertySelectorPanel( @@ -807,7 +794,7 @@ */ private abstract class RestrictionCreator { - private String name; + private final String name; protected RestrictionCreator(String name) { this.name = name; @@ -829,7 +816,7 @@ private abstract class CardinalityRestrictionCreator extends RestrictionCreator { - private JSpinner cardinalitySpinner; + private final JSpinner cardinalitySpinner; protected CardinalityRestrictionCreator(String name, JSpinner cardinalitySpinner) { Deleted: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-25 12:39:02 UTC (rev 1628) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-25 13:03:17 UTC (rev 1629) @@ -1,198 +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.tools.protege; - -import java.util.ArrayList; -import java.util.Comparator; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSectionRow; -import org.protege.editor.owl.ui.frame.OWLFrame; -import org.protege.editor.owl.ui.frame.OWLFrameSectionRow; -import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; -import org.protege.editor.owl.ui.frame.cls.AbstractOWLClassAxiomFrameSection; -import org.semanticweb.owl.inference.OWLReasonerException; -import org.semanticweb.owl.inference.UnsupportedReasonerOperationException; -import org.semanticweb.owl.model.AddAxiom; -import org.semanticweb.owl.model.OWLAxiom; -import org.semanticweb.owl.model.OWLClass; -import org.semanticweb.owl.model.OWLDescription; -import org.semanticweb.owl.model.OWLEquivalentClassesAxiom; -import org.semanticweb.owl.model.OWLObject; -import org.semanticweb.owl.model.OWLOntology; -import org.semanticweb.owl.model.OWLOntologyChange; -import org.semanticweb.owl.util.CollectionFactory; - -/** - * Here a only caged in the method getObjectEditor() the call for the - * OWLClassDescriptionEditor to OWLClassDescriptionEditorWithDLLearnerTab. - * @author Matthew Horridge and Christian Koetteritzsch<br> - * The University Of Manchester<br> - * Bio-Health Informatics Group<br> - * Date: 19-Jan-2007<br> - * <br> - */ -public class OWLEquivalentClassesAxiomFrameSection extends AbstractOWLClassAxiomFrameSection<OWLEquivalentClassesAxiom, OWLDescription> { - - private static final String LABEL = "equivalent classes"; - - private Set<OWLDescription> added = new HashSet<OWLDescription>(); - - private boolean inferredEquivalentClasses = true; - - private OWLFrame<OWLClass> frame; - - - public OWLEquivalentClassesAxiomFrameSection(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) { - super(editorKit, LABEL, "Equivalent class", frame); - this.frame = frame; - } - - - protected void clear() { - added.clear(); - } - - - protected void addAxiom(OWLEquivalentClassesAxiom ax, OWLOntology ontology) { - addRow(new OWLEquivalentClassesAxiomFrameSectionRow(getOWLEditorKit(), - this, - ontology, - getRootObject(), - ax)); - for (OWLDescription desc : ax.getDescriptions()) { - added.add(desc); - } - } - - - protected Set<OWLEquivalentClassesAxiom> getClassAxioms(OWLDescription descr, OWLOntology ont) { - if (!descr.isAnonymous()){ - return ont.getEquivalentClassesAxioms(descr.asOWLClass()); - } - else{ - Set<OWLEquivalentClassesAxiom> axioms = new HashSet<OWLEquivalentClassesAxiom>(); - for (OWLAxiom ax ... [truncated message content] |
From: <hee...@us...> - 2009-02-25 12:47:39
|
Revision: 1627 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1627&view=rev Author: heeroyuy Date: 2009-02-25 12:22:10 +0000 (Wed, 25 Feb 2009) Log Message: ----------- -add config file for tests Modified Paths: -------------- trunk/examples/swore/swore.conf trunk/examples/swore/swore.rdf Added Paths: ----------- trunk/examples/swore/customer_requirement.conf Added: trunk/examples/swore/customer_requirement.conf =================================================================== --- trunk/examples/swore/customer_requirement.conf (rev 0) +++ trunk/examples/swore/customer_requirement.conf 2009-02-25 12:22:10 UTC (rev 1627) @@ -0,0 +1,7 @@ + +import("swore.rdf"); + +problem = classLearning; +classLearning.classToDescribe = "http://ns.softwiki.de/req/CustomerRequirment"; + +algorithm = celoe; Modified: trunk/examples/swore/swore.conf =================================================================== --- trunk/examples/swore/swore.conf 2009-02-24 16:42:10 UTC (rev 1626) +++ trunk/examples/swore/swore.conf 2009-02-25 12:22:10 UTC (rev 1627) @@ -10,7 +10,7 @@ import("swore.rdf"); // ignore class for which we want to learn a definition -refexamples.ignoredConcepts = { "http://ns.softwiki.de/req/CustomerRequirement" }; +refexamples.ignoredConcepts = { "http://ns.softwiki.de/req/Goal" }; // we usually have a configurable minimum accuracy and should set noise to 100 - (min. accuracy)/2 // because min. accuracy is recommended to be 90%, we set the noise value to 5% @@ -20,19 +20,24 @@ refexamples.terminateOnNoiseReached = false; // maximum execution time should be sufficiently low value (because the user has to wait for the result) -refexamples.maxExecutionTimeInSeconds = 3; +refexamples.maxExecutionTimeInSeconds = 20; // negations are penalised, because they are often not desired, e.g. // $superclass AND NOT $neighbourclass1 AND NOT $neighbourclass2 is // one of the patterns which is learned but only sometimes/rarely useful refexamples.negationPenalty = 2; -+"http://ns.softwiki.de/req/BuildAFastSoftware" -+"http://ns.softwiki.de/req/BuildASoftwareThatRuns24hADay" -+"http://ns.softwiki.de/req/CreateModernGUIDesign" -+"http://ns.softwiki.de/req/CustomerRequirement1" -+"http://ns.softwiki.de/req/UseAsLittleSystemResourcesAsPosible" -+"http://ns.softwiki.de/req/UseDatabaseToStoreUserData" ++"http://ns.softwiki.de/req/determineCoreRequirements" ++"http://ns.softwiki.de/req/determineSystemRequirements" ++"http://ns.softwiki.de/req/CreateVersion1" +-"http://ns.softwiki.de/req/CreateVersion2" +-"http://ns.softwiki.de/req/CreateACheaperSoftware" +-"http://ns.softwiki.de/req/less_important" +-"http://ns.softwiki.de/req/unimportant" +-"http://ns.softwiki.de/req/TextualScenario4" +-"http://ns.softwiki.de/req/TextualScenario5" +-"http://ns.softwiki.de/req/TextualScenario6" +-"http://ns.softwiki.de/req/UseDatabaseToStoreUserData" -"http://ns.softwiki.de/req/1" -"http://ns.softwiki.de/req/2" -"http://ns.softwiki.de/req/3" Modified: trunk/examples/swore/swore.rdf =================================================================== --- trunk/examples/swore/swore.rdf 2009-02-24 16:42:10 UTC (rev 1626) +++ trunk/examples/swore/swore.rdf 2009-02-25 12:22:10 UTC (rev 1627) @@ -186,6 +186,9 @@ <owl:ObjectProperty rdf:about="isCreatedBy"> <rdf:type rdf:resource="&owl;FunctionalProperty"/> + <rdfs:label>is created by</rdfs:label> + <rdfs:comment + >specifies the persons who created the requirement</rdfs:comment> <rdfs:domain rdf:resource="AbstractRequirement"/> </owl:ObjectProperty> @@ -294,6 +297,15 @@ + <!-- http://ns.softwiki.de/req/rates --> + + <owl:ObjectProperty rdf:about="rates"> + <rdfs:range rdf:resource="AbstractRequirement"/> + <rdfs:domain rdf:resource="Rating"/> + </owl:ObjectProperty> + + + <!-- http://ns.softwiki.de/req/refersTo --> <owl:ObjectProperty rdf:about="refersTo"> @@ -318,6 +330,15 @@ + <!-- http://ns.softwiki.de/req/specifies --> + + <owl:ObjectProperty rdf:about="specifies"> + <rdfs:range rdf:resource="AbstractRequirement"/> + <rdfs:domain rdf:resource="Topic"/> + </owl:ObjectProperty> + + + <!-- http://ns.softwiki.de/req/undirectedrelation --> <owl:ObjectProperty rdf:about="undirectedrelation"> @@ -331,23 +352,32 @@ - <!-- http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag --> + <!-- http://ns.softwiki.de/req/votes --> - <owl:ObjectProperty rdf:about="&tags;taggedWithTag"> - <rdfs:label xml:lang="de">Tags</rdfs:label> + <owl:ObjectProperty rdf:about="votes"> + <rdfs:range rdf:resource="AbstractRequirement"/> + <rdfs:domain rdf:resource="Stakeholder"/> </owl:ObjectProperty> - <!-- http://www.w3.org/2000/01/rdf-schema#label --> + <!-- http://ns.softwiki.de/req/willLeadTo --> - <owl:ObjectProperty rdf:about="&rdfs;label"> - <rdf:type rdf:resource="&owl;AnnotationProperty"/> - <rdfs:label rdf:datatype="&xsd;string">label</rdfs:label> + <owl:ObjectProperty rdf:about="willLeadTo"> + <rdfs:domain rdf:resource="Requirement"/> + <rdfs:range rdf:resource="SystemRequirement"/> </owl:ObjectProperty> + <!-- http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag --> + + <owl:ObjectProperty rdf:about="&tags;taggedWithTag"> + <rdfs:label xml:lang="de">Tags</rdfs:label> + </owl:ObjectProperty> + + + <!-- /////////////////////////////////////////////////////////////////////////////////////// // @@ -576,6 +606,7 @@ <owl:Class rdf:about="AbstractSource"> <rdfs:label rdf:datatype="&xsd;string">abstract source</rdfs:label> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> <owl:disjointWith rdf:resource="Vote"/> <rdfs:comment rdf:datatype="&xsd;string"></rdfs:comment> </owl:Class> @@ -645,6 +676,17 @@ <!-- http://ns.softwiki.de/req/CustomerRequirement --> <owl:Class rdf:about="CustomerRequirement"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="Requirement"/> + <owl:Restriction> + <owl:onProperty rdf:resource="isCreatedBy"/> + <owl:someValuesFrom rdf:resource="Customer"/> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> <rdfs:subClassOf rdf:resource="Requirement"/> </owl:Class> @@ -677,6 +719,17 @@ <!-- http://ns.softwiki.de/req/Document --> <owl:Class rdf:about="Document"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="AbstractSource"/> + <owl:Restriction> + <owl:onProperty rdf:resource="leadsTo"/> + <owl:someValuesFrom rdf:resource="AbstractRequirement"/> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> <rdfs:subClassOf rdf:resource="AbstractSource"/> </owl:Class> @@ -732,7 +785,19 @@ <!-- http://ns.softwiki.de/req/PerformanceRequirement --> <owl:Class rdf:about="PerformanceRequirement"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="Requirement"/> + <owl:Restriction> + <owl:onProperty rdf:resource="willLeadTo"/> + <owl:someValuesFrom rdf:resource="SystemRequirement"/> + </owl:Restriction> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> <rdfs:subClassOf rdf:resource="Requirement"/> + <owl:disjointWith rdf:resource="SystemRequirement"/> </owl:Class> @@ -830,6 +895,14 @@ + <!-- http://ns.softwiki.de/req/SystemRequirement --> + + <owl:Class rdf:about="SystemRequirement"> + <rdfs:subClassOf rdf:resource="&owl;Thing"/> + </owl:Class> + + + <!-- http://ns.softwiki.de/req/TextualScenario --> <owl:Class rdf:about="TextualScenario"> @@ -930,83 +1003,73 @@ <!-- http://ns.softwiki.de/req/1 --> - <Rating rdf:about="1"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - <isDefinedBy rdf:resource="Andrew_Stellman"/> - </Rating> + <QualityRating rdf:about="1"> + <rates rdf:resource="BuildASecureLoginSystem"/> + </QualityRating> <!-- http://ns.softwiki.de/req/2 --> - <Rating rdf:about="2"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - </Rating> + <QualityRating rdf:about="2"> + <rates rdf:resource="BuildASoftwareThatRuns24hADay"/> + </QualityRating> <!-- http://ns.softwiki.de/req/3 --> - <PriorityRating rdf:about="3"> - <rdf:type rdf:resource="QualityRating"/> - <rdf:type rdf:resource="Rating"/> - </PriorityRating> + <QualityRating rdf:about="3"> + <rates rdf:resource="BuildLoginSystem"/> + </QualityRating> <!-- http://ns.softwiki.de/req/4 --> - <Rating rdf:about="4"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - </Rating> + <QualityRating rdf:about="4"> + <rates rdf:resource="BuildNetworkLoginSystem"/> + </QualityRating> <!-- http://ns.softwiki.de/req/5 --> - <Rating rdf:about="5"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - </Rating> + <QualityRating rdf:about="5"> + <rates rdf:resource="DataBaseBackupCreatedSyncron"/> + </QualityRating> <!-- http://ns.softwiki.de/req/6 --> - <Rating rdf:about="6"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - </Rating> + <QualityRating rdf:about="6"> + <rates rdf:resource="CustomerRequirement1"/> + </QualityRating> <!-- http://ns.softwiki.de/req/7 --> - <PriorityRating rdf:about="7"> - <rdf:type rdf:resource="QualityRating"/> - <rdf:type rdf:resource="Rating"/> - </PriorityRating> + <QualityRating rdf:about="7"> + <rates rdf:resource="DialogSystemShoudRespondInUnder5Sec"/> + </QualityRating> <!-- http://ns.softwiki.de/req/8 --> <QualityRating rdf:about="8"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="Rating"/> + <rates rdf:resource="loadGUIInUnder2Sec"/> </QualityRating> <!-- http://ns.softwiki.de/req/9 --> - <Rating rdf:about="9"> - <rdf:type rdf:resource="PriorityRating"/> - <rdf:type rdf:resource="QualityRating"/> - </Rating> + <QualityRating rdf:about="9"> + <rates rdf:resource="LogEveryUserActivity"/> + </QualityRating> @@ -1014,6 +1077,7 @@ <DesignRequirement rdf:about="ActiveHelpDialog"> <isCreatedBy rdf:resource="GermanGovernment"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> </DesignRequirement> @@ -1021,9 +1085,8 @@ <!-- http://ns.softwiki.de/req/Andrew_Stellman --> <Author rdf:about="Andrew_Stellman"> - <defines rdf:resource="1"/> <defines rdf:resource="MultiUserSystem"/> - <defines rdf:resource="loadGUIInUnder2Sec"/> + <votes rdf:resource="UseDatabaseToStoreUserData"/> </Author> @@ -1032,18 +1095,50 @@ <CustomerRequirement rdf:about="BuildAFastSoftware"> <isCreatedBy rdf:resource="Charlotte_Blay"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <refersTo rdf:resource="PerformanceTopic"/> </CustomerRequirement> + <!-- http://ns.softwiki.de/req/BuildASecureLoginSystem --> + + <DerivedRequirement rdf:about="BuildASecureLoginSystem"> + <details rdf:resource="BuildLoginSystem"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </DerivedRequirement> + + + <!-- http://ns.softwiki.de/req/BuildASoftwareThatRuns24hADay --> <CustomerRequirement rdf:about="BuildASoftwareThatRuns24hADay"> + <isLeadingTo rdf:resource="Lastenheft"/> <isCreatedBy rdf:resource="Philippe_Soupault"/> + <depentsOn rdf:resource="SystemStabilityRequirement"/> + <refersTo rdf:resource="SystemStabilityTopic"/> </CustomerRequirement> + <!-- http://ns.softwiki.de/req/BuildLoginSystem --> + + <DerivedRequirement rdf:about="BuildLoginSystem"> + <details rdf:resource="MultiUserSystem"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </DerivedRequirement> + + + + <!-- http://ns.softwiki.de/req/BuildNetworkLoginSystem --> + + <DerivedRequirement rdf:about="BuildNetworkLoginSystem"> + <isLeadingTo rdf:resource="Pflichtenheft"/> + <details rdf:resource="UserCanAccessDataFromEveryComputer"/> + </DerivedRequirement> + + + <!-- http://ns.softwiki.de/req/CentralOrganisationOfFinnishTrade --> <TradeUnion rdf:about="CentralOrganisationOfFinnishTrade"/> @@ -1072,48 +1167,185 @@ + <!-- http://ns.softwiki.de/req/CreateACheaperSoftware --> + + <Goal rdf:about="CreateACheaperSoftware"> + <details rdf:resource="SearchShouldBeDoneIn3Sec"/> + <isDefinedBy rdf:resource="Tim"/> + </Goal> + + + + <!-- http://ns.softwiki.de/req/CreateDatabaseInterface --> + + <DerivedRequirement rdf:about="CreateDatabaseInterface"> + <details rdf:resource="DataBaseBackupCreatedSyncron"/> + <isLeadingTo rdf:resource="Lastenheft"/> + </DerivedRequirement> + + + <!-- http://ns.softwiki.de/req/CreateModernGUIDesign --> <CustomerRequirement rdf:about="CreateModernGUIDesign"> + <refersTo rdf:resource="DesignTopic"/> <isCreatedBy rdf:resource="Jane_Smiley"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <isCommentedBy rdf:resource="UsefulRequirement"/> </CustomerRequirement> + <!-- http://ns.softwiki.de/req/CreateNetworkInterface --> + + <DerivedRequirement rdf:about="CreateNetworkInterface"> + <details rdf:resource="BuildNetworkLoginSystem"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </DerivedRequirement> + + + + <!-- http://ns.softwiki.de/req/CreateVersion1 --> + + <Goal rdf:about="CreateVersion1"> + <isDefinedBy rdf:resource="Jim"/> + <details rdf:resource="SystemStabilityRequirement"/> + </Goal> + + + + <!-- http://ns.softwiki.de/req/CreateVersion2 --> + + <Goal rdf:about="CreateVersion2"> + <isDefinedBy rdf:resource="Tom"/> + <details rdf:resource="UseDatabaseToStoreUserData"/> + </Goal> + + + <!-- http://ns.softwiki.de/req/CustomerRequirement1 --> - <CustomerRequirement rdf:about="CustomerRequirement1"> + <Requirement rdf:about="CustomerRequirement1"> + <isLeadingTo rdf:resource="Lastenheft"/> <isCreatedBy rdf:resource="Tom"/> - </CustomerRequirement> + </Requirement> + <!-- http://ns.softwiki.de/req/DataBaseBackupCreatedSyncron --> + + <PerformanceRequirement rdf:about="DataBaseBackupCreatedSyncron"> + <isCreatedBy rdf:resource="Andrew_Stellman"/> + <willLeadTo rdf:resource="DualCoreSystemWith8GigRam"/> + <isCommentedBy rdf:resource="MustBeDiscussed"/> + <refersTo rdf:resource="PerformanceTopic"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </PerformanceRequirement> + + + + <!-- http://ns.softwiki.de/req/DataExecutionShouldBeDoneInUnder3Sec --> + + <PerformanceRequirement rdf:about="DataExecutionShouldBeDoneInUnder3Sec"> + <isCreatedBy rdf:resource="Jennifer_Greene"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <isCommentedBy rdf:resource="MustBeDiscussed"/> + <refersTo rdf:resource="PerformanceTopic"/> + <willLeadTo rdf:resource="QuadCoreSystemWith16GigRam"/> + </PerformanceRequirement> + + + + <!-- http://ns.softwiki.de/req/DatabaseServerCanBeUsedBy1000PersonsSimultaneus --> + + <PerformanceRequirement rdf:about="DatabaseServerCanBeUsedBy1000PersonsSimultaneus"> + <willLeadTo rdf:resource="DatabaseServerWith32GigRam"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <isCommentedBy rdf:resource="MustBeDiscussed"/> + <refersTo rdf:resource="PerformanceTopic"/> + <isCreatedBy rdf:resource="Tom"/> + </PerformanceRequirement> + + + + <!-- http://ns.softwiki.de/req/DatabaseServerWith32GigRam --> + + <SystemRequirement rdf:about="DatabaseServerWith32GigRam"/> + + + + <!-- http://ns.softwiki.de/req/DatabaseTopic --> + + <Topic rdf:about="DatabaseTopic"> + <specifies rdf:resource="UseDatabaseToStoreUserData"/> + </Topic> + + + <!-- http://ns.softwiki.de/req/Derick_Garnier --> <Customer rdf:about="Derick_Garnier"/> + <!-- http://ns.softwiki.de/req/DesignTopic --> + + <Topic rdf:about="DesignTopic"> + <specifies rdf:resource="CreateModernGUIDesign"/> + <specifies rdf:resource="UseOfIcons"/> + <specifies rdf:resource="WindowDesign"/> + </Topic> + + + <!-- http://ns.softwiki.de/req/DialogSystemShoudRespondInUnder5Sec --> <PerformanceRequirement rdf:about="DialogSystemShoudRespondInUnder5Sec"> + <willLeadTo rdf:resource="DualCoreSystemWith8GigRam"/> + <isCommentedBy rdf:resource="GoodIdea"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <refersTo rdf:resource="PerformanceTopic"/> <isCreatedBy rdf:resource="Tom"/> </PerformanceRequirement> + <!-- http://ns.softwiki.de/req/DualCoreSystemWith8GigRam --> + + <SystemRequirement rdf:about="DualCoreSystemWith8GigRam"/> + + + <!-- http://ns.softwiki.de/req/EuropeanTradeUnionConfederation --> <TradeUnion rdf:about="EuropeanTradeUnionConfederation"/> + <!-- http://ns.softwiki.de/req/FunctionTopic --> + + <Topic rdf:about="FunctionTopic"> + <specifies rdf:resource="LogEveryUserActivity"/> + </Topic> + + + <!-- http://ns.softwiki.de/req/GermanGovernment --> <Government rdf:about="GermanGovernment"/> + <!-- http://ns.softwiki.de/req/GoodIdea --> + + <Comment rdf:about="GoodIdea"> + <comments rdf:resource="DialogSystemShoudRespondInUnder5Sec"/> + <isDefinedBy rdf:resource="Jennifer_Greene"/> + <isDefinedBy rdf:resource="Stefan"/> + </Comment> + + + <!-- http://ns.softwiki.de/req/Jane_Smiley --> <Customer rdf:about="Jane_Smiley"/> @@ -1123,26 +1355,59 @@ <!-- http://ns.softwiki.de/req/Jennifer_Greene --> <Author rdf:about="Jennifer_Greene"> + <votes rdf:resource="MultiWindowSystem"/> + <defines rdf:resource="loadGUIInUnder2Sec"/> + </Author> + + + + <!-- http://ns.softwiki.de/req/Jill --> + + <Author rdf:about="Jill"> + <defines rdf:resource="DialogSystemShoudRespondInUnder5Sec"/> + <votes rdf:resource="SystemRequirement1"/> + </Author> + + + + <!-- http://ns.softwiki.de/req/Jim --> + + <Author rdf:about="Jim"> <defines rdf:resource="MultiWindowSystem"/> + <votes rdf:resource="SystemStabilityRequirement"/> </Author> <!-- http://ns.softwiki.de/req/Lastenheft --> - <Document rdf:about="Lastenheft"/> + <Document rdf:about="Lastenheft"> + <leadsTo rdf:resource="text"/> + </Document> <!-- http://ns.softwiki.de/req/LogEveryUserActivity --> <FunctionalRequirement rdf:about="LogEveryUserActivity"> + <isLeadingTo rdf:resource="Lastenheft"/> + <isCommentedBy rdf:resource="NotNecessaryRequirment"/> <isDefinedBy rdf:resource="Steve_McConnell"/> <isCreatedBy rdf:resource="USGovernment"/> </FunctionalRequirement> + <!-- http://ns.softwiki.de/req/LoginTopic --> + + <Topic rdf:about="LoginTopic"> + <specifies rdf:resource="BuildASecureLoginSystem"/> + <specifies rdf:resource="BuildLoginSystem"/> + <specifies rdf:resource="BuildNetworkLoginSystem"/> + </Topic> + + + <!-- http://ns.softwiki.de/req/Michael_Steinmetz --> <Customer rdf:about="Michael_Steinmetz"/> @@ -1152,6 +1417,9 @@ <!-- http://ns.softwiki.de/req/MultiTabSystem --> <DesignRequirement rdf:about="MultiTabSystem"> + <refersTo rdf:resource="DesignTopic"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + <isCommentedBy rdf:resource="ShouldBeImplementedInALaterVersion"/> <isCreatedBy rdf:resource="Steve_McConnell"/> <isDefinedBy rdf:resource="Steve_McConnell"/> </DesignRequirement> @@ -1163,6 +1431,8 @@ <FunctionalRequirement rdf:about="MultiUserSystem"> <isDefinedBy rdf:resource="Andrew_Stellman"/> <isCreatedBy rdf:resource="Andrew_Stellman"/> + <isDetailedBy rdf:resource="BuildLoginSystem"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> </FunctionalRequirement> @@ -1170,8 +1440,10 @@ <!-- http://ns.softwiki.de/req/MultiWindowSystem --> <DesignRequirement rdf:about="MultiWindowSystem"> + <refersTo rdf:resource="DesignTopic"/> <isDefinedBy rdf:resource="Jennifer_Greene"/> <isCreatedBy rdf:resource="Jennifer_Greene"/> + <isLeadingTo rdf:resource="UML"/> </DesignRequirement> @@ -1179,6 +1451,8 @@ <!-- http://ns.softwiki.de/req/MustBeDiscussed --> <Comment rdf:about="MustBeDiscussed"> + <isDefinedBy rdf:resource="Andrew_Stellman"/> + <isDefinedBy rdf:resource="Jennifer_Greene"/> <comments rdf:resource="UserCanAccessDataFromEveryComputer"/> </Comment> @@ -1187,14 +1461,27 @@ <!-- http://ns.softwiki.de/req/NotNecessaryRequirment --> <Comment rdf:about="NotNecessaryRequirment"> - <isDefinedBy rdf:resource="&foaf;RichardNewman"/> + <isDefinedBy rdf:resource="Jennifer_Greene"/> + <comments rdf:resource="LogEveryUserActivity"/> </Comment> + <!-- http://ns.softwiki.de/req/PerformanceTopic --> + + <Topic rdf:about="PerformanceTopic"> + <specifies rdf:resource="BuildAFastSoftware"/> + <specifies rdf:resource="DataExecutionShouldBeDoneInUnder3Sec"/> + <specifies rdf:resource="loadGUIInUnder2Sec"/> + </Topic> + + + <!-- http://ns.softwiki.de/req/Pflichtenheft --> - <Document rdf:about="Pflichtenheft"/> + <Document rdf:about="Pflichtenheft"> + <leadsTo rdf:resource="TextualScenario2"/> + </Document> @@ -1204,11 +1491,62 @@ + <!-- http://ns.softwiki.de/req/QuadCoreSystemWith16GigRam --> + + <SystemRequirement rdf:about="QuadCoreSystemWith16GigRam"/> + + + + <!-- http://ns.softwiki.de/req/QualityTopic --> + + <Topic rdf:about="QualityTopic"> + <specifies rdf:resource="usability"/> + </Topic> + + + + <!-- http://ns.softwiki.de/req/SearchShouldBeDoneIn3Sec --> + + <PerformanceRequirement rdf:about="SearchShouldBeDoneIn3Sec"> + <isCreatedBy rdf:resource="Andrew_Stellman"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <isCommentedBy rdf:resource="NotNecessaryRequirment"/> + <refersTo rdf:resource="PerformanceTopic"/> + <willLeadTo rdf:resource="SingleCoreWith_2GigRam"/> + </PerformanceRequirement> + + + + <!-- http://ns.softwiki.de/req/ShouldBeImplementedInALaterVersion --> + + <Comment rdf:about="ShouldBeImplementedInALaterVersion"> + <comments rdf:resource="MultiTabSystem"/> + <isDefinedBy rdf:resource="Stefan"/> + </Comment> + + + + <!-- http://ns.softwiki.de/req/SingleCoreWith_2GigRam --> + + <SystemRequirement rdf:about="SingleCoreWith_2GigRam"/> + + + + <!-- http://ns.softwiki.de/req/Stefan --> + + <Author rdf:about="Stefan"> + <votes rdf:resource="BuildNetworkLoginSystem"/> + <defines rdf:resource="CreateModernGUIDesign"/> + <defines rdf:resource="ShouldBeImplementedInALaterVersion"/> + </Author> + + + <!-- http://ns.softwiki.de/req/Steve_McConnell --> <Author rdf:about="Steve_McConnell"> - <defines rdf:resource="LogEveryUserActivity"/> - <defines rdf:resource="MultiTabSystem"/> + <votes rdf:resource="LogEveryUserActivity"/> + <defines rdf:resource="comment"/> </Author> @@ -1219,35 +1557,140 @@ + <!-- http://ns.softwiki.de/req/SystemRequirement1 --> + + <SystemRequirement rdf:about="SystemRequirement1"/> + + + + <!-- http://ns.softwiki.de/req/SystemShouldAlwaysRunBasicFeaturesAfterFailure --> + + <PerformanceRequirement rdf:about="SystemShouldAlwaysRunBasicFeaturesAfterFailure"> + <refersTo rdf:resource="PerformanceTopic"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + <willLeadTo rdf:resource="SingleCoreWith_2GigRam"/> + <isCreatedBy rdf:resource="Tom"/> + <isCommentedBy rdf:resource="UsefulRequirement"/> + </PerformanceRequirement> + + + + <!-- http://ns.softwiki.de/req/SystemShoundStartUpIn7Sec --> + + <PerformanceRequirement rdf:about="SystemShoundStartUpIn7Sec"> + <isCreatedBy rdf:resource="Jennifer_Greene"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <refersTo rdf:resource="PerformanceTopic"/> + <willLeadTo rdf:resource="QuadCoreSystemWith16GigRam"/> + <isCommentedBy rdf:resource="ShouldBeImplementedInALaterVersion"/> + </PerformanceRequirement> + + + <!-- http://ns.softwiki.de/req/SystemStabilityRequirement --> <PerformanceRequirement rdf:about="SystemStabilityRequirement"> - <isCreatedBy rdf:resource="CentralOrganisationOfFinnishTrade"/> + <isCreatedBy rdf:resource="Jennifer_Greene"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + <willLeadTo rdf:resource="SystemRequirement1"/> + <refersTo rdf:resource="SystemStabilityTopic"/> + <isCommentedBy rdf:resource="comment"/> </PerformanceRequirement> - <!-- http://ns.softwiki.de/req/TextualScenario --> + <!-- http://ns.softwiki.de/req/SystemStabilityTopic --> - <Scenario rdf:about="TextualScenario"/> + <Topic rdf:about="SystemStabilityTopic"> + <specifies rdf:resource="BuildASoftwareThatRuns24hADay"/> + <specifies rdf:resource="SystemStabilityRequirement"/> + </Topic> + <!-- http://ns.softwiki.de/req/SystemWithDiskArray --> + + <SystemRequirement rdf:about="SystemWithDiskArray"/> + + + + <!-- http://ns.softwiki.de/req/TextualScenario1 --> + + <TextualScenario rdf:about="TextualScenario1"> + <isLeadingTo rdf:resource="UML"/> + </TextualScenario> + + + + <!-- http://ns.softwiki.de/req/TextualScenario2 --> + + <TextualScenario rdf:about="TextualScenario2"> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </TextualScenario> + + + + <!-- http://ns.softwiki.de/req/TextualScenario3 --> + + <TextualScenario rdf:about="TextualScenario3"> + <isLeadingTo rdf:resource="use_cases"/> + </TextualScenario> + + + + <!-- http://ns.softwiki.de/req/TextualScenario4 --> + + <TextualScenario rdf:about="TextualScenario4"> + <isLeadingTo rdf:resource="UML"/> + </TextualScenario> + + + + <!-- http://ns.softwiki.de/req/TextualScenario5 --> + + <TextualScenario rdf:about="TextualScenario5"> + <isLeadingTo rdf:resource="Lastenheft"/> + </TextualScenario> + + + + <!-- http://ns.softwiki.de/req/TextualScenario6 --> + + <TextualScenario rdf:about="TextualScenario6"> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </TextualScenario> + + + <!-- http://ns.softwiki.de/req/Tilman_Röhrig --> <Customer rdf:about="Tilman_Röhrig"/> + <!-- http://ns.softwiki.de/req/Tim --> + + <Author rdf:about="Tim"> + <defines rdf:resource="SystemShoundStartUpIn7Sec"/> + <votes rdf:resource="UseDatabaseToStoreUserData"/> + </Author> + + + <!-- http://ns.softwiki.de/req/Tom --> - <Programmer rdf:about="Tom"/> + <Author rdf:about="Tom"> + <defines rdf:resource="CustomerRequirement1"/> + <votes rdf:resource="UserCanAccessDataFromEveryComputer"/> + </Author> <!-- http://ns.softwiki.de/req/UML --> - <Document rdf:about="UML"/> + <Document rdf:about="UML"> + <leadsTo rdf:resource="TextualScenario1"/> + </Document> @@ -1260,7 +1703,9 @@ <!-- http://ns.softwiki.de/req/UseAsLittleSystemResourcesAsPosible --> <CustomerRequirement rdf:about="UseAsLittleSystemResourcesAsPosible"> + <isLeadingTo rdf:resource="Lastenheft"/> <isCreatedBy rdf:resource="Michael_Steinmetz"/> + <refersTo rdf:resource="PerformanceTopic"/> </CustomerRequirement> @@ -1269,26 +1714,35 @@ <CustomerRequirement rdf:about="UseDatabaseToStoreUserData"> <isCreatedBy rdf:resource="Derick_Garnier"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> </CustomerRequirement> <!-- http://ns.softwiki.de/req/UseOfIcons --> - <DesignRequirement rdf:about="UseOfIcons"/> + <DesignRequirement rdf:about="UseOfIcons"> + <refersTo rdf:resource="DesignTopic"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </DesignRequirement> <!-- http://ns.softwiki.de/req/UsefulRequirement --> - <Comment rdf:about="UsefulRequirement"/> + <Comment rdf:about="UsefulRequirement"> + <comments rdf:resource="CreateModernGUIDesign"/> + <isDefinedBy rdf:resource="Steve_McConnell"/> + </Comment> <!-- http://ns.softwiki.de/req/UserCanAccessDataFromEveryComputer --> <FunctionalRequirement rdf:about="UserCanAccessDataFromEveryComputer"> + <isDetailedBy rdf:resource="BuildNetworkLoginSystem"/> <isCommentedBy rdf:resource="MustBeDiscussed"/> + <isLeadingTo rdf:resource="Pflichtenheft"/> <isCreatedBy rdf:resource="USGovernment"/> </FunctionalRequirement> @@ -1298,19 +1752,26 @@ <DesignRequirement rdf:about="WindowDesign"> <isCreatedBy rdf:resource="Andrew_Stellman"/> + <refersTo rdf:resource="DesignTopic"/> + <isLeadingTo rdf:resource="Lastenheft"/> </DesignRequirement> <!-- http://ns.softwiki.de/req/calculations --> - <FunctionalRequirement rdf:about="calculations"/> + <FunctionalRequirement rdf:about="calculations"> + <isLeadingTo rdf:resource="UML"/> + </FunctionalRequirement> <!-- http://ns.softwiki.de/req/comment --> - <Comment rdf:about="comment"/> + <Comment rdf:about="comment"> + <isDefinedBy rdf:resource="Steve_McConnell"/> + <comments rdf:resource="SystemStabilityRequirement"/> + </Comment> @@ -1323,6 +1784,7 @@ <!-- http://ns.softwiki.de/req/data_manipulation --> <FunctionalRequirement rdf:about="data_manipulation"> + <isLeadingTo rdf:resource="Pflichtenheft"/> <isCreatedBy rdf:resource="Steve_McConnell"/> </FunctionalRequirement> @@ -1330,13 +1792,19 @@ <!-- http://ns.softwiki.de/req/determineCoreRequirements --> - <Goal rdf:about="determineCoreRequirements"/> + <Goal rdf:about="determineCoreRequirements"> + <details rdf:resource="DialogSystemShoudRespondInUnder5Sec"/> + <isDefinedBy rdf:resource="Jennifer_Greene"/> + </Goal> <!-- http://ns.softwiki.de/req/determineSystemRequirements --> - <Goal rdf:about="determineSystemRequirements"/> + <Goal rdf:about="determineSystemRequirements"> + <details rdf:resource="CreateModernGUIDesign"/> + <isDefinedBy rdf:resource="Jill"/> + </Goal> @@ -1363,6 +1831,10 @@ <PerformanceRequirement rdf:about="loadGUIInUnder2Sec"> <isDefinedBy rdf:resource="Andrew_Stellman"/> <isCreatedBy rdf:resource="Andrew_Stellman"/> + <willLeadTo rdf:resource="DualCoreSystemWith8GigRam"/> + <isCommentedBy rdf:resource="GoodIdea"/> + <isLeadingTo rdf:resource="Lastenheft"/> + <refersTo rdf:resource="PerformanceTopic"/> </PerformanceRequirement> @@ -1375,31 +1847,39 @@ <!-- http://ns.softwiki.de/req/technical_details --> - <FunctionalRequirement rdf:about="technical_details"/> + <FunctionalRequirement rdf:about="technical_details"> + <isLeadingTo rdf:resource="use_cases"/> + </FunctionalRequirement> <!-- http://ns.softwiki.de/req/text --> - <TextualScenario rdf:about="text"/> + <TextualScenario rdf:about="text"> + <isLeadingTo rdf:resource="Lastenheft"/> + </TextualScenario> - <!-- http://ns.softwiki.de/req/topic --> + <!-- http://ns.softwiki.de/req/unimportant --> - <Topic rdf:about="topic"/> + <Vote rdf:about="unimportant"/> - <!-- http://ns.softwiki.de/req/unimportant --> + <!-- http://ns.softwiki.de/req/usability --> - <Vote rdf:about="unimportant"/> + <QualityRequirement rdf:about="usability"> + <isLeadingTo rdf:resource="Pflichtenheft"/> + </QualityRequirement> <!-- http://ns.softwiki.de/req/use_cases --> - <Document rdf:about="use_cases"/> + <Document rdf:about="use_cases"> + <leadsTo rdf:resource="TextualScenario3"/> + </Document> @@ -1412,7 +1892,8 @@ <!-- http://www.holygoat.co.uk/foaf.rdf#RichardNewman --> <Author rdf:about="&foaf;RichardNewman"> - <defines rdf:resource="NotNecessaryRequirment"/> + <defines rdf:resource="DataBaseBackupCreatedSyncron"/> + <votes rdf:resource="SearchShouldBeDoneIn3Sec"/> </Author> @@ -1430,14 +1911,6 @@ <rdf:Description rdf:about="&xsd;dateTime"> <rdfs:label rdf:datatype="&xsd;string">dateTime</rdfs:label> </rdf:Description> - - - - <!-- http://www.w3.org/2004/02/skos/core#primarySubject --> - - <Topic rdf:about="&skos;primarySubject"> - <rdfs:label xml:lang="de">Thema</rdfs:label> - </Topic> </rdf:RDF> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-25 12:47:31
|
Revision: 1628 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1628&view=rev Author: heeroyuy Date: 2009-02-25 12:39:02 +0000 (Wed, 25 Feb 2009) Log Message: ----------- -removed spelling error Modified Paths: -------------- trunk/examples/swore/customer_requirement.conf Modified: trunk/examples/swore/customer_requirement.conf =================================================================== --- trunk/examples/swore/customer_requirement.conf 2009-02-25 12:22:10 UTC (rev 1627) +++ trunk/examples/swore/customer_requirement.conf 2009-02-25 12:39:02 UTC (rev 1628) @@ -2,6 +2,6 @@ import("swore.rdf"); problem = classLearning; -classLearning.classToDescribe = "http://ns.softwiki.de/req/CustomerRequirment"; +classLearning.classToDescribe = "http://ns.softwiki.de/req/CustomerRequirement"; algorithm = celoe; 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-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: <hee...@us...> - 2009-02-23 16:08:38
|
Revision: 1624 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1624&view=rev Author: heeroyuy Date: 2009-02-23 16:08:34 +0000 (Mon, 23 Feb 2009) Log Message: ----------- -update of the libraries for the plugin Modified Paths: -------------- trunk/lib/protege/org.protege.editor.core.application.jar trunk/lib/protege/org.protege.editor.owl.jar Modified: trunk/lib/protege/org.protege.editor.core.application.jar =================================================================== (Binary files differ) Modified: trunk/lib/protege/org.protege.editor.owl.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-23 16:07:18
|
Revision: 1623 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1623&view=rev Author: heeroyuy Date: 2009-02-23 16:07:10 +0000 (Mon, 23 Feb 2009) Log Message: ----------- -adjusting the graphicalCoveragePanel to the new learning algorithm -started new view for the more integrated version of the plugin Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.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/MoreDetailForSuggestedConceptsPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -40,8 +40,7 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -//import org.apache.log4j.Logger; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; +import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.owl.Description; @@ -87,9 +86,7 @@ * id if it is a subclass or an equivalent class * */ - public ActionHandler(ActionHandler a, DLLearnerModel m, - OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view, - String i) { + public ActionHandler(ActionHandler a, DLLearnerModel m, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view, String i) { this.view = view; this.id = i; this.model = m; @@ -108,12 +105,10 @@ if (z.getActionCommand().equals(id)) { model.setKnowledgeSource(); model.setReasoner(); - model.setPositiveAndNegativeExamples(); model.setLearningProblem(); model.setLearningAlgorithm(); view.getRunButton().setEnabled(false); view.renderErrorMessage("learning started"); - //view.getPosAndNegSelectPanel().setCheckBoxesEnable(false); retriever = new SuggestionRetriever(); retriever.execute(); @@ -132,7 +127,6 @@ } String message = "class description added"; view.renderErrorMessage(message); - view.updateWindow(); } if (z.getActionCommand().equals("")) { if (!toggled) { @@ -302,14 +296,6 @@ private Thread dlLearner; private DefaultListModel dm = new DefaultListModel(); - /** - * Errorlogger. - */ - //Logger logger = Logger.getLogger(SuggestionRetriever.class); - /** - * Errorlogger. - */ - //Logger rootLogger = Logger.getRootLogger(); @SuppressWarnings("unchecked") @Override @@ -321,8 +307,7 @@ @Override public void run() { if (la != null) { - publish(la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts() - , view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(), true)); + publish(la.getCurrentlyBestEvaluatedDescriptions(view.getPosAndNegSelectPanel().getOptionPanel().getNrOfConcepts(), view.getPosAndNegSelectPanel().getOptionPanel().getMinAccuracy(), true)); } } @@ -382,7 +367,6 @@ private void updateList(final List<? extends EvaluatedDescription> result) { - //logger.debug("update list with " + result); Runnable doUpdateList = new Runnable() { @@ -396,12 +380,13 @@ Set<String> ont = model.getOntologyURIString(); for(String ontology : ont) { if(eval.getDescription().toString().contains(ontology)) { + //dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); if(model.isConsistent(eval)) { - dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionPosNeg)eval).getAccuracy()*100)); + dm.add(i, new SuggestListItem(colorGreen, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); i++; break; } else { - dm.add(i, new SuggestListItem(colorRed, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionPosNeg)eval).getAccuracy()*100)); + dm.add(i, new SuggestListItem(colorRed, eval.getDescription().toManchesterSyntaxString(ontology, null), ((EvaluatedDescriptionClass)eval).getAccuracy()*100)); i++; view.setIsInconsistent(true); break; Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -19,6 +19,7 @@ */ package org.dllearner.tools.protege; +import org.protege.editor.owl.OWLEditorKit; import org.protege.editor.owl.ui.frame.AbstractOWLFrame; import org.protege.editor.owl.ui.frame.InheritedAnonymousClassesFrameSection; import org.protege.editor.owl.ui.frame.OWLClassAssertionAxiomIndividualSection; @@ -26,7 +27,6 @@ //import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSection; //import org.protege.editor.owl.ui.frame.OWLSubClassAxiomFrameSection; import org.semanticweb.owl.model.OWLClass; -import org.protege.editor.owl.OWLEditorKit; /** * This class manages the list of the lists for equivalent classes and so on. @@ -39,6 +39,7 @@ public class ButtonList extends AbstractOWLFrame<OWLClass> { private OWLEquivalentClassesAxiomFrameSection equi; private OWLSubClassAxiomFrameSection sub; + //private DLLearnerView view; /** * Constructor of the Buttonlist. * @@ -48,6 +49,11 @@ super(editorKit.getModelManager().getOWLOntologyManager()); equi = new OWLEquivalentClassesAxiomFrameSection(editorKit, this); + //view = new DLLearnerView(equi.getName(), editorKit); + //OWLFrameSectionRowObjectEditor<OWLDescription> edit = equi.getObjectEditor(); + //OWLClassDescriptionEditor ed = (OWLClassDescriptionEditor)edit; + //ed.addPanel(view); + //equi.getEditor().getEditorComponent().validate(); sub = new OWLSubClassAxiomFrameSection(editorKit, this); // own OWLEquivalentClassesAxiomFrameSection to add the dllearner plugin // to the Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -24,14 +24,12 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; import java.util.Vector; import javax.swing.DefaultListModel; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; -import org.dllearner.algorithms.refinement2.ROLComponent2; +import org.dllearner.algorithms.EvaluatedDescriptionClass; +import org.dllearner.algorithms.celoe.CELOE; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedDescription; @@ -42,19 +40,15 @@ import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; import org.dllearner.core.owl.NamedClass; -import org.dllearner.core.owl.Thing; import org.dllearner.kb.OWLAPIOntology; -import org.dllearner.learningproblems.PosNegInclusionLP; -import org.dllearner.learningproblems.PosNegLPStandard; +import org.dllearner.learningproblems.ClassLearningProblem; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; import org.mindswap.pellet.exceptions.InconsistentOntologyException; import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.OWLFrame; import org.semanticweb.owl.apibinding.OWLManager; import org.semanticweb.owl.model.AddAxiom; import org.semanticweb.owl.model.OWLAxiom; -import org.semanticweb.owl.model.OWLClass; import org.semanticweb.owl.model.OWLDataFactory; import org.semanticweb.owl.model.OWLDescription; import org.semanticweb.owl.model.OWLOntology; @@ -76,11 +70,9 @@ "org.dllearner.reasoning.OWLAPIReasoner", "org.dllearner.reasoning.FastInstanceChecker", "org.dllearner.reasoning.FastRetrievalReasoner", - "org.dllearner.learningproblems.PosNegInclusionLP", - "org.dllearner.learningproblems.PosNegDefinitionLP", "org.dllearner.algorithms.RandomGuesser", "org.dllearner.algorithms.refinement.ROLearner", - "org.dllearner.algorithms.refinement2.ROLComponent2", + "org.dllearner.algorithms.celoe.CELOE", "org.dllearner.algorithms.gp.GP", "org.dllearner.learningproblems.PosOnlyLP", "org.dllearner.learningproblems.PosNegLPStandard", "org.dllearner.learningproblems.ClassLearningProblem"}; @@ -88,22 +80,15 @@ private ComponentManager cm; - // The Reasoning Service for the Reasoner - - //private ReasonerComponent rs; private static final String EQUIVALENT_CLASS_AXIOM_STRING = "Suggest equivalent class"; private static final String SUPER_CLASS_AXIOM_STRING = "Suggest super class"; + private static final String EQUIVALENT_CLASS_LEARNING = "equivalence"; + private static final String SUPER_CLASS_LEARNING = "superClass"; // The View of the DL-Learner Plugin private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; - // This is the count of Concepts which you get after learning - - // A Array of Concepts which the DL-Learner suggested - - //private Description[] description; - // The Learning problem that is used to learn new concepts private LearningProblem lp; @@ -112,10 +97,6 @@ private boolean alreadyLearned = false; - // The Ontology which is currently used - - //private OWLOntology ontology; - // This is the learning algorithm private LearningAlgorithm la = null; @@ -124,10 +105,6 @@ private OWLEditorKit editor; - // Necessary to get the BaseUri of the currently loaded Ontology - - private OWLFrame<OWLClass> current; - // The Reasoner which is used to learn private FastInstanceChecker reasoner; @@ -136,14 +113,6 @@ private Set<OWLDescription> owlDescription; - // This set stores the positive examples. - - private Set<String> positiveExamples; - - // This set stores the negative examples that doesn't belong to the concept. - - private Set<String> negativeExamples; - // The most fitting Description in OWL Syntax which the DL-Learner suggested private OWLDescription desc; @@ -172,6 +141,7 @@ private Set<Individual> individual; private Set<OWLAPIOntology> ontologies; + private int instancesCount; // The error message which is rendered when an error occured @@ -182,7 +152,6 @@ // This is necessary to get the details of the suggested concept - //private JXTaskPane detailPane; private DefaultListModel posListModel; private DefaultListModel negListModel; private Set<KnowledgeSource> sources; @@ -191,7 +160,6 @@ private Vector<IndividualObject> individualVector; private Set<String> ontologieURI; private boolean ontologyConsistent; - //private String learning; // This is a List of evaluated descriptions to get more information of the // suggested concept @@ -209,15 +177,12 @@ * @param view * current view of the DL-Learner tab */ - public DLLearnerModel(OWLEditorKit editorKit, OWLFrame<OWLClass> h, - String id, - OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view) { + public DLLearnerModel(OWLEditorKit editorKit, String id, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view) { editor = editorKit; - current = h; this.id = id; this.view = view; ontologyConsistent = true; - //learning = ""; + instancesCount = 0; owlDescription = new HashSet<OWLDescription>(); posListModel = new DefaultListModel(); negListModel = new DefaultListModel(); @@ -227,8 +192,6 @@ ds = new HashSet<OWLDescription>(); suggestModel = new DefaultListModel(); ontologieURI = new HashSet<String>(); - //detailPane = new JXTaskPane(); - //detailPane.setTitle("Details"); sources = new HashSet<KnowledgeSource>(); } @@ -244,24 +207,6 @@ } /** - * This method checks which positive and negative examples are checked and - * puts the checked examples into a tree set. - */ - public void setPositiveAndNegativeExamples() { - positiveExamples = new TreeSet<String>(); - negativeExamples = new TreeSet<String>(); - for (int i = 0; i < individualVector.size(); i++) { - if (individualVector.get(i).isPositiveExample()) { - positiveExamples.add(individualVector.get(i) - .getIndividualString()); - } else { - negativeExamples.add(individualVector.get(i) - .getIndividualString()); - } - } - } - - /** * This method returns the data for the suggest panel. * * @return Model for the suggest panel. @@ -338,26 +283,18 @@ * classes. */ public void setLearningProblem() { + lp = cm.learningProblem(ClassLearningProblem.class, reasoner); + cm.applyConfigEntry(lp, "classToDescribe", currentConcept.toString()); if (id.equals(EQUIVALENT_CLASS_AXIOM_STRING)) { // sets the learning problem to PosNegDefinitionLP when the // dllearner should suggest an equivalent class - lp = cm.learningProblem(PosNegLPStandard.class, reasoner); - //learning = "equivalence"; + cm.applyConfigEntry(lp, "type", EQUIVALENT_CLASS_LEARNING); } if (id.equals(SUPER_CLASS_AXIOM_STRING)) { // sets the learning problem to PosNegInclusionLP when the dllearner // should suggest a subclass - //Slearning = "superClass"; - lp = cm.learningProblem(PosNegInclusionLP.class, reasoner); + cm.applyConfigEntry(lp, "type", SUPER_CLASS_LEARNING); } - System.out.println("CURRENT: " + currentConcept); - //lp = cm.learningProblem(ClassLearningProblem.class, reasoner); - //cm.applyConfigEntry(lp, "classToDescribe", currentConcept); - //cm.applyConfigEntry(lp, "type", learning); - // adds the positive examples - cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); - // adds the negative examples - cm.applyConfigEntry(lp, "negativeExamples", negativeExamples); try { lp.init(); } catch (ComponentInitException e) { @@ -370,32 +307,14 @@ */ public void setLearningAlgorithm() { try { - // sets the learning algorithm to ROlearner - this.la = cm.learningAlgorithm(ROLComponent2.class, lp, + this.la = cm.learningAlgorithm(CELOE.class, lp, reasoner); } catch (LearningProblemUnsupportedException e) { // TODO Auto-generated catch block e.printStackTrace(); } - Set<String> ignore = new TreeSet<String>(); - ignore.add(currentConcept.toString()); - if(id.equals(SUPER_CLASS_AXIOM_STRING)) { - Description currentClass = (Description) currentConcept; - while(!(currentClass instanceof Thing)) { - SortedSet<Description> superClasses = reasoner.getSuperClasses(currentClass); - for(Description ignoredClass : superClasses) { - if(!(ignoredClass instanceof Thing)) { - ignore.add(ignoredClass.toString()); - } - currentClass = ignoredClass; - } - } - cm.applyConfigEntry(la, "useNegation", false); - } - cm.applyConfigEntry(la, "ignoredConcepts", ignore); + cm.applyConfigEntry(la, "useNegation", false); cm.applyConfigEntry(la, "noisePercentage", 5.0); - cm.applyConfigEntry(la, "terminateOnNoiseReached", false); - cm.applyConfigEntry(la, "negationPenalty", 2); cm.applyConfigEntry(la, "maxExecutionTimeInSeconds", view .getPosAndNegSelectPanel().getOptionPanel() .getMaxExecutionTime()); @@ -423,42 +342,7 @@ public void run() { la.start(); } - /** - * This method sets the check boxes for the positive check boxes checked if - * the individuals matches the concept that is chosen in protege. - */ - public void setPosVector() { - setPositiveConcept(); - SortedSet<Individual> reasonerIndi = reasoner.getIndividuals(); - for(Individual ind : reasonerIndi) { - Set<String> onto = ontologieURI; - for(String ont : onto) { - String indiv = ind.toString(); - // checks if individual belongs to the selected concept - if (setPositivExamplesChecked(indiv)) { - if (indiv.contains(ont)) { - // when yes then it sets the positive example checked - // OWLExpressionCheckerFactory - posListModel.add(0, ind.toManchesterSyntaxString(ont, null)); - individualVector.add(new IndividualObject(indiv, true)); - break; - } - - } else { - // When no it unchecks the positive example - if (indiv.contains(ont)) { - individualVector - .add(new IndividualObject(indiv, false)); - negListModel.add(0, ind.toManchesterSyntaxString(ont, null)); - break; - } - } - } - } - - } - /** * This method resets the Concepts that are learned. */ @@ -478,54 +362,11 @@ } /** - * This method sets the individuals that belong to the concept which is - * chosen in protege. - */ - public void setPositiveConcept() { - SortedSet<Individual> individuals = null; - hasIndividuals = false; - // checks if selected concept is thing when yes then it selects all - // individuals - if (!(current.getRootObject() instanceof Thing)) { - List<NamedClass> classList = reasoner.getAtomicConceptsList(); - for(NamedClass concept : classList) { - // if individuals is null - if (individuals == null) { - // checks if the concept is the selected concept in protege - for(String onto : ontologieURI) { - if (concept.toString().contains(onto)) { - if (concept.toString().equals( - onto + current.getRootObject().toString())) { - // if individuals is not null it gets all - // individuals of - // the concept - currentConcept = concept; - if (reasoner.getIndividuals(concept) != null) { - if (reasoner.getIndividuals(concept).size() > 0) { - hasIndividuals = true; - } - individual = reasoner.getIndividuals(concept); - break; - } - } - } - } - } - } - } else { - if (reasoner.getIndividuals().size() > 0) { - hasIndividuals = true; - } - individual = reasoner.getIndividuals(); - } - } - - /** * This method sets the positive examples for learning. * @param ind */ public void setIndividuals(Set<Individual> ind) { - this.individual = ind; + individual = ind; } /** @@ -554,28 +395,6 @@ } /** - * This method gets an Individual and checks if this individual belongs to - * the concept chosen in protege. - * - * @param indi - * Individual to check if it belongs to the chosen concept - * @return is Individual belongs to the concept which is chosen in protege. - */ - private boolean setPositivExamplesChecked(String indi) { - boolean isChecked = false; - // checks if individuals are not empty - if (individual != null) { - // checks if the delivered individual belongs to the individuals of - // the selected concept - if (individual.toString().contains(indi)) { - isChecked = true; - } - } - return isChecked; - - } - - /** * This method resets the vectors where the check boxes for positive and * negative Examples are stored. It is called when the DL-Learner View is * closed. @@ -658,15 +477,6 @@ } /** - * This method returns the current OWLOntology that is loaded in protege. - * - * @return current ontology - - public OWLOntology getOWLOntology() { - return ontology; - } */ - - /** * This method returns a set of concepts that are learned by the DL-Learner. * They are already converted into the OWLDescription format. * @@ -687,7 +497,10 @@ .getOWLDescription(currentConcept); return oldConceptOWLAPI; } - + + public Set<OWLDescription> getDescriptions() { + return ds; + } /** * This method returns the currently learned description in OWLDescription * format. @@ -757,15 +570,6 @@ } /** - * This method returns the currently used reasoning service. - * - * @return current reasoning service - - public ReasonerComponent getReasonerComponent() { - return rs; - }*/ - - /** * This method gets the status if the DL-Learner has already learned. It is * only for reseting the suggest panel. * @@ -785,10 +589,10 @@ */ public boolean isConsistent(EvaluatedDescription eDescription) { boolean isConsistent = false; - if (((EvaluatedDescriptionPosNeg)eDescription).getNotCoveredPositives().isEmpty()) { - isConsistent = true; - } else { + if (((EvaluatedDescriptionClass)eDescription).getCoveredInstances().size() < instancesCount) { isConsistent = false; + } else { + isConsistent = true; } return isConsistent; } @@ -839,28 +643,6 @@ } /** - * Checks the URI if a "#" is in it. - */ - public void checkURI() { - Set<OWLOntology> ont = editor.getModelManager().getActiveOntologies(); - Set<Individual> indi = reasoner.getIndividuals(); - for(OWLOntology onto : ont) { - String ontURI = onto.getURI().toString(); - for(Individual ind : indi) { - if(ind.toString().contains(ontURI)) { - if(ind.toString().contains("#")) { - ontologieURI.add(onto.getURI().toString()+"#"); - break; - } else { - ontologieURI.add(onto.getURI().toString()); - break; - } - } - } - } - } - - /** * This method returns the Strings of the Ontology uri's that are currently used. * @return ontologieURI */ @@ -907,6 +689,17 @@ this.currentConcept = current; } + /** + * @return the individual + */ + public Set<Individual> getIndividual() { + return individual; + } + + public void setInstancesCount(int i) { + instancesCount = i; + } + } Added: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerView.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -0,0 +1,415 @@ +package org.dllearner.tools.protege; + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; +import java.awt.event.ActionListener; +import java.net.URL; +import java.util.Set; + +import javax.swing.ImageIcon; +import javax.swing.JButton; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextArea; +import javax.swing.JToggleButton; + +import org.protege.editor.core.ui.util.InputVerificationStatusChangedListener; +import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.editor.OWLDescriptionEditor; +import org.semanticweb.owl.model.OWLDescription; + +public class DLLearnerView extends JPanel implements OWLDescriptionEditor{ + + + private static final long serialVersionUID = 624829578325729385L; + //private OWLClassDescriptionEditorWithDLLearnerTab mainWindow; + // this is the Component which shows the view of the dllearner + private static final String TITLE = "DL-Learner"; + private JComponent learner; + + // Accept button to add the learned concept to the owl + + private JButton accept; + + // Runbutton to start the learning algorithm + + private JButton run; + + // This is the label for the advanced button. + + private JLabel adv; + + // This is the color for the error message. It is red. + + private final Color colorRed = Color.red; + + // This is the text area for the error message when an error occurred + + private JTextArea errorMessage; + + // Advanced Button to activate/deactivate the example select panel + + private JToggleButton advanced; + + // Action Handler that manages the Button actions + + private ActionHandler action; + + // This is the model of the dllearner plugin which includes all data + + private DLLearnerModel model; + + // Panel for the suggested concepts + + private SuggestClassPanel sugPanel; + + // Selection panel for the positive and negative examples + + private PosAndNegSelectPanel posPanel; + + // Picture for the advanced button when it is not toggled + + private ImageIcon icon; + + // Picture of the advanced button when it is toggled + private JPanel addButtonPanel; + private JLabel wikiPane; + private ImageIcon toggledIcon; + private JTextArea hint; + private boolean isInconsistent; + // This is the Panel for more details of the suggested concept + private MoreDetailForSuggestedConceptsPanel detail; + //private OWLFrame<OWLClass> frame; + private ReadingOntologyThread readThread; + //private OWLEditorKit editorKit; + + /** + * The constructor for the DL-Learner tab in the class description + * editor. + * + * @param current OWLFrame + * @param label String + * @param dlLearner OWLClassDescriptionEditorWithDLLearnerTab + */ + public DLLearnerView(String label, OWLEditorKit editor) { + //mainWindow = dlLearner; + //editorKit = editor; + wikiPane = new JLabel("<html>See <a href=\"http://dl-learner.org/wiki/ProtegePlugin\">http://dl-learner.org/wiki/ProtegePlugin</a> for an introduction.</html>"); + URL iconUrl = this.getClass().getResource("arrow.gif"); + icon = new ImageIcon(iconUrl); + URL toggledIconUrl = this.getClass().getResource("arrow2.gif"); + toggledIcon = new ImageIcon(toggledIconUrl); + //model = new DLLearnerModel(editorKit, label, this); + sugPanel = new SuggestClassPanel(); + //action = new ActionHandler(this.action, model, this, label); + adv = new JLabel("Advanced Settings"); + advanced = new JToggleButton(icon); + advanced.setVisible(true); + run = new JButton(label); + accept = new JButton("ADD"); + addButtonPanel = new JPanel(new BorderLayout()); + sugPanel.addSuggestPanelMouseListener(action); + errorMessage = new JTextArea(); + errorMessage.setEditable(false); + hint = new JTextArea(); + hint.setEditable(false); + hint.setText("To get suggestions for class descriptions, please click the button above."); + learner = new JPanel(); + advanced.setSize(20, 20); + learner.setLayout(null); + learner.setPreferredSize(new Dimension(600, 520)); + accept.setPreferredSize(new Dimension(290, 50)); + advanced.setName("Advanced"); + //posPanel = new PosAndNegSelectPanel(model, action, this); + addAcceptButtonListener(this.action); + addRunButtonListener(this.action); + addAdvancedButtonListener(this.action); + + + } + /** + * This method returns the SuggestClassPanel. + * @return SuggestClassPanel + */ + public SuggestClassPanel getSuggestClassPanel() { + return sugPanel; + } + /** + * This method returns the PosAndNegSelectPanel. + * @return PosAndNegSelectPanel + */ + public PosAndNegSelectPanel getPosAndNegSelectPanel() { + return posPanel; + } + + /** + * Returns the Mainwindow where the Plugin is integratet. + * @return OWLClassDescriptionWithDLLearnerTab MainWindow + */ + //public OWLClassDescriptionEditorWithDLLearnerTab getMainWindow() { + // return mainWindow; + //} + /** + * This Method renders the view of the plugin. + */ + public void makeView() { + run.setEnabled(false); + model.clearVector(); + hint.setText("To get suggestions for class descriptions, please click the button above."); + isInconsistent = false; + //readThread = new ReadingOntologyThread(editorKit, this, model); + readThread.start(); + //TODO: runbutton wird auf enable gesetzt obwohl keine instanzdaten vorhanden sind. + + hint.setVisible(true); + advanced.setIcon(icon); + accept.setEnabled(false); + action.resetToggled(); + addButtonPanel.add("North", accept); + sugPanel.setSuggestList(model.getSuggestList()); + sugPanel = sugPanel.updateSuggestClassList(); + advanced.setSelected(false); + sugPanel.setBounds(10, 35, 490, 110); + adv.setBounds(40, 200, 200, 20); + wikiPane.setBounds(220, 0, 350, 30); + addButtonPanel.setBounds(510, 40, 80, 110); + run.setBounds(10, 0, 200, 30); + advanced.setBounds(10, 200, 20, 20); + sugPanel.setVisible(true); + posPanel.setVisible(false); + //posPanel.getAddToNegPanelButton().setEnabled(false); + //posPanel.getAddToPosPanelButton().setEnabled(false); + posPanel.setBounds(10, 230, 490, 250); + accept.setBounds(510, 40, 80, 110); + hint.setBounds(10, 150, 490, 35); + errorMessage.setBounds(10, 180, 490, 20); + learner.add(run); + learner.add(wikiPane); + learner.add(adv); + learner.add(advanced); + learner.add(sugPanel); + learner.add(addButtonPanel); + learner.add(hint); + learner.add(errorMessage); + learner.add(posPanel); + detail = new MoreDetailForSuggestedConceptsPanel(model); + add(learner); + + } + /** + * This method sets the right icon for the advanced Panel. + * @param toggled boolean + */ + public void setIconToggled(boolean toggled) { + if (toggled) { + advanced.setIcon(toggledIcon); + } + if (!toggled) { + advanced.setIcon(icon); + } + } + + /** + * This Method changes the hint message. + * @param message String hintmessage + */ + public void setHintMessage(String message) { + hint.setText(message); + } + public JTextArea getHintPanel() { + return hint; + } + /** + * This Method returns the DL_Learner tab. + * @return JComponent + */ + public JComponent getLearnerPanel() { + return learner; + } + + /** + * Sets the panel to select/deselect the examples visible/invisible. + * @param visible boolean + */ + public void setExamplePanelVisible(boolean visible) { + posPanel.setVisible(visible); + } + + /** + * Returns nothing. + * @return null + */ + public JPanel getOptionPanel() { + return null; + } + + /** + * Returns the AddButton. + * @return JButton + */ + public JButton getAddButton() { + return accept; + } + /** + * This Method updates the the view of protege after + * adding a new concept. + */ + //public void updateWindow() { + // mainWindow.getHandler().handleEditingFinished(mainWindow.getEditedObjects()); + //} + /** + * Returns all added descriptions. + * @return Set(OWLDescription) + */ + public Set<OWLDescription> getSollutions() { + + return model.getNewOWLDescription(); + } + + /** + * Returns the last added description. + * @return OWLDescription + */ + public OWLDescription getSollution() { + return model.getSolution(); + } + + /** + * Destroys everything in the view after the plugin is closed. + */ + public void unsetEverything() { + run.setEnabled(true); + model.unsetNewConcepts(); + action.destroyDLLearnerThread(); + errorMessage.setText(""); + //posPanel.unsetPosAndNegPanel(); + learner.removeAll(); + } + + /** + * Renders the error message when an error occured. + * @param s String + */ + public void renderErrorMessage(String s) { + errorMessage.setForeground(colorRed); + errorMessage.setText(s); + } + /** + * This Method returns the panel for more details for the chosen concept. + * @return MoreDetailForSuggestedConceptsPanel + */ + public MoreDetailForSuggestedConceptsPanel getMoreDetailForSuggestedConceptsPanel() { + return detail; + } + + /** + * This Method returns the run button. + * @return JButton + */ + public JButton getRunButton() { + return run; + } + + /** + * This method sets if ontology is inconsistent or not. + * @param isIncon boolean if ontology is consisten + */ + public void setIsInconsistent(boolean isIncon) { + this.isInconsistent = isIncon; + } + /** + * Destroys the view after the plugin is closed. + */ + @Override + public void dispose() { + run.removeActionListener(action); + accept.removeActionListener(action); + advanced.removeActionListener(action); + //posPanel.removeListeners(action); + //posPanel.removeHelpButtonListener(action); + } + + /** + * Adds Actionlistener to the run button. + * @param a ActionListener + */ + public void addRunButtonListener(ActionListener a) { + run.addActionListener(a); + } + + /** + * Adds Actionlistener to the add button. + * @param a ActionListener + */ + public void addAcceptButtonListener(ActionListener a) { + accept.addActionListener(a); + } + + /** + * Adds Actionlistener to the advanced button. + * @param a ActionListener + */ + public void addAdvancedButtonListener(ActionListener a) { + advanced.addActionListener(a); + } + + /** + * This method sets the run button enable after learning. + */ + public void algorithmTerminated() { + String error = "learning succesful"; + String message = ""; + if(isInconsistent) { + message = "Class descriptions marked red will lead to an inconsistent ontology. \nPlease double click on them to view detail information."; + } else { + message = "To view details about why a class description was suggested, please doubleclick on it."; + } + run.setEnabled(true); + // start the algorithm and print the best concept found + renderErrorMessage(error); + setHintMessage(message); + } + + @Override + public JComponent getComponent() { + return this; + } + + @Override + public Set<OWLDescription> getDescriptions() { + return model.getDescriptions(); + } + + @Override + public String getEditorName() { + return TITLE; + } + + @Override + public boolean isValidInput() { + return true; + } + + @Override + public boolean setDescription(OWLDescription arg0) { + // TODO Auto-generated method stub + return true; + } + + @Override + public void addStatusChangedListener( + InputVerificationStatusChangedListener arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void removeStatusChangedListener( + InputVerificationStatusChangedListener arg0) { + // TODO Auto-generated method stub + + } + +} Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -10,7 +10,7 @@ import javax.swing.JPanel; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; +import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.owl.Individual; @@ -22,7 +22,7 @@ private static final int maxNumberOfIndividualPoints = 20; private static final int gap = 20; private int shiftXAxis; - private int distortion; + private int distortionOld; private Ellipse2D oldConcept; private Ellipse2D newConcept; @@ -31,9 +31,9 @@ private String conceptNew; private Vector<IndividualPoint> posCovIndVector; private Vector<IndividualPoint> posNotCovIndVector; - private Vector<IndividualPoint> negCovIndVector; private Vector<IndividualPoint> points; private GraphicalCoveragePanelHandler handler; + private int adjustment; private MoreDetailForSuggestedConceptsPanel panel; /** @@ -50,14 +50,12 @@ conceptNew = concept; posCovIndVector = new Vector<IndividualPoint>(); posNotCovIndVector = new Vector<IndividualPoint>(); - negCovIndVector = new Vector<IndividualPoint>(); points = new Vector<IndividualPoint>(); this.computeGraphics(); handler = new GraphicalCoveragePanelHandler(this); - oldConcept = new Ellipse2D.Float(5, 25, 250, 250); - newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width+distortion, height+distortion); + oldConcept = new Ellipse2D.Float(5, 25+adjustment, width-distortionOld, height-distortionOld); + newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width, height); this.computeIndividualPoints(); - //this.addMouseListener(handler); this.addMouseMotionListener(handler); this.addPropertyChangeListener(handler); } @@ -73,15 +71,15 @@ protected void paintComponent(Graphics g) { Graphics2D g2D; g2D = (Graphics2D) g; - + g2D.setColor(Color.GREEN); + g2D.draw (oldConcept); + g2D.drawString(model.getOldConceptOWLAPI().toString(), 10, 15); g2D.setColor(Color.RED); g2D.draw (newConcept); - //g.drawOval((5+shiftXAxis), 25, width+distortion, height+distortion); g2D.drawString(conceptNew, 10 + width, 15); - g2D.setColor(Color.GREEN); - g2D.draw (oldConcept); - g2D.drawString(model.getOldConceptOWLAPI().toString(), 10, 15); + + for(int i = 0; i < posCovIndVector.size(); i++) { g2D.setColor(Color.BLACK); g2D.drawString(posCovIndVector.get(i).getPoint(), posCovIndVector.get(i).getXAxis(), posCovIndVector.get(i).getYAxis()); @@ -91,123 +89,138 @@ g2D.setColor(Color.BLACK); g2D.drawString(posNotCovIndVector.get(i).getPoint(), posNotCovIndVector.get(i).getXAxis(), posNotCovIndVector.get(i).getYAxis()); } - - for(int i = 0; i < negCovIndVector.size(); i++) { - g2D.setColor(Color.BLACK); - g2D.drawString(negCovIndVector.get(i).getPoint(), negCovIndVector.get(i).getXAxis(), negCovIndVector.get(i).getYAxis()); - } } private void computeGraphics(){ - int posGes = model.getPosListModel().size(); - int notCovPos = ((EvaluatedDescriptionPosNeg)eval).getNotCoveredPositives().size(); - //int covNeg = ((EvaluatedDescriptionPosNeg)eval).getCoveredNegatives().size(); - //int negGes = model.getNegListModel().size(); - double notCov = notCovPos; - float shift = (float) (width*(notCov/posGes)); - shiftXAxis = Math.round(shift); - distortion = 0; - //if(shiftXAxis == 0) { - // distortion = Math.round((width*(covNeg/negGes))/4); - //} - + int add = ((EvaluatedDescriptionClass)eval).getAdditionalInstances().size(); + distortionOld = 0; + adjustment = 0; + double additional = ((EvaluatedDescriptionClass)eval).getAddition(); + double coverage = ((EvaluatedDescriptionClass)eval).getCoverage(); + shiftXAxis = (int) Math.round(width* (1-coverage)); + if(add != 0) { + distortionOld = (int) Math.round(width*additional); + newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width, height); + adjustment = (int) Math.round(newConcept.getCenterY()/4); + + } + } private void computeIndividualPoints() { - Set<Individual> posInd = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); + Set<Individual> posInd = ((EvaluatedDescriptionClass)eval).getCoveredInstances(); + int i = 0; double x = 20; double y = 20; + boolean flag = true; for(Individual ind : posInd) { + flag = true; if(i<maxNumberOfIndividualPoints) { - i++; - if(x >= oldConcept.getMaxX()) { - x = (int) oldConcept.getMinX(); - y = y + gap; - } + while(flag) { + if(x >= oldConcept.getMaxX()) { + x = (int) oldConcept.getMinX(); + y = y + gap; + } - if(y >= oldConcept.getMaxY()) { - y = (int) oldConcept.getMinY(); - } + if(y >= oldConcept.getMaxY()) { + y = (int) oldConcept.getMinY(); + } - if(x >= newConcept.getMaxX()) { - x = (int) newConcept.getMinX(); - y = y + gap; - } + if(x >= newConcept.getMaxX()) { + x = (int) newConcept.getMinX(); + y = y + gap; + } - if(y >= newConcept.getMaxY()) { - y = (int) newConcept.getMinY(); - } + if(y >= newConcept.getMaxY()) { + y = (int) newConcept.getMinY(); + } - while(x < newConcept.getMaxX()) { + while(x < newConcept.getMaxX()) { - if(newConcept.contains(x, y) && oldConcept.contains(x, y)) { - posCovIndVector.add(new IndividualPoint("+",(int)x,(int)y,ind.toString())); - x = x + gap; - break; - } else { - x = x + gap; + if(newConcept.contains(x, y) && oldConcept.contains(x, y)) { + posCovIndVector.add(new IndividualPoint("+",(int)x,(int)y,ind.toString())); + i++; + flag = false; + x = x + gap; + break; + } else { + x = x + gap; + } } } } } - Set<Individual> posNotCovInd = ((EvaluatedDescriptionPosNeg)eval).getNotCoveredPositives(); + Set<Individual> posNotCovInd = ((EvaluatedDescriptionClass)eval).getAdditionalInstances(); int j = 0; + x = 20; + y = 20; for(Individual ind : posNotCovInd) { + flag = true; if(j<maxNumberOfIndividualPoints) { - j++; - if(x >= oldConcept.getMaxX()) { - x = (int) oldConcept.getMinX(); - y = y + gap; - } + while(flag) { + if(x >= newConcept.getMaxX()) { + x = (int) oldConcept.getMinX(); + y = y + gap; + } - if(y >= oldConcept.getMaxY()) { - y = (int) oldConcept.getMinY(); - } + if(y >= newConcept.getMaxY()) { + y = (int) oldConcept.getMinY(); + } - while(x < oldConcept.getMaxX()) { + while(x < newConcept.getMaxX()) { - if(oldConcept.contains(x, y)&&!newConcept.contains(x, y)) { - posNotCovIndVector.add(new IndividualPoint("-",(int)x,(int)y,ind.toString())); - x = x + gap; - break; - } else { - x = x + gap; + if(!oldConcept.contains(x, y) && newConcept.contains(x, y)) { + posNotCovIndVector.add(new IndividualPoint("-",(int)x,(int)y,ind.toString())); + j++; + flag = false; + x = x + gap; + break; + } else { + x = x + gap; + } } } } } - Set<Individual> negCovInd = ((EvaluatedDescriptionPosNeg)eval).getCoveredNegatives(); + Set<Individual> notCovInd = model.getReasoner().getIndividuals(model.getCurrentConcept()); + notCovInd.removeAll(posInd); int k = 0; - for(Individual ind : negCovInd) { + x = 20; + y = 20; + for(Individual ind : notCovInd) { + flag = true; if(k<maxNumberOfIndividualPoints) { - k++; - if(x >= newConcept.getMaxX()) { - x = (int) newConcept.getMinX(); - y = y + gap; - } + while(flag) { + if(x >= oldConcept.getMaxX()) { + x = (int) oldConcept.getMinX(); + y = y + gap; + } - if(y >= newConcept.getMaxY()) { - y = (int) newConcept.getMinY(); - } + if(y >= oldConcept.getMaxY()) { + y = (int) oldConcept.getMinY(); + } - while(x < newConcept.getMaxX()) { - if(newConcept.contains(x, y) && !oldConcept.contains(x, y)) { - negCovIndVector.add(new IndividualPoint("o",(int)x,(int)y,ind.toString())); - x = x + gap; - break; - } else { - x = x + gap; + while(x < oldConcept.getMaxX()) { + + if(oldConcept.contains(x, y) && !newConcept.contains(x, y)) { + posNotCovIndVector.add(new IndividualPoint("-",(int)x,(int)y,ind.toString())); + k++; + flag = false; + x = x + gap; + break; + } else { + x = x + gap; + } } } } } points.addAll(posCovIndVector); points.addAll(posNotCovIndVector); - points.addAll(negCovIndVector); } public Vector<IndividualPoint> getIndividualVector() { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -31,9 +31,8 @@ import javax.swing.JTextArea; import javax.swing.WindowConstants; -import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; +import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.core.EvaluatedDescription; -import org.dllearner.core.owl.Individual; @@ -279,11 +278,11 @@ } //sets the accuracy of the concept - double acc = ((EvaluatedDescriptionPosNeg)eval).getAccuracy()*100; + double acc = ((EvaluatedDescriptionClass)eval).getAccuracy()*100; accuracyText.setText(String.valueOf(acc)+"%"); //Sets positive Covered Examples for the detail panel - Set<Individual> indi = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); + /*Set<Individual> indi = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); for(Individual ind : indi) { for(String ontology : ontologiesStrings) { if(ind.toString().contains(ontology)) { @@ -335,7 +334,7 @@ break; } } - } + }*/ } } } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -7,6 +7,7 @@ import javax.swing.JOptionPane; +import org.dllearner.algorithms.EvaluatedDescriptionClass; import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.owl.Individual; @@ -38,7 +39,8 @@ } if(a.getActionCommand().equals(NEW_BUTTON_LABEL)) { - Set<Individual> posInd = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); + Set<Individual> posInd = ((EvaluatedDescriptionClass)eval).getCoveredInstances(); + posInd.addAll(((EvaluatedDescriptionClass)eval).getAdditionalInstances()); Set<String> uri = model.getOntologyURIString(); String toolTip = "This are the Individuals beloning to\n "; for(String u : uri) { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -95,7 +95,7 @@ private ObjectRestrictionCreatorPanel restrictionCreatorPanel; - // private OWLDescription initialDescription; + //private OWLDescription initialDescription; private Set<InputVerificationStatusChangedListener> listeners = new HashSet<InputVerificationStatusChangedListener>(); @@ -114,12 +114,12 @@ public OWLClassDescriptionEditorWithDLLearnerTab(OWLEditorKit editorKit, OWLDescription description, OWLFrame<OWLClass> frame, String label) { this.editorKit = editorKit; - // this.initialDescription = description; - //checker = new OWLDescriptionChecker(editorKit); + //this.initialDescription = description; + //checker = new OWLDescriptionChecker(editorKit.getModelManager()); editor = new ExpressionEditor<OWLDescription>(editorKit, editorKit.getModelManager().getOWLExpressionCheckerFactory().getOWLDescriptionChecker()); editor.setExpressionObject(description); - action = new ActionHandler(this.action, null, dllearner, null); + action = new ActionHandler(this.action, null, dllearner, label); tabbedPane = new JTabbedPane(); tabbedPane.setFocusable(false); editingComponent = new JPanel(new BorderLayout()); @@ -380,7 +380,7 @@ icon = new ImageIcon(iconUrl); URL toggledIconUrl = this.getClass().getResource("arrow2.gif"); toggledIcon = new ImageIcon(toggledIconUrl); - model = new DLLearnerModel(editorKit, current, label, this); + model = new DLLearnerModel(editorKit, label, this); sugPanel = new SuggestClassPanel(); action = new ActionHandler(this.action, model, this, label); adv = new JLabel("Advanced Settings"); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -26,11 +26,11 @@ import java.util.Set; import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.AbstractOWLFrameSection; import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSectionRow; import org.protege.editor.owl.ui.frame.OWLFrame; import org.protege.editor.owl.ui.frame.OWLFrameSectionRow; import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; +import org.protege.editor.owl.ui.frame.cls.AbstractOWLClassAxiomFrameSection; import org.semanticweb.owl.inference.OWLReasonerException; import org.semanticweb.owl.inference.UnsupportedReasonerOperationException; import org.semanticweb.owl.model.AddAxiom; @@ -52,145 +52,147 @@ * Date: 19-Jan-2007<br> * <br> */ -public class OWLEquivalentClassesAxiomFrameSection - extends - AbstractOWLFrameSection<OWLClass, OWLEquivalentClassesAxiom, OWLDescription> { +public class OWLEquivalentClassesAxiomFrameSection extends AbstractOWLClassAxiomFrameSection<OWLEquivalentClassesAxiom, OWLDescription> { - private static final String LABEL = "equivalent classes"; + private static final String LABEL = "equivalent classes"; - private Set<OWLClass> added; + private Set<OWLDescription> added = new HashSet<OWLDescription>(); - private boolean inferredEquivalentClasses = true; - private OWLClassDescriptionEditorWithDLLearnerTab dlLearner; + private boolean inferredEquivalentClasses = true; + + private OWLFrame<OWLClass> frame; - private OWLFrame<OWLClass> frame; - /** - * Constructor of the OWLEquivalentClassesAxiomFrameSection. - * @param editorKit OWLEditorKit - * @param frame OWLFrame - */ - public OWLEquivalentClassesAxiomFrameSection(OWLEditorKit editorKit, - OWLFrame<OWLClass> frame) { - super(editorKit, LABEL, frame); - added = new HashSet<OWLClass>(); - this.frame = frame; - } - @Override - protected void clear() { - added.clear(); - } + public OWLEquivalentClassesAxiomFrameSection(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) { + super(editorKit, LABEL, "Equivalent class", frame); + this.frame = frame; + } - /** - * Refills the section with rows. This method will be called by the system - * and should be directly called. - * @param ontology OWLOntology - */ - @Override - protected void refill(OWLOntology ontology) { - for (OWLEquivalentClassesAxiom ax : ontology - .getEquivalentClassesAxioms(getRootObject())) { - addRow(new OWLEquivalentClassesAxiomFrameSectionRow( - getOWLEditorKit(), this, ontology, getRootObject(), ax)); - for (OWLDescription desc : ax.getDescriptions()) { - if (!desc.isAnonymous()) { - added.add(desc.asOWLClass()); - } - } - } - } - @Override - protected void refillInferred() { - if (!inferredEquivalentClasses) { - return; - } - try { - if (!getOWLModelManager().getReasoner().isSatisfiable( - getRootObject())) { - addRow(new OWLEquivalentClassesAxiomFrameSectionRow( - getOWLEditorKit(), this, null, getRootObject(), - getOWLDataFactory().getOWLEquivalentClassesAxiom( - CollectionFactory.createSet(getRootObject(), - getOWLModelManager() - .getOWLDataFactory() - .getOWLNothing())))); - return; - } - for (OWLClass cls : getOWLModelManager().getReasoner() - .getEquivalentClasses(getRootObject())) { - if (!added.contains(cls) && !cls.equals(getRootObject())) { - addRow(new OWLEquivalentClassesAxiomFrameSectionRow( - getOWLEditorKit(), this, null, getRootObject(), - getOWLDataFactory().getOWLEquivalentClassesAxiom( - CollectionFactory.createSet( - getRootObject(), cls)))); - } - } - } catch (UnsupportedReasonerOperationException e) { - inferredEquivalentClasses = false; - } catch (OWLReasonerException e) { - e.printStackTrace(); - } - } + protected void clear() { + added.clear(); + } - @Override - public void visit(OWLEquivalentClassesAxiom axiom) { - if (axiom.getDescriptions().contains(getRootObject())) { - reset(); - } - } - @Override - protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { - return getOWLDataFactory().getOWLEquivalentClassesAxiom( - CollectionFactory.createSet(getRootObject(), object)); - } + protected void addAxiom(OWLEquivalentClassesAxiom ax, OWLOntology ontology) { + addRow(new OWLEquivalentClassesAxiomFrameSectionRow(getOWLEditorKit(), + this, + ontology, + getRootObject(), + ax)); + for (OWLDescription desc : ax.getDescriptions()) { + added.add(desc); + } + } - @Override - public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { - // Own OWLClassDescriptionEditor to integrate the dllearner in protege - // This is to suggest equivalent classes - dlLearner = new OWLClassDescriptionEditorWithDLLearnerTab(getOWLEditorKit(), - null, frame, LABEL); - return dlLearner; - } - @Override - public boolean canAcceptDrop(List<OWLObject> objects) { - for (OWLObject obj : objects) { - if (!(obj instanceof OWLDescription)) { - return false; - } - } - return true; - } + protected Set<OWLEquivalentClassesAxiom> getClassAxioms(OWLDescription descr, OWLOntology ont) { + if (!descr.isAnonymous()){ + return ont.getEquivalentClassesAxioms(descr.asOWLClass()); + } + else{ + Set<OWLEquivalentClassesAxiom> axioms = new HashSet<OWLEquivalentClassesAxiom>(); + for (OWLAxiom ax : ont.getGeneralClassAxioms()){ + if (ax instanceof OWLEquivalentClassesAxiom && + ((OWLEquivalentClassesAxiom)ax).getDescriptions().contains(descr)){ + axioms.add((OWLEquivalentClassesAxiom)ax); + } + } + return axioms; + } + } - @Override - public boolean dropObjects(List<OWLObject> objects) { - List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); - for (OWLObject obj : objects) { - if (obj instanceof OWLDescription) { - OWLDescription desc = (OWLDescription) obj; - OWLAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom( - CollectionFactory.createSet(getRootObject(), desc)); - changes.add(new AddAxiom(getOWLModelManager() - .getActiveOntology(), ax)); - } else { - return false; - } - } - getOWLModelManager().applyChanges(changes); - return true; - } - /** - * Obtains a comparator which can be used to sort the rows in this section. - * - * @return A comparator if to sort the rows in this section, or - * <code>null</code> if the rows shouldn't be sorted. - */ - public Comparator<OWLFrameSectionRow<OWLClass, OWLEquivalentClassesAxiom, OWLDescription>> getRowComparator() { - return null; - } -} + protected void refillInferred() { + if (!inferredEquivalentClasses) { + return; + } + try { + if (!getOWLModelManager().getReasoner().isSatisfiable(getRootObject())) { + addRow(new OWLEquivalentClassesAxiomFrameSectionRow(getOWLEditorKit(), + this, + null, + getRootObject(), + getOWLDataFactory().getOWLEquivalentClassesAxiom( + CollectionFactory.createSet(getRootObject(), + getOWLModelManager().getOWLDataFactory().getOWLNothing())))); + } + else{ + for (OWLDescription cls : getOWLModelManager().getReasoner().getEquivalentClasses(getRootObject())) { + if (!added.contains(cls) && !cls.equals(getRootObject())) { + addRow(new OWLEquivalentClassesAxiomFrameSectionRow(getOWLEditorKit(), + this, + null, + getRootObject(), + getOWLDataFactory().getOWLEquivalentClassesAxiom( + CollectionFactory.createSet( + getRootObject(), + cls)))); + } + } + } + } + catch (UnsupportedReasonerOperationException e) { + inferredEquivalentClasses = false; + } + catch (OWLReasonerException e) { + e.printStackTrace(); + } + } + + + public void visit(OWLEquivalentClassesAxiom axiom) { + if (axiom.getDescriptions().contains(getRootObject())) { + reset(); + } + } + + + protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { + return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); + } + + + public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { + return new OWLClassDescriptionEditorWithDLLearnerTab(getOWLEditorKit(), null, frame, LABEL); + } + + + public boolean canAcceptDrop(List<OWLObject> objects) { + for (OWLObject obj : objects) { + if (!(obj instanceof OWLDescription)) { + return false; + } + } + return true; + } + + + public boolean dropObjects(List<OWLObject> objects) { + List<OWLOntologyChange> changes = new ArrayList<OWLOntologyChange>(); + for (OWLObject obj : objects) { + if (obj instanceof OWLDescription) { + OWLDescription desc = (OWLDescription) obj; + OWLAxiom ax = getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), + desc)); + changes.add(new AddAxiom(getOWLModelManager().getActiveOntology(), ax)); + } + else { + return false; + } + } + getOWLModelManager().applyChanges(changes); + return true; + } + + + /** + * Obtains a comparator which can be used to sort the rows + * in this section. + * @return A comparator if to sort the rows in this section, + * or <code>null</code> if the rows shouldn't be sorted. + */ + public Comparator<OWLFrameSectionRow<OWLDescription, OWLEquivalentClassesAxiom, OWLDescription>> getRowComparator() { + return null; + } +} \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2009-02-23 08:13:57 UTC (rev 1622) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLSubClassAxiomFrameSection.java 2009-02-23 16:07:10 UTC (rev 1623) @@ -26,8 +26,11 @@ import java.util.Set; import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.f... [truncated message content] |
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: <hee...@us...> - 2009-02-21 12:22:17
|
Revision: 1621 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1621&view=rev Author: heeroyuy Date: 2009-02-21 11:42:59 +0000 (Sat, 21 Feb 2009) Log Message: ----------- test for the bug report Added Paths: ----------- trunk/src/dl-learner/org/dllearner/test/ClassCastExceptionTest.java Added: trunk/src/dl-learner/org/dllearner/test/ClassCastExceptionTest.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/ClassCastExceptionTest.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/test/ClassCastExceptionTest.java 2009-02-21 11:42:59 UTC (rev 1621) @@ -0,0 +1,65 @@ +package org.dllearner.test; + +import java.io.File; +import java.net.MalformedURLException; + +import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; +import org.dllearner.algorithms.celoe.CELOE; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.EvaluatedDescription; +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.kb.OWLFile; +import org.dllearner.learningproblems.ClassLearningProblem; +import org.dllearner.reasoning.FastInstanceChecker; + +public class ClassCastExceptionTest { + + /** + * @param args + * @throws ComponentInitException + * @throws MalformedURLException + */ + public static void main(String[] args) throws ComponentInitException, MalformedURLException { + + // get singleton instance of component manager + ComponentManager cm = ComponentManager.getInstance(); + + // create knowledge source + KnowledgeSource source = cm.knowledgeSource(OWLFile.class); + String example = "examples/swore/swore.rdf"; + cm.applyConfigEntry(source, "url", new File(example).toURI().toURL()); + source.init(); + + // create OWL API reasoning service with standard settings + ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, source); + reasoner.init(); + + // create a learning problem and set positive and negative examples + + LearningProblem lp = cm.learningProblem(ClassLearningProblem.class, reasoner); + cm.applyConfigEntry(lp, "classToDescribe", "http://ns.softwiki.de/req/PerformanceRequirement"); + cm.applyConfigEntry(lp, "type", "equivalence"); + lp.init(); + + // create the learning algorithm + LearningAlgorithm la = null; + try { + la = cm.learningAlgorithm(CELOE.class, lp, reasoner); + cm.applyConfigEntry(la, "maxExecutionTimeInSeconds", 2); + la.init(); + } catch (LearningProblemUnsupportedException e) { + e.printStackTrace(); + } + + // start the algorithm and print the best concept found + la.start(); + System.out.println(la.getCurrentlyBestEvaluatedDescriptions(10, 0.8, true)); + EvaluatedDescription desc = la.getCurrentlyBestEvaluatedDescription(); + System.out.println("test: " + ((EvaluatedDescriptionPosNeg)desc).getNotCoveredPositives()); + } +} 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-20 10:56:08
|
Revision: 1619 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1619&view=rev Author: jenslehmann Date: 2009-02-20 10:56:04 +0000 (Fri, 20 Feb 2009) Log Message: ----------- - wrote a class which uses reasoning to minimize a given class description - reasoning results are cached to improve performance over time for many minimize operations - implementation passes simple unit test Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/owl/Description.java trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/test/junit/MinimizeTests.java trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java Modified: trunk/src/dl-learner/org/dllearner/core/owl/Description.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/Description.java 2009-02-19 15:25:44 UTC (rev 1618) +++ trunk/src/dl-learner/org/dllearner/core/owl/Description.java 2009-02-20 10:56:04 UTC (rev 1619) @@ -160,6 +160,11 @@ children.remove(child); } + public void replaceChild(int index, Description newChild) { + children.remove(index); + children.add(index, newChild); + } + /** * Tests whether this description is at the root, i.e. * does not have a parent. Added: trunk/src/dl-learner/org/dllearner/test/junit/MinimizeTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/MinimizeTests.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/test/junit/MinimizeTests.java 2009-02-20 10:56:04 UTC (rev 1619) @@ -0,0 +1,46 @@ +/** + * 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.test.junit; + +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.owl.Description; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.test.junit.TestOntologies.TestOntology; +import org.dllearner.utilities.owl.DescriptionMinimizer; +import org.junit.Test; + +/** + * Tests for minimizing class descriptions. + * + * @author Jens Lehmann + * + */ +public class MinimizeTests { + + @Test + public void minimizeTest1() throws ParseException { + ReasonerComponent reasoner = TestOntologies.getTestOntology(TestOntology.FATHER_OE); + DescriptionMinimizer minimizer = new DescriptionMinimizer(reasoner); + Description d = KBParser.parseConcept("(\"http://example.com/father#male\" AND (\"http://example.com/father#male\" OR EXISTS \"http://example.com/father#hasChild\".TOP))"); + Description minD = minimizer.minimize(d); + assert(minD.toString().equals("http://example.com/father#male")); + } +} Modified: trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-02-19 15:25:44 UTC (rev 1618) +++ trunk/src/dl-learner/org/dllearner/test/junit/TestOntologies.java 2009-02-20 10:56:04 UTC (rev 1619) @@ -19,11 +19,16 @@ */ package org.dllearner.test.junit; +import java.io.File; +import java.net.MalformedURLException; + import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; import org.dllearner.core.ReasonerComponent; import org.dllearner.core.owl.KB; import org.dllearner.kb.KBFile; +import org.dllearner.kb.OWLFile; import org.dllearner.parser.KBParser; import org.dllearner.parser.ParseException; import org.dllearner.reasoning.FastInstanceChecker; @@ -36,10 +41,11 @@ */ 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 }; + public enum TestOntology { EMPTY, SIMPLE, SIMPLE_NO_DR, SIMPLE_NO_DISJOINT, SIMPLE_NO_DR_DISJOINT, SIMPLE2, SIMPLE3, R1SUBR2, DATA1, FIVE_ROLES, FATHER_OE }; public static ReasonerComponent getTestOntology(TestOntology ont) { String kbString = ""; + String owlFile = ""; if(ont.equals(TestOntology.EMPTY)) { // no background knowledge @@ -103,22 +109,31 @@ kbString += "r3(a,b).\n"; kbString += "r4(a,b).\n"; kbString += "r5(a,b).\n"; + } else if(ont.equals(TestOntology.FATHER_OE)) { + owlFile = "examples/family/father_oe.owl"; } try { - KB kb = KBParser.parseKBFile(kbString); + ComponentManager cm = ComponentManager.getInstance(); + KnowledgeSource source; - // create reasoner - ComponentManager cm = ComponentManager.getInstance(); - KBFile source = new KBFile(kb); + // parse KB string if one has been specified + if(!kbString.isEmpty()) { + KB kb = KBParser.parseKBFile(kbString); + source = new KBFile(kb); + // parse OWL file otherwise + } else { + source = cm.knowledgeSource(OWLFile.class); + try { + cm.applyConfigEntry(source, "url", new File(owlFile).toURI().toURL()); + } catch (MalformedURLException e) { + e.printStackTrace(); + } + } + ReasonerComponent rc = cm.reasoner(FastInstanceChecker.class, source); -// ReasonerComponent rs = cm.reasoningService(rc); source.init(); rc.init(); - // TODO there shouldn't be a need to call this explicitly! - // (otherwise we get a NullPointerException, because the hierarchy is not created) -// rs.prepareSubsumptionHierarchy(); -// rs.prepareRoleHierarchy(); return rc; } catch(ParseException e) { e.printStackTrace(); Added: trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/DescriptionMinimizer.java 2009-02-20 10:56:04 UTC (rev 1619) @@ -0,0 +1,207 @@ +/** + * 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.owl; + +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; + +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Intersection; +import org.dllearner.core.owl.Negation; +import org.dllearner.core.owl.Nothing; +import org.dllearner.core.owl.ObjectAllRestriction; +import org.dllearner.core.owl.ObjectMaxCardinalityRestriction; +import org.dllearner.core.owl.ObjectMinCardinalityRestriction; +import org.dllearner.core.owl.ObjectSomeRestriction; +import org.dllearner.core.owl.Thing; +import org.dllearner.core.owl.Union; + +/** + * Rewrites a description to an equivalent shorter description. Note that + * minimizing is not a trivial operation and requires reasoning. The class + * keeps an internal cache on reasoning results, i.e. if similar descriptions + * are passed to the minimizer, then its performance will improve over time. + * + * @author Jens Lehmann + * + */ +public class DescriptionMinimizer { + + private ReasonerComponent reasoner; + private ConceptComparator conceptComparator = new ConceptComparator(); + private Map<Description,Map<Description,Boolean>> cachedSubclassOf = new TreeMap<Description,Map<Description,Boolean>>(conceptComparator); + + public DescriptionMinimizer(ReasonerComponent reasoner) { + this.reasoner = reasoner; + } + + /** + * Method which minimzes the input description. The algorithm does not + * replace subdescriptions with named classes, e.g. + * if the description "male \sqcap \exists hasChild.\top" is passed to the + * algorithm and a class "father" is defined in the obvious way + * in the background knowledge, then + * it will intentionally not return father. Instead, it preserves the + * existing structure of the description, but tries to detect and delete + * redundant parts within it. For instance, the description "male \sqcap + * father" is minimized to "father". + * + * @param description The description to minimize. + * @return Minimized description. + */ + public Description minimizeClone(Description description) { + Description descriptionToMinimize = description.clone(); + return minimize(descriptionToMinimize); + } + + /** + * Same as {@link #minimizeClone(Description)}, but with no guarantee that + * the input description remains unmodified. + * @see #minimizeClone(Description) + * @param description The description to minimize. + * @return Minimized description. + */ + public Description minimize(Description description) { + // minimize all children of the description + List<Description> children = description.getChildren(); + for(int i=0; i<children.size(); i++) { + description.replaceChild(i, minimize(children.get(i))); + } + // make a case distinction based on the structure of the description + // (note that we do not have to do anything for a number of cases: + // a named class, Thing, Nothing, hasValue restrictions, boolean + // value restrictions, double value restrictions) + if(children.size()==0) { + return description; + } else if(description instanceof ObjectSomeRestriction) { + // \exists r.\bot \equiv \bot + if(description.getChild(0) instanceof Nothing) { + return Nothing.instance; + } + return description; + } else if(description instanceof ObjectAllRestriction) { + // \forall r.\top \equiv \top + if(description.getChild(0) instanceof Thing) { + return Thing.instance; + } + return description; + } else if(description instanceof Negation) { + // \neg \bot \equiv \top + if(description.getChild(0) instanceof Nothing) { + return Thing.instance; + // \neg \top \equiv \bot + } else if(description.getChild(0) instanceof Thing) { + return Nothing.instance; + } + return description; + } else if(description instanceof ObjectMaxCardinalityRestriction) { + // <= n r.\bot \equiv \top + if(description.getChild(0) instanceof Nothing) { + return Thing.instance; + } + return description; + } else if(description instanceof ObjectMinCardinalityRestriction) { + // >= 0 r.C \equiv \top + int number = ((ObjectMinCardinalityRestriction)description).getNumber(); + if(number == 0) { + return Thing.instance; + } + // >= n r.\bot \equiv \bot if n != 0 + if(description.getChild(0) instanceof Nothing) { + return Nothing.instance; + } + return description; + } else if(description instanceof Intersection || description instanceof Union) { + List<Integer> toRemove = new LinkedList<Integer>(); + // intersection + if(description instanceof Intersection) { + // in an intersection, we have that D1 \sqcap D2 \equiv D1 if + // D1 \sqsubseteq D2; this means we first check whether the + // first element in a union is superclass of any other element in the + // union; if yes, then we delete it and proceed to the next element + for(int i=0; i<children.size(); i++) { + for(int j=0; j<children.size(); j++) { + if(i != j && isSubclassOf(children.get(j), children.get(i))) { + toRemove.add(i-toRemove.size()); + break; + } + } + } + // union + } else { + // in a union, we have that D1 \sqcup D2 \equiv D2 if + // D1 \sqsubseteq D2; this means we first check whether the + // first element in a union is subclass of any other element in the + // union; if yes, then we delete it and proceed to the next element + // (note the difference to intersection) + for(int i=0; i<children.size(); i++) { + for(int j=0; j<children.size(); j++) { + if(i != j && isSubclassOf(children.get(i), children.get(j))) { + toRemove.add(i-toRemove.size()); + break; + } + } + } + } + // if all elements are superfluous wrt. another element, then we need + // to keep at least one + if(toRemove.size() == children.size()) { + return children.get(0); + } else { + // remove all elements according to remove list + for(int pos : toRemove) { + children.remove(pos); + } + // dissolve intersection with only one element + if(children.size()==1) { + return children.get(0); + } + return description; + } + } else { + throw new Error("Cannot minimize description " + description + "."); + } + } + + private boolean isSubclassOf(Description d1, Description d2) { + // check whether we have cached this query + Map<Description,Boolean> tmp = cachedSubclassOf.get(d1); + Boolean tmp2 = null; + if(tmp != null) + tmp2 = tmp.get(d2); + + if(tmp2==null) { + Boolean result = reasoner.isSuperClassOf(d2, d1); + + // create new entry if necessary + Map<Description,Boolean> map1 = new TreeMap<Description,Boolean>(conceptComparator); + if(tmp == null) + cachedSubclassOf.put(d1, map1); + + cachedSubclassOf.get(d1).put(d2, result); + return result; + } else { + return tmp2; + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
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: <hee...@us...> - 2009-02-19 13:56:34
|
Revision: 1617 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1617&view=rev Author: heeroyuy Date: 2009-02-19 13:55:58 +0000 (Thu, 19 Feb 2009) Log Message: ----------- -added method to display all individuals belonging to the old class and the new learned class description Modified Paths: -------------- 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/MoreDetailForSuggestedConceptsPanel.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-19 12:32:54 UTC (rev 1616) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-19 13:55:58 UTC (rev 1617) @@ -191,7 +191,7 @@ private Vector<IndividualObject> individualVector; private Set<String> ontologieURI; private boolean ontologyConsistent; - private String learning; + //private String learning; // This is a List of evaluated descriptions to get more information of the // suggested concept @@ -217,7 +217,7 @@ this.id = id; this.view = view; ontologyConsistent = true; - learning = ""; + //learning = ""; owlDescription = new HashSet<OWLDescription>(); posListModel = new DefaultListModel(); negListModel = new DefaultListModel(); @@ -342,12 +342,12 @@ // sets the learning problem to PosNegDefinitionLP when the // dllearner should suggest an equivalent class lp = cm.learningProblem(PosNegLPStandard.class, reasoner); - learning = "equivalence"; + //learning = "equivalence"; } if (id.equals(SUPER_CLASS_AXIOM_STRING)) { // sets the learning problem to PosNegInclusionLP when the dllearner // should suggest a subclass - learning = "superClass"; + //Slearning = "superClass"; lp = cm.learningProblem(PosNegInclusionLP.class, reasoner); } System.out.println("CURRENT: " + currentConcept); @@ -713,7 +713,7 @@ owlDescription.add(newConceptOWLAPI); this.desc = newConceptOWLAPI; } - + /** * This methode returns the Model for the suggested Concepts. * Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-19 12:32:54 UTC (rev 1616) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-19 13:55:58 UTC (rev 1617) @@ -8,7 +8,6 @@ import java.util.Set; import java.util.Vector; -import javax.swing.JButton; import javax.swing.JPanel; import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; @@ -34,8 +33,6 @@ private Vector<IndividualPoint> posNotCovIndVector; private Vector<IndividualPoint> negCovIndVector; private Vector<IndividualPoint> points; - private JButton allPositiveIndividuals; - private JButton allNegativeIndividuals; private GraphicalCoveragePanelHandler handler; private MoreDetailForSuggestedConceptsPanel panel; @@ -59,12 +56,6 @@ handler = new GraphicalCoveragePanelHandler(this); oldConcept = new Ellipse2D.Float(5, 25, 250, 250); newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width+distortion, height+distortion); - allPositiveIndividuals = new JButton(); - //immer in der mitte und unten rauszubekommen mittels getMittelpunkt fuer x - //und getMaxY fuer y. - //allPositiveIndividuals.setBounds(arg0, arg1, arg2, arg3); - allNegativeIndividuals = new JButton(); - //allNegativeIndividuals.setBounds(arg0, arg1, arg2, arg3); this.computeIndividualPoints(); //this.addMouseListener(handler); this.addMouseMotionListener(handler); @@ -111,8 +102,8 @@ private void computeGraphics(){ int posGes = model.getPosListModel().size(); int notCovPos = ((EvaluatedDescriptionPosNeg)eval).getNotCoveredPositives().size(); - int covNeg = ((EvaluatedDescriptionPosNeg)eval).getCoveredNegatives().size(); - int negGes = model.getNegListModel().size(); + //int covNeg = ((EvaluatedDescriptionPosNeg)eval).getCoveredNegatives().size(); + //int negGes = model.getNegListModel().size(); double notCov = notCovPos; float shift = (float) (width*(notCov/posGes)); shiftXAxis = Math.round(shift); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-19 12:32:54 UTC (rev 1616) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-19 13:55:58 UTC (rev 1617) @@ -23,6 +23,7 @@ import java.awt.GridLayout; import java.util.Set; +import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; import javax.swing.JPanel; @@ -118,6 +119,9 @@ private static final int height = 500; private static final int width = 600; private GraphicalCoveragePanel p; + private JButton allPositiveIndividuals; + private JButton allNegativeIndividuals; + private MoreDetailForSuggestedConceptsPanelHandler handler; /** * This is the constructor for the Panel. * @param model DLLearnerModel @@ -127,8 +131,17 @@ setLayout(null); setPreferredSize(new Dimension(width, height)); this.model = model; + handler = new MoreDetailForSuggestedConceptsPanelHandler(model); + allPositiveIndividuals = new JButton("old"); + allPositiveIndividuals.setBounds(100, 400, 50, 30); + allPositiveIndividuals.addActionListener(handler); + allNegativeIndividuals = new JButton("new"); + allNegativeIndividuals.setBounds(400, 400, 50, 30); + allNegativeIndividuals.addActionListener(handler); + + } /** * This method returns the Detail Panel. @@ -137,7 +150,6 @@ public JDialog getMoreDialog() { return detailPopup; } - /** * This method renders the output for the detail panel. @@ -205,8 +217,8 @@ //panel for the informations of the selected concept //this method adds the informations for the selected concept to the panel setInformation(); - p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), width, height, this); - p.setBounds(5, 110, 600, 650); + p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), width, height-200, this); + p.setBounds(5, 110, 600, 300); detailPopup = new JDialog(); detailPopup.setSize(width, height); //window will be disposed if the x button is pressed @@ -228,6 +240,9 @@ add(conceptPanel); add(accuracyPanel); add(p); + add(allPositiveIndividuals); + add(allNegativeIndividuals); + handler.setEvaluadtedDescription(eval); /* add(coveredPositiveExamples); add(notCoveredPositiveExamples); @@ -239,7 +254,13 @@ add(negNotCoveredScroll);*/ detailPopup.add(this); } + public JButton getAllPositiveindividuals() { + return allPositiveIndividuals; + } + public JButton getAllNegativeIndividuals() { + return allNegativeIndividuals; + } private void unsetEverything() { removeAll(); } Added: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanelHandler.java 2009-02-19 13:55:58 UTC (rev 1617) @@ -0,0 +1,68 @@ +package org.dllearner.tools.protege; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Set; +import java.util.SortedSet; + +import javax.swing.JOptionPane; + +import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; +import org.dllearner.core.EvaluatedDescription; +import org.dllearner.core.owl.Individual; + +public class MoreDetailForSuggestedConceptsPanelHandler implements ActionListener{ + + private static final String OLD_BUTTON_LABEL = "old"; + private static final String NEW_BUTTON_LABEL = "new"; + private DLLearnerModel model; + private EvaluatedDescription eval; + public MoreDetailForSuggestedConceptsPanelHandler(DLLearnerModel m) { + model = m; + } + + @Override + public void actionPerformed(ActionEvent a) { + if(a.getActionCommand().equals(OLD_BUTTON_LABEL)) { + String toolTip = "This are the Individuals beloning to " + model.getOldConceptOWLAPI() +":\n\n"; + SortedSet<Individual> ind = model.getReasoner().getIndividuals(model.getCurrentConcept()); + for(Individual i : ind) { + Set<String> ur = model.getOntologyURIString(); + for(String str : ur) { + if(i.toString().contains(str)) { + toolTip = toolTip + i.toManchesterSyntaxString(str, null) + "\n"; + } + } + } + JOptionPane.showMessageDialog(null, toolTip); + } + + if(a.getActionCommand().equals(NEW_BUTTON_LABEL)) { + Set<Individual> posInd = ((EvaluatedDescriptionPosNeg)eval).getCoveredPositives(); + Set<String> uri = model.getOntologyURIString(); + String toolTip = "This are the Individuals beloning to\n "; + for(String u : uri) { + if(eval.getDescription().toString().contains(u)) { + toolTip = toolTip + eval.getDescription().toManchesterSyntaxString(u, null) + ":\n\n"; + } + } + + for(Individual ind : posInd ) { + + for(String u : uri) { + if(ind.toString().contains(u)) { + toolTip = toolTip + ind.toManchesterSyntaxString(u, null) + "\n"; + } + } + + } + JOptionPane.showMessageDialog(null, toolTip); + + } + + } + + public void setEvaluadtedDescription(EvaluatedDescription e) { + eval = e; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-19 13:23:19
|
Revision: 1616 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1616&view=rev Author: heeroyuy Date: 2009-02-19 12:32:54 +0000 (Thu, 19 Feb 2009) Log Message: ----------- -shows individual name when hovering over the point in the GraphicalCoveragePanel Modified Paths: -------------- 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/IndividualPoint.java trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-19 12:08:55 UTC (rev 1615) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-19 12:32:54 UTC (rev 1616) @@ -3,6 +3,7 @@ import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; +import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; import java.util.Set; import java.util.Vector; @@ -32,28 +33,32 @@ private Vector<IndividualPoint> posCovIndVector; private Vector<IndividualPoint> posNotCovIndVector; private Vector<IndividualPoint> negCovIndVector; + private Vector<IndividualPoint> points; private JButton allPositiveIndividuals; private JButton allNegativeIndividuals; private GraphicalCoveragePanelHandler handler; + private MoreDetailForSuggestedConceptsPanel panel; /** * This is the constructor for the GraphicalCoveragePanel. */ - public GraphicalCoveragePanel(EvaluatedDescription desc, DLLearnerModel m, String concept, int w, int h) { + public GraphicalCoveragePanel(EvaluatedDescription desc, DLLearnerModel m, String concept, int w, int h, MoreDetailForSuggestedConceptsPanel p) { setPreferredSize(new Dimension(width, height)); setVisible(true); setForeground(Color.GREEN); repaint(); eval = desc; model = m; + panel = p; conceptNew = concept; posCovIndVector = new Vector<IndividualPoint>(); posNotCovIndVector = new Vector<IndividualPoint>(); negCovIndVector = new Vector<IndividualPoint>(); + points = new Vector<IndividualPoint>(); this.computeGraphics(); - handler = new GraphicalCoveragePanelHandler(); + handler = new GraphicalCoveragePanelHandler(this); oldConcept = new Ellipse2D.Float(5, 25, 250, 250); - newConcept = new Ellipse2D .Float(5+shiftXAxis, 25, width+distortion, height+distortion); + newConcept = new Ellipse2D.Float(5+shiftXAxis, 25, width+distortion, height+distortion); allPositiveIndividuals = new JButton(); //immer in der mitte und unten rauszubekommen mittels getMittelpunkt fuer x //und getMaxY fuer y. @@ -61,7 +66,9 @@ allNegativeIndividuals = new JButton(); //allNegativeIndividuals.setBounds(arg0, arg1, arg2, arg3); this.computeIndividualPoints(); - this.addMouseListener(handler); + //this.addMouseListener(handler); + this.addMouseMotionListener(handler); + this.addPropertyChangeListener(handler); } public void drawCoverageForLearnedClassDescription( @@ -73,26 +80,30 @@ @Override protected void paintComponent(Graphics g) { - g.setColor(Color.RED); - g.drawOval((5+shiftXAxis), 25, width+distortion, height+distortion); - g.drawString(conceptNew, 10 + width, 15); - g.setColor(Color.GREEN); - g.drawOval(5, 25, 250, 250); - g.drawString(model.getOldConceptOWLAPI().toString(), 10, 15); + Graphics2D g2D; + g2D = (Graphics2D) g; + + g2D.setColor(Color.RED); + g2D.draw (newConcept); + //g.drawOval((5+shiftXAxis), 25, width+distortion, height+distortion); + g2D.drawString(conceptNew, 10 + width, 15); + g2D.setColor(Color.GREEN); + g2D.draw (oldConcept); + g2D.drawString(model.getOldConceptOWLAPI().toString(), 10, 15); for(int i = 0; i < posCovIndVector.size(); i++) { - g.setColor(Color.BLACK); - g.drawString(posCovIndVector.get(i).getPoint(), posCovIndVector.get(i).getXAxis(), posCovIndVector.get(i).getYAxis()); + g2D.setColor(Color.BLACK); + g2D.drawString(posCovIndVector.get(i).getPoint(), posCovIndVector.get(i).getXAxis(), posCovIndVector.get(i).getYAxis()); } for(int i = 0; i < posNotCovIndVector.size(); i++) { - g.setColor(Color.BLACK); - g.drawString(posNotCovIndVector.get(i).getPoint(), posNotCovIndVector.get(i).getXAxis(), posNotCovIndVector.get(i).getYAxis()); + g2D.setColor(Color.BLACK); + g2D.drawString(posNotCovIndVector.get(i).getPoint(), posNotCovIndVector.get(i).getXAxis(), posNotCovIndVector.get(i).getYAxis()); } for(int i = 0; i < negCovIndVector.size(); i++) { - g.setColor(Color.BLACK); - g.drawString(negCovIndVector.get(i).getPoint(), negCovIndVector.get(i).getXAxis(), negCovIndVector.get(i).getYAxis()); + g2D.setColor(Color.BLACK); + g2D.drawString(negCovIndVector.get(i).getPoint(), negCovIndVector.get(i).getXAxis(), negCovIndVector.get(i).getYAxis()); } } @@ -106,9 +117,9 @@ float shift = (float) (width*(notCov/posGes)); shiftXAxis = Math.round(shift); distortion = 0; - if(shiftXAxis == 0) { - distortion = Math.round((width*(covNeg/negGes))/4); - } + //if(shiftXAxis == 0) { + // distortion = Math.round((width*(covNeg/negGes))/4); + //} } @@ -203,7 +214,23 @@ } } } + points.addAll(posCovIndVector); + points.addAll(posNotCovIndVector); + points.addAll(negCovIndVector); } + public Vector<IndividualPoint> getIndividualVector() { + return points; + } + public GraphicalCoveragePanel getGraphicalCoveragePanel() { + return this; + } + + public MoreDetailForSuggestedConceptsPanel getMoreDetailForSuggestedConceptsPanel() { + return panel; + } + + + } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-19 12:08:55 UTC (rev 1615) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-19 12:32:54 UTC (rev 1616) @@ -1,44 +1,49 @@ package org.dllearner.tools.protege; import java.awt.event.MouseEvent; -import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.util.Vector; -//hier irgendwie umsetzen das wenn ueber individual fahre das name angezeigt wird. -public class GraphicalCoveragePanelHandler implements MouseListener{ - - public GraphicalCoveragePanelHandler() { - + +public class GraphicalCoveragePanelHandler implements MouseMotionListener, PropertyChangeListener { + + private GraphicalCoveragePanel panel; + + public GraphicalCoveragePanelHandler(GraphicalCoveragePanel p) { + this.panel = p; } - + @Override - public void mouseClicked(MouseEvent arg0) { + public void mouseDragged(MouseEvent arg0) { // TODO Auto-generated method stub - - } - @Override - public void mouseEntered(MouseEvent arg0) { - System.out.println("test: " + arg0.getSource()); - } @Override - public void mouseExited(MouseEvent arg0) { - // TODO Auto-generated method stub - - } + public void mouseMoved(MouseEvent m) { + Vector<IndividualPoint> v = panel.getIndividualVector(); + //System.out.println("hier: " + m.getX() + " " + m.getY()); + //System.out.println("bla: " + v.get(0).getXAxis() + " " + // + v.get(0).getYAxis()); + for (int i = 0; i < v.size(); i++) { + if (v.get(i).getXAxis() >= m.getX() - 5 + && v.get(i).getXAxis() <= m.getX() + 5 + && v.get(i).getYAxis() >= m.getY() - 5 + && v.get(i).getYAxis() <= m.getY() + 5) { + panel.getGraphicalCoveragePanel().setToolTipText(v.get(i).getIndividualName()); + } - @Override - public void mousePressed(MouseEvent arg0) { - // TODO Auto-generated method stub - + } + } @Override - public void mouseReleased(MouseEvent arg0) { - // TODO Auto-generated method stub - + public void propertyChange(PropertyChangeEvent arg0) { + panel.getMoreDetailForSuggestedConceptsPanel().repaint(); } + } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java 2009-02-19 12:08:55 UTC (rev 1615) +++ trunk/src/dl-learner/org/dllearner/tools/protege/IndividualPoint.java 2009-02-19 12:32:54 UTC (rev 1616) @@ -55,5 +55,9 @@ public int getYAxis() { return yAxis; } + + public String getIndividualName() { + return individual; + } } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-19 12:08:55 UTC (rev 1615) +++ trunk/src/dl-learner/org/dllearner/tools/protege/MoreDetailForSuggestedConceptsPanel.java 2009-02-19 12:32:54 UTC (rev 1616) @@ -205,7 +205,7 @@ //panel for the informations of the selected concept //this method adds the informations for the selected concept to the panel setInformation(); - p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), width, height); + p = new GraphicalCoveragePanel(eval, model, conceptText.getText(), width, height, this); p.setBounds(5, 110, 600, 650); detailPopup = new JDialog(); detailPopup.setSize(width, height); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-19 13:21:16
|
Revision: 1615 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1615&view=rev Author: jenslehmann Date: 2009-02-19 12:08:55 +0000 (Thu, 19 Feb 2009) Log Message: ----------- fast retrieval ctd. Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.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/ReasonerTests.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-19 10:07:39 UTC (rev 1614) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-19 12:08:55 UTC (rev 1615) @@ -123,7 +123,7 @@ options.add(CommonConfigOptions.useNegation()); options.add(CommonConfigOptions.useBooleanDatatypes()); options.add(CommonConfigOptions.useDoubleDatatypes()); - options.add(CommonConfigOptions.maxExecutionTimeInSeconds(10)); + options.add(CommonConfigOptions.maxExecutionTimeInSeconds(1)); options.add(CommonConfigOptions.getNoisePercentage()); options.add(CommonConfigOptions.getMaxDepth(4)); return options; @@ -187,7 +187,12 @@ Description startClass; if(isEquivalenceProblem) { Set<Description> superClasses = reasoner.getClassHierarchy().getSuperClasses(classToDescribe); - startClass = new Intersection(new LinkedList<Description>(superClasses)); + if(superClasses.size() > 1) { + startClass = new Intersection(new LinkedList<Description>(superClasses)); + } else { + startClass = (Description) superClasses.toArray()[0]; + } + } else { startClass = Thing.instance; } @@ -246,6 +251,8 @@ // logger.info("solution : " + bestDescriptionToString()); logger.info(getSolutionString()); +// System.out.println(startNode.toTreeString(baseURI)); + isRunning = false; } @@ -270,6 +277,11 @@ return false; } + // check whether the description is allowed + if(!isDescriptionAllowed(description)) { + return false; + } + // quality of description (return if too weak) double accuracy = learningProblem.getAccuracyOrTooWeak(description, minAcc); if(accuracy == -1) { @@ -296,6 +308,29 @@ return true; } + // 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)) { + return false; + } + } else if(description.getChildren().size() > 1) { + for(Description child : description.getChildren()) { + if(child.equals(classToDescribe)) { + return false; + } + } + } + } else { + + } + + return true; + } + // check whether the node is a potential solution candidate // (sufficient accuracy; minimal; rewriting steps?) private boolean checkNode(OENode node) { Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-19 10:07:39 UTC (rev 1614) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-19 12:08:55 UTC (rev 1615) @@ -157,7 +157,7 @@ "This option controls how to interpret the all quantifier in \forall r.C. The standard option is" + "to return all those which do not have an r-filler not in C. The domain semantics is to use those" + "which are in the domain of r and do not have an r-filler not in C. The forallExists semantics is to" + - "use those which have at least one r-filler and do not have an r-filler not in C.", "forallExists"); + "use those which have at least one r-filler and do not have an r-filler not in C.", "standard"); forallSemantics.setAllowedValues(new String[] { "standard", "domain", "forallExists" }); // closure option? see: // http://owlapi.svn.sourceforge.net/viewvc/owlapi/owl1_1/trunk/tutorial/src/main/java/uk/ac/manchester/owl/tutorial/examples/ClosureAxiomsExample.java?view=markup @@ -548,7 +548,7 @@ SortedSet<Individual> inds = entry.getValue(); for(Individual ind : inds) { if(targetSet.contains(ind)) { - returnSet.add(ind); + returnSet.add(entry.getKey()); // once we found an individual, we do not need to check the others continue; } @@ -559,7 +559,7 @@ // \forall restrictions are difficult to handle; assume we want to check // \forall hasChild.male with domain(hasChild)=Person; then for all non-persons // this is satisfied trivially (all of their non-existing children are male) - if(!configurator.getForallRetrievalSemantics().equals("forallExists")) { + if(!configurator.getForallRetrievalSemantics().equals("standard")) { throw new Error("Only forallExists semantics currently implemented."); } @@ -576,7 +576,8 @@ } ObjectProperty op = (ObjectProperty) ope; Map<Individual, SortedSet<Individual>> mapping = opPos.get(op); - SortedSet<Individual> returnSet = new TreeSet<Individual>(mapping.keySet()); +// SortedSet<Individual> returnSet = new TreeSet<Individual>(mapping.keySet()); + SortedSet<Individual> returnSet = (SortedSet<Individual>) individuals.clone(); // each individual is connected to a set of individuals via the property; // we loop through the complete mapping @@ -584,7 +585,7 @@ SortedSet<Individual> inds = entry.getValue(); for(Individual ind : inds) { if(!targetSet.contains(ind)) { - returnSet.remove(ind); + returnSet.remove(entry.getKey()); continue; } } Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-19 10:07:39 UTC (rev 1614) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-19 12:08:55 UTC (rev 1615) @@ -327,8 +327,8 @@ System.exit(0); */ - if(startClass != null) - this.startClass = startClass; +// if(startClass != null) +// this.startClass = startClass; } /* (non-Javadoc) Modified: trunk/src/dl-learner/org/dllearner/test/junit/ReasonerTests.java =================================================================== --- trunk/src/dl-learner/org/dllearner/test/junit/ReasonerTests.java 2009-02-19 10:07:39 UTC (rev 1614) +++ trunk/src/dl-learner/org/dllearner/test/junit/ReasonerTests.java 2009-02-19 12:08:55 UTC (rev 1615) @@ -25,6 +25,7 @@ import java.net.MalformedURLException; import java.util.LinkedList; import java.util.List; +import java.util.SortedSet; import org.apache.log4j.Logger; import org.dllearner.core.ComponentInitException; @@ -158,9 +159,9 @@ } } - @Test +// @Test public void fastInstanceCheck2() throws ComponentInitException, ParseException { - String file = "examples/epc/conf/sap_modell_komplett_2.owl"; + String file = "examples/epc/sap_epc.owl"; ComponentManager cm = ComponentManager.getInstance(); KnowledgeSource ks = cm.knowledgeSource(OWLFile.class); try { @@ -180,6 +181,33 @@ System.out.println(result); } + // simple unit test for new retrieval algorithm + @Test + public void fastInstanceCheck3() throws MalformedURLException, ComponentInitException, ParseException { + String file = "examples/family/father_oe.owl"; + ComponentManager cm = ComponentManager.getInstance(); + KnowledgeSource ks = cm.knowledgeSource(OWLFile.class); + cm.applyConfigEntry(ks, "url", new File(file).toURI().toURL()); + ks.init(); + ReasonerComponent reasoner = cm.reasoner(FastInstanceChecker.class, ks); + reasoner.init(); + baseURI = reasoner.getBaseURI(); + Description description = KBParser.parseConcept("(\"http://example.com/father#male\" AND EXISTS \"http://example.com/father#hasChild\".TOP)"); +// Description description = KBParser.parseConcept("EXISTS \"http://example.com/father#hasChild\".TOP"); + SortedSet<Individual> result = reasoner.getIndividuals(description); + assertTrue(result.size()==3); + assertTrue(result.contains(new Individual("http://example.com/father#markus"))); + assertTrue(result.contains(new Individual("http://example.com/father#martin"))); + assertTrue(result.contains(new Individual("http://example.com/father#stefan"))); +// System.out.println(result); + + Description description2 = KBParser.parseConcept("(\"http://example.com/father#male\" AND ALL \"http://example.com/father#hasChild\".\"http://example.com/father#father\")"); + SortedSet<Individual> result2 = reasoner.getIndividuals(description2); + assertTrue(result2.size()==2); + assertTrue(result2.contains(new Individual("http://example.com/father#heinz"))); + assertTrue(result2.contains(new Individual("http://example.com/father#stefan"))); + } + private List<Individual> getIndSet(String... inds) { List<Individual> individuals = new LinkedList<Individual>(); for(String ind : inds) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2009-02-19 10:07:43
|
Revision: 1614 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1614&view=rev Author: heeroyuy Date: 2009-02-19 10:07:39 +0000 (Thu, 19 Feb 2009) Log Message: ----------- -changes to get the plugin to run after refactoring -removed example selection panel Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.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/OWLClassDescriptionEditorWithDLLearnerTab.java trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanelHandler.java trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -40,7 +40,7 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; -import org.apache.log4j.Logger; +//import org.apache.log4j.Logger; import org.dllearner.algorithms.EvaluatedDescriptionPosNeg; import org.dllearner.core.EvaluatedDescription; import org.dllearner.core.LearningAlgorithm; @@ -56,7 +56,7 @@ // This is the DLLearnerModel. - private static Logger logger = Logger.getLogger(ActionHandler.class); + //private static Logger logger = Logger.getLogger(ActionHandler.class); private DLLearnerModel model; @@ -113,7 +113,7 @@ model.setLearningAlgorithm(); view.getRunButton().setEnabled(false); view.renderErrorMessage("learning started"); - view.getPosAndNegSelectPanel().setCheckBoxesEnable(false); + //view.getPosAndNegSelectPanel().setCheckBoxesEnable(false); retriever = new SuggestionRetriever(); retriever.execute(); @@ -305,11 +305,11 @@ /** * Errorlogger. */ - Logger logger = Logger.getLogger(SuggestionRetriever.class); + //Logger logger = Logger.getLogger(SuggestionRetriever.class); /** * Errorlogger. */ - Logger rootLogger = Logger.getRootLogger(); + //Logger rootLogger = Logger.getRootLogger(); @SuppressWarnings("unchecked") @Override @@ -382,7 +382,7 @@ private void updateList(final List<? extends EvaluatedDescription> result) { - logger.debug("update list with " + result); + //logger.debug("update list with " + result); Runnable doUpdateList = new Runnable() { Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -23,6 +23,8 @@ import org.protege.editor.owl.ui.frame.InheritedAnonymousClassesFrameSection; import org.protege.editor.owl.ui.frame.OWLClassAssertionAxiomIndividualSection; import org.protege.editor.owl.ui.frame.OWLDisjointClassesAxiomFrameSection; +//import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSection; +//import org.protege.editor.owl.ui.frame.OWLSubClassAxiomFrameSection; import org.semanticweb.owl.model.OWLClass; import org.protege.editor.owl.OWLEditorKit; @@ -35,21 +37,26 @@ * */ public class ButtonList extends AbstractOWLFrame<OWLClass> { + private OWLEquivalentClassesAxiomFrameSection equi; + private OWLSubClassAxiomFrameSection sub; /** - * Construktor of the Buttonlist. + * Constructor of the Buttonlist. * * @param editorKit EditorKit from Protege */ public ButtonList(OWLEditorKit editorKit) { + super(editorKit.getModelManager().getOWLOntologyManager()); + equi = new OWLEquivalentClassesAxiomFrameSection(editorKit, this); + sub = new OWLSubClassAxiomFrameSection(editorKit, this); // own OWLEquivalentClassesAxiomFrameSection to add the dllearner plugin // to the // OWLClassDescritpionEditor - addSection(new OWLEquivalentClassesAxiomFrameSection(editorKit, this)); + addSection(equi); // own OWLEquivalentClassesAxiomFrameSection to add the dllearner plugin // to the // OWLClassDescritpionEditor - addSection(new OWLSubClassAxiomFrameSection(editorKit, this)); + addSection(sub); addSection(new InheritedAnonymousClassesFrameSection(editorKit, this)); addSection(new OWLClassAssertionAxiomIndividualSection(editorKit, this)); addSection(new OWLDisjointClassesAxiomFrameSection(editorKit, this)); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerModel.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -44,8 +44,8 @@ import org.dllearner.core.owl.NamedClass; import org.dllearner.core.owl.Thing; import org.dllearner.kb.OWLAPIOntology; +import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.learningproblems.PosNegLPStandard; -import org.dllearner.learningproblems.PosNegInclusionLP; import org.dllearner.reasoning.FastInstanceChecker; import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; import org.mindswap.pellet.exceptions.InconsistentOntologyException; @@ -80,8 +80,9 @@ "org.dllearner.learningproblems.PosNegDefinitionLP", "org.dllearner.algorithms.RandomGuesser", "org.dllearner.algorithms.refinement.ROLearner", - "org.dllearner.algorithms.refexamples.ExampleBasedROLComponent", - "org.dllearner.algorithms.gp.GP" }; + "org.dllearner.algorithms.refinement2.ROLComponent2", + "org.dllearner.algorithms.gp.GP", "org.dllearner.learningproblems.PosOnlyLP", + "org.dllearner.learningproblems.PosNegLPStandard", "org.dllearner.learningproblems.ClassLearningProblem"}; // Component Manager that manages the components of the DL-Learner @@ -190,6 +191,7 @@ private Vector<IndividualObject> individualVector; private Set<String> ontologieURI; private boolean ontologyConsistent; + private String learning; // This is a List of evaluated descriptions to get more information of the // suggested concept @@ -215,6 +217,7 @@ this.id = id; this.view = view; ontologyConsistent = true; + learning = ""; owlDescription = new HashSet<OWLDescription>(); posListModel = new DefaultListModel(); negListModel = new DefaultListModel(); @@ -339,12 +342,18 @@ // sets the learning problem to PosNegDefinitionLP when the // dllearner should suggest an equivalent class lp = cm.learningProblem(PosNegLPStandard.class, reasoner); + learning = "equivalence"; } if (id.equals(SUPER_CLASS_AXIOM_STRING)) { // sets the learning problem to PosNegInclusionLP when the dllearner // should suggest a subclass + learning = "superClass"; lp = cm.learningProblem(PosNegInclusionLP.class, reasoner); } + System.out.println("CURRENT: " + currentConcept); + //lp = cm.learningProblem(ClassLearningProblem.class, reasoner); + //cm.applyConfigEntry(lp, "classToDescribe", currentConcept); + //cm.applyConfigEntry(lp, "type", learning); // adds the positive examples cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); // adds the negative examples Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanel.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -34,6 +34,7 @@ private Vector<IndividualPoint> negCovIndVector; private JButton allPositiveIndividuals; private JButton allNegativeIndividuals; + private GraphicalCoveragePanelHandler handler; /** * This is the constructor for the GraphicalCoveragePanel. @@ -50,6 +51,7 @@ posNotCovIndVector = new Vector<IndividualPoint>(); negCovIndVector = new Vector<IndividualPoint>(); this.computeGraphics(); + handler = new GraphicalCoveragePanelHandler(); oldConcept = new Ellipse2D.Float(5, 25, 250, 250); newConcept = new Ellipse2D .Float(5+shiftXAxis, 25, width+distortion, height+distortion); allPositiveIndividuals = new JButton(); @@ -59,6 +61,7 @@ allNegativeIndividuals = new JButton(); //allNegativeIndividuals.setBounds(arg0, arg1, arg2, arg3); this.computeIndividualPoints(); + this.addMouseListener(handler); } public void drawCoverageForLearnedClassDescription( Modified: trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/GraphicalCoveragePanelHandler.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -1,6 +1,44 @@ package org.dllearner.tools.protege; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; + //hier irgendwie umsetzen das wenn ueber individual fahre das name angezeigt wird. -public class GraphicalCoveragePanelHandler { +public class GraphicalCoveragePanelHandler implements MouseListener{ + + public GraphicalCoveragePanelHandler() { + + } + + @Override + public void mouseClicked(MouseEvent arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseEntered(MouseEvent arg0) { + System.out.println("test: " + arg0.getSource()); + + } + + @Override + public void mouseExited(MouseEvent arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void mousePressed(MouseEvent arg0) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseReleased(MouseEvent arg0) { + // TODO Auto-generated method stub + + } + } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLClassDescriptionEditorWithDLLearnerTab.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -434,7 +434,7 @@ * This Method renders the view of the plugin. */ public void makeView() { - + run.setEnabled(false); model.clearVector(); hint.setText("To get suggestions for class descriptions, please click the button above."); isInconsistent = false; @@ -458,8 +458,8 @@ advanced.setBounds(10, 200, 20, 20); sugPanel.setVisible(true); posPanel.setVisible(false); - posPanel.getAddToNegPanelButton().setEnabled(false); - posPanel.getAddToPosPanelButton().setEnabled(false); + //posPanel.getAddToNegPanelButton().setEnabled(false); + //posPanel.getAddToPosPanelButton().setEnabled(false); posPanel.setBounds(10, 230, 490, 250); accept.setBounds(510, 40, 80, 110); hint.setBounds(10, 150, 490, 35); @@ -563,7 +563,7 @@ model.unsetNewConcepts(); action.destroyDLLearnerThread(); errorMessage.setText(""); - posPanel.unsetPosAndNegPanel(); + //posPanel.unsetPosAndNegPanel(); learner.removeAll(); } @@ -605,8 +605,8 @@ run.removeActionListener(action); accept.removeActionListener(action); advanced.removeActionListener(action); - posPanel.removeListeners(action); - posPanel.removeHelpButtonListener(action); + //posPanel.removeListeners(action); + //posPanel.removeHelpButtonListener(action); } /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/OWLEquivalentClassesAxiomFrameSection.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -26,7 +26,11 @@ import java.util.Set; import org.protege.editor.owl.OWLEditorKit; -import org.protege.editor.owl.ui.frame.*; +import org.protege.editor.owl.ui.frame.AbstractOWLFrameSection; +import org.protege.editor.owl.ui.frame.OWLEquivalentClassesAxiomFrameSectionRow; +import org.protege.editor.owl.ui.frame.OWLFrame; +import org.protege.editor.owl.ui.frame.OWLFrameSectionRow; +import org.protege.editor.owl.ui.frame.OWLFrameSectionRowObjectEditor; import org.semanticweb.owl.inference.OWLReasonerException; import org.semanticweb.owl.inference.UnsupportedReasonerOperationException; import org.semanticweb.owl.model.AddAxiom; Modified: trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanel.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -21,17 +21,17 @@ import java.awt.Dimension; import java.awt.GridLayout; -import java.net.URL; +//import java.net.URL; -import javax.swing.DefaultListModel; -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JLabel; -import javax.swing.JList; -import javax.swing.JOptionPane; +//import javax.swing.DefaultListModel; +//import javax.swing.ImageIcon; +//import javax.swing.JButton; +//import javax.swing.JLabel; +//import javax.swing.JList; +//import javax.swing.JOptionPane; import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.ListSelectionModel; +//import javax.swing.JScrollPane; +//import javax.swing.ListSelectionModel; /** * This class is the Panel for the Check boxes where the positive and negative @@ -50,32 +50,32 @@ // This is the DLLearner Model - private DLLearnerModel model; + //private DLLearnerModel model; // This is the Scroll pane if there are more Check boxes than the view can // show - private JScrollPane posScrollList; + //private JScrollPane posScrollList; - private JScrollPane negScrollList; + //private JScrollPane negScrollList; - private JList posList; - private JList negList; - private JPanel posPanel; - private JPanel negPanel; - private JPanel buttonPanel; - private JButton addToNegExamples; - private JButton addToPosExamples; - private JPanel posLabelPanel; - private JPanel negLabelPanel; + //private JList posList; + //private JList negList; + //private JPanel posPanel; + //private JPanel negPanel; + //private JPanel buttonPanel; + //private JButton addToNegExamples; + //private JButton addToPosExamples; + //private JPanel posLabelPanel; + //private JPanel negLabelPanel; // This is the Label that shows "Positive Examples" - private JLabel pos; + //private JLabel pos; // This is the Label that shows "Negative Examples" - private JLabel neg; + //private JLabel neg; // This is the Panel where the Label for Positive Examples and // a help Button is in @@ -83,21 +83,21 @@ // This is the Help button for positive examples - private JButton helpForPosExamples; + //private JButton helpForPosExamples; // This is the Help button for negative examples - private JButton helpForNegExamples; + //private JButton helpForNegExamples; // This is the Text area where the help message is displayed. private OptionPanel optionPanel; - private DefaultListModel posListModel; - private ImageIcon addToPosListIcon; - private ImageIcon addToNegListIcon; - private DefaultListModel negListModel; - private JPanel examplePanel; - private PosAndNegSelectPanelHandler handler; - private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; + //private DefaultListModel posListModel; + //private ImageIcon addToPosListIcon; + //private ImageIcon addToNegListIcon; + //private DefaultListModel negListModel; + //private JPanel examplePanel; + //private PosAndNegSelectPanelHandler handler; + //private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; /** * This is the constructor for the Panel that shows the check boxes. @@ -113,87 +113,87 @@ super(); setLayout(new GridLayout(0, 1)); setPreferredSize(new Dimension(490, 250)); - view = v; - this.model = model; - handler = new PosAndNegSelectPanelHandler(model, view, this); + //view = v; + //this.model = model; + //handler = new PosAndNegSelectPanelHandler(model, view, this); //Instantiate all objects needed optionPanel = new OptionPanel(); - examplePanel = new JPanel(null); - posLabelPanel = new JPanel(null); - negLabelPanel = new JPanel(null); - URL iconUrl = this.getClass().getResource("backspace.gif"); - addToPosListIcon = new ImageIcon(iconUrl); - URL toggledIconUrl = this.getClass().getResource("space.gif"); - addToNegListIcon = new ImageIcon(toggledIconUrl); - posListModel = new DefaultListModel(); - negListModel = new DefaultListModel(); - pos = new JLabel("Positive Examples"); - pos.setBounds(0, 0, 100, 30); - neg = new JLabel("Negative Examples"); - neg.setBounds(0, 0, 100, 30); - posList = new JList(posListModel); - posList.setName("pos"); - posList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - negList = new JList(negListModel); - negList.setName("neg"); - negList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); - addToPosExamples = new JButton(addToPosListIcon); - addToPosExamples.setName("pos"); - addToNegExamples = new JButton(addToNegListIcon); - addToNegExamples.setName("neg"); - helpForPosExamples = new JButton("?"); - helpForPosExamples.setBounds(100, 5, 20, 20); - helpForNegExamples = new JButton("?"); - helpForNegExamples.setBounds(105, 5, 20, 20); - helpForPosExamples.setName("PosHelpButton"); - helpForNegExamples.setName("NegHelpButton"); + //examplePanel = new JPanel(null); + //posLabelPanel = new JPanel(null); + //negLabelPanel = new JPanel(null); + //URL iconUrl = this.getClass().getResource("backspace.gif"); + //addToPosListIcon = new ImageIcon(iconUrl); + //URL toggledIconUrl = this.getClass().getResource("space.gif"); + //addToNegListIcon = new ImageIcon(toggledIconUrl); + //posListModel = new DefaultListModel(); + //negListModel = new DefaultListModel(); + //pos = new JLabel("Positive Examples"); + //pos.setBounds(0, 0, 100, 30); + //neg = new JLabel("Negative Examples"); + //neg.setBounds(0, 0, 100, 30); + //posList = new JList(posListModel); + //posList.setName("pos"); + //posList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + //negList = new JList(negListModel); + //negList.setName("neg"); + //negList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + //addToPosExamples = new JButton(addToPosListIcon); + //addToPosExamples.setName("pos"); + //addToNegExamples = new JButton(addToNegListIcon); + //addToNegExamples.setName("neg"); + //helpForPosExamples = new JButton("?"); + //helpForPosExamples.setBounds(100, 5, 20, 20); + //helpForNegExamples = new JButton("?"); + //helpForNegExamples.setBounds(105, 5, 20, 20); + //helpForPosExamples.setName("PosHelpButton"); + //helpForNegExamples.setName("NegHelpButton"); //set size for components that have no layout. - posPanel = new JPanel(null); - posPanel.setPreferredSize(new Dimension(200, 100)); - negPanel = new JPanel(null); - negPanel.setPreferredSize(new Dimension(200, 100)); - buttonPanel = new JPanel(null); - buttonPanel.setPreferredSize(new Dimension(90, 85)); - addToPosExamples.setBounds(0, 50, 70, 30); - addToNegExamples.setBounds(0, 80, 70, 30); - buttonPanel.add(addToPosExamples); - buttonPanel.add(addToNegExamples); - posLabelPanel.add(pos); - posLabelPanel.add(helpForPosExamples); - negLabelPanel.add(neg); - negLabelPanel.add(helpForNegExamples); - posScrollList = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, - JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - posScrollList.setViewportView(posList); + //posPanel = new JPanel(null); + //posPanel.setPreferredSize(new Dimension(200, 100)); + //negPanel = new JPanel(null); + //negPanel.setPreferredSize(new Dimension(200, 100)); + //buttonPanel = new JPanel(null); + //buttonPanel.setPreferredSize(new Dimension(90, 85)); + //addToPosExamples.setBounds(0, 50, 70, 30); + //addToNegExamples.setBounds(0, 80, 70, 30); + //buttonPanel.add(addToPosExamples); + //buttonPanel.add(addToNegExamples); + //posLabelPanel.add(pos); + //posLabelPanel.add(helpForPosExamples); + //negLabelPanel.add(neg); + //negLabelPanel.add(helpForNegExamples); + //posScrollList = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + // JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + //posScrollList.setViewportView(posList); - negScrollList = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, - JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); - negScrollList.setViewportView(negList); + //negScrollList = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, + // JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); + //negScrollList.setViewportView(negList); - posLabelPanel.setBounds(0, 0, 200, 30); - posScrollList.setBounds(0, 40, 190, 85); + //posLabelPanel.setBounds(0, 0, 200, 30); + //posScrollList.setBounds(0, 40, 190, 85); - posPanel.add(posScrollList); - posPanel.add(posLabelPanel); + //posPanel.add(posScrollList); + //posPanel.add(posLabelPanel); - negLabelPanel.setBounds(0, 0, 200, 30); - negScrollList.setBounds(0, 40, 185, 85); - negPanel.add(negLabelPanel); - negPanel.add(negScrollList); + //negLabelPanel.setBounds(0, 0, 200, 30); + //negScrollList.setBounds(0, 40, 185, 85); + //negPanel.add(negLabelPanel); + //negPanel.add(negScrollList); - posPanel.setBounds(0, 0, 200, 250); - buttonPanel.setBounds(210, 0, 90, 250); - negPanel.setBounds(300, 0, 200, 250); - examplePanel.add(posPanel); - examplePanel.add(buttonPanel); - examplePanel.add(negPanel); - addHelpButtonListener(handler); + //posPanel.setBounds(0, 0, 200, 250); + //buttonPanel.setBounds(210, 0, 90, 250); + //negPanel.setBounds(300, 0, 200, 250); + //examplePanel.add(posPanel); + //examplePanel.add(buttonPanel); + //examplePanel.add(negPanel); + //addHelpButtonListener(handler); add(optionPanel); - add(examplePanel); - posList.addMouseListener(handler); - negList.addMouseListener(handler); - addToPosExamples.addActionListener(handler); - addToNegExamples.addActionListener(handler); + //add(examplePanel); + //posList.addMouseListener(handler); + //negList.addMouseListener(handler); + //addToPosExamples.addActionListener(handler); + //addToNegExamples.addActionListener(handler); } /** @@ -202,28 +202,28 @@ * @param posData DefaultListModel * @param negData DefaultListModel */ - public void setExampleList(DefaultListModel posData, DefaultListModel negData) { - posListModel = posData; - negListModel = negData; - posList.setModel(posListModel); - negList.setModel(negListModel); - } + //public void setExampleList(DefaultListModel posData, DefaultListModel negData) { + // posListModel = posData; + // negListModel = negData; + // posList.setModel(posListModel); + // negList.setModel(negListModel); + //} /** * This method returns the pos button. * @return JButton */ - public JButton getAddToPosPanelButton() { - return addToPosExamples; - } + //public JButton getAddToPosPanelButton() { + // return addToPosExamples; + //} /** * This method returns the neg button. * @return JButton */ - public JButton getAddToNegPanelButton() { - return addToNegExamples; - } + //public JButton getAddToNegPanelButton() { + // return addToNegExamples; + //} /** * This method removes the Check boxes, the labels and the help buttons @@ -274,51 +274,51 @@ * * @param assistance String */ - public void renderHelpMessage(String assistance) { - // renders scroll bar if necessary - JOptionPane.showMessageDialog(null, assistance); - - } + //public void renderHelpMessage(String assistance) { + // // renders scroll bar if necessary + // JOptionPane.showMessageDialog(null, assistance); + // + //} /** * this method sets the example to the other list when button is pressed. * @param toPos boolean * @param example String */ - public void setExampleToOtherList(boolean toPos, String example) { - if (toPos) { - for(int i = 0; i < negListModel.size(); i++) { - if(negListModel.get(i).equals(example)) { - negListModel.remove(i); - for (int j = 0; j < model.getIndividualVector().size(); j++) { - if (model.getIndividualVector().get(j).getIndividualString().contains(example)) { - model.getIndividualVector().get(j).setExamplePositive(true); - break; - } - } - - } - } - posListModel.add(0, example); - } else { - for(int i = 0; i < posListModel.size(); i++) { - if(posListModel.get(i).equals(example)) { - posListModel.remove(i); - for (int j = 0; j < model.getIndividualVector().size(); j++) { - if (model.getIndividualVector().get(j).getIndividualString().contains(example)) { - model.getIndividualVector().get(j).setExamplePositive(false); - } - } - break; - } - } - negListModel.add(0, example); - } - setExampleList(posListModel, negListModel); - addToPosExamples.setEnabled(false); - addToNegExamples.setEnabled(false); - - } + //public void setExampleToOtherList(boolean toPos, String example) { + // if (toPos) { + // for(int i = 0; i < negListModel.size(); i++) { + // if(negListModel.get(i).equals(example)) { + // negListModel.remove(i); + // for (int j = 0; j < model.getIndividualVector().size(); j++) { + // if (model.getIndividualVector().get(j).getIndividualString().contains(example)) { + // model.getIndividualVector().get(j).setExamplePositive(true); + // break; + // } + // } + // + // } + // } + // posListModel.add(0, example); + // } else { + // for(int i = 0; i < posListModel.size(); i++) { + // if(posListModel.get(i).equals(example)) { + // posListModel.remove(i); + // for (int j = 0; j < model.getIndividualVector().size(); j++) { + // if (model.getIndividualVector().get(j).getIndividualString().contains(example)) { + // model.getIndividualVector().get(j).setExamplePositive(false); + // } + // } + // break; + // } + // } + // negListModel.add(0, example); + // } + // setExampleList(posListModel, negListModel); + // addToPosExamples.setEnabled(false); + // addToNegExamples.setEnabled(false); + // + //} /** * This method adds the Action listener to the help buttons. @@ -326,20 +326,20 @@ * @param handle * PosAndNegSelectPanelHandler */ - public void addHelpButtonListener(PosAndNegSelectPanelHandler handle) { - // adds listener to the help button for the positive examples - helpForPosExamples.addActionListener(handle); - // adds listener to the help button for the negative examples - helpForNegExamples.addActionListener(handle); - } + //public void addHelpButtonListener(PosAndNegSelectPanelHandler handle) { + // // adds listener to the help button for the positive examples + // helpForPosExamples.addActionListener(handle); + // // adds listener to the help button for the negative examples + // helpForNegExamples.addActionListener(handle); + //} /** * This Method removes the listeners for the help button. * @param a ActionHandler */ - public void removeHelpButtonListener(ActionHandler a) { - helpForPosExamples.removeActionListener(a); - helpForNegExamples.removeActionListener(a); - } + //public void removeHelpButtonListener(ActionHandler a) { + // helpForPosExamples.removeActionListener(a); + // helpForNegExamples.removeActionListener(a); + //} /** * This method returns the option panel. @@ -353,16 +353,16 @@ * This method returns the list of positive examples. * @return JList posExampleList */ - public JList getPosExampleList() { - return posList; - } + //public JList getPosExampleList() { + // return posList; + //} /** * This method returns the list of negative examples. * @return JList negExampleList */ - public JList getNegExampleList() { - return negList; - } + //public JList getNegExampleList() { + // return negList; + //} } Modified: trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanelHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanelHandler.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/PosAndNegSelectPanelHandler.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -35,9 +35,9 @@ // This is the DLLearnerModel. //private DLLearnerModel model; -private PosAndNegSelectPanel panel; +//private PosAndNegSelectPanel panel; // This is the view of the DL-Learner tab. -private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; +//private OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView view; /** * This is the constructor for the PosAndNegSelectPanelHandler. @@ -50,8 +50,8 @@ */ public PosAndNegSelectPanelHandler(DLLearnerModel m, OWLClassDescriptionEditorWithDLLearnerTab.DLLearnerView v, PosAndNegSelectPanel p) { //model = m; - panel = p; - view = v; + //panel = p; + //view = v; } /** @@ -62,28 +62,28 @@ System.out.println(action.getSource()); if (action.getSource().toString().contains("pos")) { - panel.setExampleToOtherList(true, panel.getNegExampleList().getSelectedValue().toString()); - System.out.println("COUNT: " + panel.getPosExampleList().getModel().getSize()); - if(panel.getPosExampleList().getModel().getSize()>0) { - view.getRunButton().setEnabled(true); - } + //panel.setExampleToOtherList(true, panel.getNegExampleList().getSelectedValue().toString()); + //System.out.println("COUNT: " + panel.getPosExampleList().getModel().getSize()); + //if(panel.getPosExampleList().getModel().getSize()>0) { + // view.getRunButton().setEnabled(true); + //} } if (action.getSource().toString().contains("neg")) { - panel.setExampleToOtherList(false, panel.getPosExampleList().getSelectedValue().toString()); + //panel.setExampleToOtherList(false, panel.getPosExampleList().getSelectedValue().toString()); } if (action.getActionCommand().equals("?")) { if (action.getSource().toString().contains("PosHelpButton")) { - String help = "An individual that should be an instance of the learned class description.\n" - +"Per default all that belongs to the class."; - view.getPosAndNegSelectPanel().renderHelpMessage(help); + //String help = "An individual that should be an instance of the learned class description.\n" + // +"Per default all that belongs to the class."; + //view.getPosAndNegSelectPanel().renderHelpMessage(help); } if (action.getSource().toString().contains("NegHelpButton")) { - String help = "An individual that should not be instance of the learned class description.\n" - +" By default, these are all individuals, which are not instances of the current class."; - view.getPosAndNegSelectPanel().renderHelpMessage(help); + //String help = "An individual that should not be instance of the learned class description.\n" + // +" By default, these are all individuals, which are not instances of the current class."; + //view.getPosAndNegSelectPanel().renderHelpMessage(help); } } @@ -113,16 +113,16 @@ * @param m MouseEvent */ public void mouseClicked(MouseEvent m) { - if (!panel.getPosExampleList().isSelectionEmpty() && m.toString().contains("pos")) { - panel.getAddToNegPanelButton().setEnabled(true); - panel.getAddToPosPanelButton().setEnabled(false); - panel.getNegExampleList().clearSelection(); - } - if (!panel.getNegExampleList().isSelectionEmpty() && m.toString().contains("neg")) { - panel.getAddToPosPanelButton().setEnabled(true); - panel.getAddToNegPanelButton().setEnabled(false); - panel.getPosExampleList().clearSelection(); - } + //if (!panel.getPosExampleList().isSelectionEmpty() && m.toString().contains("pos")) { + // panel.getAddToNegPanelButton().setEnabled(true); + // panel.getAddToPosPanelButton().setEnabled(false); + // panel.getNegExampleList().clearSelection(); + //} + //if (!panel.getNegExampleList().isSelectionEmpty() && m.toString().contains("neg")) { + // panel.getAddToPosPanelButton().setEnabled(true); + // panel.getAddToNegPanelButton().setEnabled(false); + // panel.getPosExampleList().clearSelection(); + //} } /** Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -19,11 +19,11 @@ */ package org.dllearner.tools.protege; -import org.apache.log4j.FileAppender; -import org.apache.log4j.HTMLLayout; -import org.apache.log4j.Layout; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; +//import org.apache.log4j.FileAppender; +//import org.apache.log4j.HTMLLayout; +//import org.apache.log4j.Layout; +//import org.apache.log4j.Level; +//import org.apache.log4j.Logger; import org.protege.editor.owl.ui.view.AbstractOWLClassViewComponent; import org.semanticweb.owl.model.OWLClass; import org.protege.editor.owl.ui.framelist.OWLFrameList2; @@ -39,7 +39,7 @@ public class ProtegePlugin extends AbstractOWLClassViewComponent { private static final long serialVersionUID = 728362819273927L; /** - * List of the lists for equibvalent classes and so on. + * List of the lists for equivalent classes and so on. */ private OWLFrameList2<OWLClass> list; @@ -54,21 +54,21 @@ add(dlLearner); // add file logger (comment out if not needed) - boolean useAdditionalLogger = true; - if(useAdditionalLogger) { - Layout layout = new HTMLLayout(); - String fileName = "logs/dllearner_log.html"; - FileAppender fileAppender = new FileAppender(layout, fileName, true); + //boolean useAdditionalLogger = true; + //if(useAdditionalLogger) { + // Layout layout = new HTMLLayout(); + // String fileName = "logs/dllearner_log.html"; + // FileAppender fileAppender = new FileAppender(layout, fileName, true); // only add log statements in protege package to log file - Logger protegeLogger = Logger.getLogger("org.dllearner.tools.protege"); - protegeLogger.addAppender(fileAppender); - protegeLogger.setLevel(Level.DEBUG); - } + // Logger protegeLogger = Logger.getLogger("org.dllearner.tools.protege"); + // protegeLogger.addAppender(fileAppender); + // protegeLogger.setLevel(Level.DEBUG); + //} } @Override /** - * updates the view if somthing changes + * updates the view if something changes */ protected OWLClass updateView(OWLClass selectedClass) { list.setRootObject(selectedClass); Modified: trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java 2009-02-18 17:13:11 UTC (rev 1613) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ReadingOntologyThread.java 2009-02-19 10:07:39 UTC (rev 1614) @@ -141,13 +141,13 @@ if (setPositivExamplesChecked(indiv)) { if (indiv.contains(ont)) { // when yes then it sets the positive example checked - + // OWLExpressionCheckerFactory posListModel.add(0, ind.toManchesterSyntaxString(ont, null)); individualVector.add(new IndividualObject(indiv, true)); break; } - + } else { // When no it unchecks the positive example if (indiv.contains(ont)) { @@ -159,7 +159,7 @@ } } } - view.getPosAndNegSelectPanel().setExampleList(posListModel, negListModel); + //view.getPosAndNegSelectPanel().setExampleList(posListModel, negListModel); model.setPosListModel(posListModel); model.setNegListModel(negListModel); model.setIndividualVector(individualVector); @@ -184,7 +184,7 @@ } } return isChecked; - + } @Override @@ -206,7 +206,7 @@ String message ="There are no Instances for "+ current.getRootObject()+" available. Please insert some Instances."; view.renderErrorMessage(message); } - view.getPosAndNegSelectPanel().setExampleList(model.getPosListModel(), model.getNegListModel()); + //view.getPosAndNegSelectPanel().setExampleList(model.getPosListModel(), model.getNegListModel()); } else { view.getHintPanel().setForeground(Color.RED); view.getRunButton().setEnabled(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-18 17:13:14
|
Revision: 1613 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1613&view=rev Author: jenslehmann Date: 2009-02-18 17:13:11 +0000 (Wed, 18 Feb 2009) Log Message: ----------- continued ontology engineering algorithm Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.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/core/EvaluatedDescription.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.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/utilities/owl/EvaluatedDescriptionComparator.java trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/algorithms/EvaluatedDescriptionClass.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -39,5 +39,5 @@ public EvaluatedDescriptionClass(Description description, ClassScore score) { super(description, score); } - + } Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/CELOE.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -142,6 +142,8 @@ // create refinement operator operator = new RhoDRDown(reasoner, classHierarchy, configurator); + baseURI = reasoner.getBaseURI(); + prefixes = reasoner.getPrefixes(); // we put important parameters in class variables minAcc = configurator.getNoisePercentage()/100d; @@ -194,9 +196,11 @@ int loop = 0; while (!terminationCriteriaSatisfied()) { +// System.out.println(startNode.toTreeString(baseURI)); + if(bestEvaluatedDescriptions.getBest().getAccuracy() > highestAccuracy) { highestAccuracy = bestEvaluatedDescriptions.getBest().getAccuracy(); - logger.info("more accurate (" + dfPercent.format(100*highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); + logger.info("more accurate (" + dfPercent.format(highestAccuracy) + ") class expression found: " + descriptionToString(bestEvaluatedDescriptions.getBest().getDescription())); } // chose best node according to heuristics @@ -204,7 +208,6 @@ int horizExp = bestNode.getHorizontalExpansion(); // apply operator - System.out.println(bestNode.getDescription()); TreeSet<Description> refinements = refineNode(bestNode); while(refinements.size() != 0) { @@ -213,7 +216,8 @@ int length = refinement.getLength(); // we ignore all refinements with lower length and too high depth - if(length >= horizExp && refinement.getDepth() <= maxDepth) { + // (this also avoids duplicate node children) + if(length > horizExp && refinement.getDepth() <= maxDepth) { boolean added = addNode(refinement, bestNode); @@ -239,7 +243,8 @@ } // print solution(s) - logger.info("solution : " + bestDescriptionToString()); +// logger.info("solution : " + bestDescriptionToString()); + logger.info(getSolutionString()); isRunning = false; } @@ -285,6 +290,7 @@ // maybe add to best descriptions (method keeps set size fixed) if(checkNode(node)) { bestEvaluatedDescriptions.add(description, accuracy, learningProblem); +// System.out.println(bestEvaluatedDescriptions.toString()); } return true; @@ -302,8 +308,7 @@ } private boolean terminationCriteriaSatisfied() { -// double runtimeSec = (System.nanoTime() - nanoStartTime; - return stop || (System.nanoTime() - nanoStartTime >= (configurator.getMaxExecutionTimeInSeconds()*1000000000)); + return stop || ((System.nanoTime() - nanoStartTime) >= (configurator.getMaxExecutionTimeInSeconds()*1000000000l)); } private void reset() { @@ -334,8 +339,23 @@ return description.toManchesterSyntaxString(baseURI, prefixes); } + @SuppressWarnings("unused") private String bestDescriptionToString() { EvaluatedDescription best = bestEvaluatedDescriptions.getBest(); - return best.getDescription().toManchesterSyntaxString(baseURI, prefixes) + " (accuracy: " + dfPercent.format(best.getAccuracy()*100) + ")"; + return best.getDescription().toManchesterSyntaxString(baseURI, prefixes) + " (accuracy: " + dfPercent.format(best.getAccuracy()) + ")"; } + + private String getSolutionString() { + 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; + } + } + return str; + } } Modified: trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/algorithms/celoe/OENode.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -19,9 +19,12 @@ */ package org.dllearner.algorithms.celoe; +import java.text.DecimalFormat; 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; /** @@ -50,11 +53,13 @@ private OENode parent; private List<OENode> children = new LinkedList<OENode>(); + DecimalFormat dfPercent = new DecimalFormat("0.00%"); + public OENode(OENode parentNode, Description description, double accuracy) { this.parent = parentNode; this.description = description; this.accuracy = accuracy; - horizontalExpansion = 0; + horizontalExpansion = description.getLength()-1; } public void addChild(OENode node) { @@ -104,4 +109,32 @@ return horizontalExpansion; } + public String getShortDescription(String baseURI) { + String ret = description.toString(baseURI,null) + " ["; + ret += "acc:" + dfPercent.format(accuracy) + ", "; + ret += "he:" + horizontalExpansion + ", "; + ret += "c:" + children.size() + "]"; + return ret; + } + + public String toTreeString() { + return toTreeString(0, null).toString(); + } + + public String toTreeString(String baseURI) { + return toTreeString(0, baseURI).toString(); + } + + private StringBuilder toTreeString(int depth, String baseURI) { + StringBuilder treeString = new StringBuilder(); + for(int i=0; i<depth-1; i++) + treeString.append(" "); + if(depth!=0) + treeString.append("|--> "); + treeString.append(getShortDescription(baseURI)+"\n"); + for(OENode child : children) { + treeString.append(child.toTreeString(depth+1,baseURI)); + } + return treeString; + } } Modified: trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/core/EvaluatedDescription.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -19,6 +19,8 @@ */ package org.dllearner.core; +import java.text.DecimalFormat; + import org.dllearner.core.owl.Description; import org.dllearner.kb.sparql.SparqlQueryDescriptionConvertVisitor; import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; @@ -39,6 +41,8 @@ protected Description description; protected Score score; + protected static DecimalFormat dfPercent = new DecimalFormat("0.00%"); + /** * Constructs an evaluated description using its score. * @param description The description, which was evaluated. @@ -124,5 +128,10 @@ return null; } } + + @Override + public String toString() { + return description.toString() + " " + dfPercent.format(getAccuracy()); + } } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassLearningProblem.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -95,19 +95,26 @@ public ClassScore computeScore(Description description) { Set<Individual> retrieval = reasoner.getIndividuals(description); +// int instancesProtused = 0; +// +// for(Individual ind : retrieval) { +// if(classInstances.contains(ind)) { +// instancesCovered++; +// } else { +// instancesProtused++; +// } +// } + int instancesCovered = 0; - int instancesProtused = 0; - for(Individual ind : retrieval) { - if(classInstances.contains(ind)) { + for(Individual ind : classInstances) { + if(retrieval.contains(ind)) { instancesCovered++; - } else { - instancesProtused++; } } double coverage = instancesCovered/(double)classInstances.size(); - double protusion = instancesCovered/(double)(instancesCovered + instancesProtused); + double protusion = instancesCovered/(double)retrieval.size(); return new ClassScore(coverage, protusion); } @@ -121,8 +128,19 @@ */ @Override public double getAccuracy(Description description) { - // TODO Auto-generated method stub - return 0; + Set<Individual> retrieval = reasoner.getIndividuals(description); + int instancesCovered = 0; + + for(Individual ind : classInstances) { + if(retrieval.contains(ind)) { + instancesCovered++; + } + } + + double coverage = instancesCovered/(double)classInstances.size(); + double protusion = instancesCovered/(double)retrieval.size(); + + return 0.5d * (coverage + protusion); } /* (non-Javadoc) @@ -130,8 +148,14 @@ */ @Override public double getAccuracyOrTooWeak(Description description, double minAccuracy) { - // TODO Auto-generated method stub - return 0; + // since we have to perform a retrieval operation anyway, we cannot easily + // get a benefit from the accuracy limit + double accuracy = getAccuracy(description); + if(accuracy >= minAccuracy) { + return accuracy; + } else { + return -1; + } } /** Modified: trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/learningproblems/ClassScore.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -19,10 +19,7 @@ */ package org.dllearner.learningproblems; -import java.util.Set; - import org.dllearner.core.Score; -import org.dllearner.core.owl.Individual; /** * The score of a class in ontology engineering. @@ -59,8 +56,7 @@ */ @Override public double getAccuracy() { - // TODO Auto-generated method stub - return 0; + return 0.5 * (coverage + protusion); } } Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -110,7 +110,7 @@ private SortedSet<DatatypeProperty> booleanDatatypeProperties = new TreeSet<DatatypeProperty>(); private SortedSet<DatatypeProperty> doubleDatatypeProperties = new TreeSet<DatatypeProperty>(); private SortedSet<DatatypeProperty> intDatatypeProperties = new TreeSet<DatatypeProperty>(); - private SortedSet<Individual> individuals; + private TreeSet<Individual> individuals; // private ReasonerComponent rs; private OWLAPIReasoner rc; @@ -118,14 +118,14 @@ // we use sorted sets (map indices) here, because they have only log(n) // complexity for checking whether an element is contained in them // instances of classes - private Map<NamedClass, SortedSet<Individual>> classInstancesPos = new TreeMap<NamedClass, SortedSet<Individual>>(); - private Map<NamedClass, SortedSet<Individual>> classInstancesNeg = new TreeMap<NamedClass, SortedSet<Individual>>(); + private Map<NamedClass, TreeSet<Individual>> classInstancesPos = new TreeMap<NamedClass, TreeSet<Individual>>(); + private Map<NamedClass, TreeSet<Individual>> classInstancesNeg = new TreeMap<NamedClass, TreeSet<Individual>>(); // object property mappings private Map<ObjectProperty, Map<Individual, SortedSet<Individual>>> opPos = new TreeMap<ObjectProperty, Map<Individual, SortedSet<Individual>>>(); // datatype property mappings // we have one mapping for true and false for efficiency reasons - private Map<DatatypeProperty, SortedSet<Individual>> bdPos = new TreeMap<DatatypeProperty, SortedSet<Individual>>(); - private Map<DatatypeProperty, SortedSet<Individual>> bdNeg = new TreeMap<DatatypeProperty, SortedSet<Individual>>(); + private Map<DatatypeProperty, TreeSet<Individual>> bdPos = new TreeMap<DatatypeProperty, TreeSet<Individual>>(); + private Map<DatatypeProperty, TreeSet<Individual>> bdNeg = new TreeMap<DatatypeProperty, TreeSet<Individual>>(); // for int and double we assume that a property can have several values, // althoug this should be rare, // e.g. hasValue(object,2) and hasValue(object,3) @@ -200,7 +200,7 @@ doubleDatatypeProperties = rc.getDoubleDatatypeProperties(); intDatatypeProperties = rc.getIntDatatypeProperties(); atomicRoles = rc.getObjectProperties(); - individuals = rc.getIndividuals(); + individuals = (TreeSet<Individual>) rc.getIndividuals(); // rs = new ReasonerComponent(rc); @@ -215,10 +215,10 @@ for (NamedClass atomicConcept : rc.getNamedClasses()) { SortedSet<Individual> pos = rc.getIndividuals(atomicConcept); - classInstancesPos.put(atomicConcept, pos); + classInstancesPos.put(atomicConcept, (TreeSet<Individual>) pos); if (configurator.getDefaultNegation()) { - classInstancesNeg.put(atomicConcept, Helper.difference(individuals, pos)); + classInstancesNeg.put(atomicConcept, (TreeSet<Individual>) Helper.difference(individuals, pos)); } else { // Pellet needs approximately infinite time to answer // negated queries @@ -226,7 +226,7 @@ // we have to // be careful here Negation negatedAtomicConcept = new Negation(atomicConcept); - classInstancesNeg.put(atomicConcept, rc.getIndividuals(negatedAtomicConcept)); + classInstancesNeg.put(atomicConcept, (TreeSet<Individual>) rc.getIndividuals(negatedAtomicConcept)); } } @@ -240,8 +240,8 @@ logger.debug("dematerialising datatype properties"); for (DatatypeProperty dp : booleanDatatypeProperties) { - bdPos.put(dp, rc.getTrueDatatypeMembers(dp)); - bdNeg.put(dp, rc.getFalseDatatypeMembers(dp)); + bdPos.put(dp, (TreeSet<Individual>) rc.getTrueDatatypeMembers(dp)); + bdNeg.put(dp, (TreeSet<Individual>) rc.getFalseDatatypeMembers(dp)); } for (DatatypeProperty dp : intDatatypeProperties) { @@ -495,16 +495,17 @@ } @Override + @SuppressWarnings("unchecked") public SortedSet<Individual> getIndividualsImpl(Description description) throws ReasoningMethodUnsupportedException { // policy: returned sets are clones, i.e. can be modified // (of course we only have to clone the leafs of a class description tree) if (description instanceof NamedClass) { - return new TreeSet<Individual>(classInstancesPos.get((NamedClass) description)); + return (TreeSet<Individual>) classInstancesPos.get((NamedClass) description).clone(); } else if (description instanceof Negation && description.getChild(0) instanceof NamedClass) { - return new TreeSet<Individual>(classInstancesNeg.get((NamedClass) description.getChild(0))); + return (TreeSet<Individual>) classInstancesNeg.get((NamedClass) description.getChild(0)).clone(); } else if (description instanceof Thing) { - return new TreeSet<Individual>(individuals); + return (TreeSet<Individual>) individuals.clone(); } else if (description instanceof Nothing) { return new TreeSet<Individual>(); } else if (description instanceof Union) { @@ -535,7 +536,7 @@ ObjectPropertyExpression ope = ((ObjectSomeRestriction) description).getRole(); if (!(ope instanceof ObjectProperty)) { - throw new ReasoningMethodUnsupportedException("Instance check for description " + throw new ReasoningMethodUnsupportedException("Retrieval for description " + description + " unsupported. Inverse object properties not supported."); } ObjectProperty op = (ObjectProperty) ope; @@ -553,6 +554,7 @@ } } } + return returnSet; } else if (description instanceof ObjectAllRestriction) { // \forall restrictions are difficult to handle; assume we want to check // \forall hasChild.male with domain(hasChild)=Person; then for all non-persons @@ -587,6 +589,138 @@ } } } + return returnSet; + } else if (description instanceof ObjectMinCardinalityRestriction) { + ObjectPropertyExpression ope = ((ObjectCardinalityRestriction) description).getRole(); + if (!(ope instanceof ObjectProperty)) { + throw new ReasoningMethodUnsupportedException("Instance check for description " + + description + " unsupported. Inverse object properties not supported."); + } + 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> returnSet = new TreeSet<Individual>(); + + int number = ((ObjectCardinalityRestriction) description).getNumber(); + + for(Entry<Individual, SortedSet<Individual>> entry : mapping.entrySet()) { + int nrOfFillers = 0; + int index = 0; + SortedSet<Individual> inds = entry.getValue(); + + // we do not need to run tests if there are not sufficiently many fillers + if(inds.size() < number) { + continue; + } + + for(Individual ind : inds) { + // stop inner loop when nr of fillers is reached + if(nrOfFillers >= number) { + returnSet.add(entry.getKey()); + break; + } + // early abort when too many instance checks failed + if (inds.size() - index < number) { + break; + } + if(targetSet.contains(ind)) { + nrOfFillers++; + } + index++; + } + } + + return returnSet; + } else if (description instanceof ObjectMaxCardinalityRestriction) { + ObjectPropertyExpression ope = ((ObjectCardinalityRestriction) description).getRole(); + if (!(ope instanceof ObjectProperty)) { + throw new ReasoningMethodUnsupportedException("Instance check for description " + + description + " unsupported. Inverse object properties not supported."); + } + ObjectProperty op = (ObjectProperty) ope; + Description child = description.getChild(0); + Map<Individual, SortedSet<Individual>> mapping = opPos.get(op); + SortedSet<Individual> targetSet = getIndividualsImpl(description.getChild(0)); + // initially all individuals are in the return set and we then remove those + // with too many fillers + SortedSet<Individual> returnSet = (SortedSet<Individual>) individuals.clone(); + + int number = ((ObjectCardinalityRestriction) description).getNumber(); + + for(Entry<Individual, SortedSet<Individual>> entry : mapping.entrySet()) { + int nrOfFillers = 0; + int index = 0; + SortedSet<Individual> inds = entry.getValue(); + + // we do not need to run tests if there are not sufficiently many fillers + if(number < inds.size()) { + returnSet.add(entry.getKey()); + continue; + } + + for(Individual ind : inds) { + // stop inner loop when nr of fillers is reached + if(nrOfFillers >= number) { + break; + } + // early abort when too many instance are true already + if (inds.size() - index < number) { + returnSet.add(entry.getKey()); + break; + } + if(targetSet.contains(ind)) { + nrOfFillers++; + } + index++; + } + } + + return returnSet; + } else if (description instanceof ObjectValueRestriction) { + Individual i = ((ObjectValueRestriction)description).getIndividual(); + ObjectProperty op = (ObjectProperty) ((ObjectValueRestriction)description).getRestrictedPropertyExpression(); + + Map<Individual, SortedSet<Individual>> mapping = opPos.get(op); + SortedSet<Individual> returnSet = new TreeSet<Individual>(); + + for(Entry<Individual, SortedSet<Individual>> entry : mapping.entrySet()) { + if(entry.getValue().contains(i)) { + returnSet.add(entry.getKey()); + } + } + return returnSet; + } else if (description instanceof BooleanValueRestriction) { + DatatypeProperty dp = ((BooleanValueRestriction) description) + .getRestrictedPropertyExpresssion(); + boolean value = ((BooleanValueRestriction) description).getBooleanValue(); + + if (value) { + return (TreeSet<Individual>) bdPos.get(dp).clone(); + } else { + return (TreeSet<Individual>) bdNeg.get(dp).clone(); + } + } else if (description instanceof DatatypeSomeRestriction) { + DatatypeSomeRestriction dsr = (DatatypeSomeRestriction) description; + DatatypeProperty dp = (DatatypeProperty) dsr.getRestrictedPropertyExpression(); + DataRange dr = dsr.getDataRange(); + + Map<Individual, SortedSet<Double>> mapping = dd.get(dp); + SortedSet<Individual> returnSet = new TreeSet<Individual>(); + + if (dr instanceof DoubleMaxValue) { + for(Entry<Individual, SortedSet<Double>> entry : mapping.entrySet()) { + if(entry.getValue().first() <= ((DoubleMaxValue)dr).getValue()) { + returnSet.add(entry.getKey()); + } + } + } else if (dr instanceof DoubleMinValue) { + for(Entry<Individual, SortedSet<Double>> entry : mapping.entrySet()) { + if(entry.getValue().last() >= ((DoubleMinValue)dr).getValue()) { + returnSet.add(entry.getKey()); + } + } + } } throw new ReasoningMethodUnsupportedException("Retrieval for description " Modified: trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java =================================================================== --- trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/refinementoperators/RhoDRDown.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -341,6 +341,10 @@ @Override public Set<Description> refine(Description description, int maxLength) { + // check that maxLength is valid + if(maxLength < description.getLength()) { + throw new Error("length has to be at least description length (description: " + description + ", max length: " + maxLength + ")"); + } return refine(description, maxLength, null, startClass); } Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionComparator.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionComparator.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionComparator.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -43,16 +43,16 @@ double acc1 = ed1.getAccuracy(); double acc2 = ed2.getAccuracy(); if(acc1 > acc2) + return 1; + else if(acc1 < acc2) return -1; - else if(acc1 < acc2) - return 1; else { int length1 = ed1.getDescriptionLength(); int length2 = ed2.getDescriptionLength(); if(length1 < length2) + return 1; + else if(length1 > length2) return -1; - else if(length1 > length2) - return 1; else return cc.compare(ed1.getDescription(), ed2.getDescription()); } Modified: trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-18 13:09:16 UTC (rev 1612) +++ trunk/src/dl-learner/org/dllearner/utilities/owl/EvaluatedDescriptionSet.java 2009-02-18 17:13:11 UTC (rev 1613) @@ -43,7 +43,7 @@ private EvaluatedDescriptionComparator comp = new EvaluatedDescriptionComparator(); - private SortedSet<EvaluatedDescription> set = new TreeSet<EvaluatedDescription>(comp); + private TreeSet<EvaluatedDescription> set = new TreeSet<EvaluatedDescription>(comp); private int maxSize; @@ -56,6 +56,7 @@ set.add(problem.evaluate(description)); } if(set.size()>maxSize) { + // delete the worst element Iterator<EvaluatedDescription> it = set.iterator(); it.next(); it.remove(); @@ -82,17 +83,17 @@ } public EvaluatedDescription getBest() { - return set.first(); + return set.last(); } public EvaluatedDescription getWorst() { - return set.last(); + return set.first(); } /** * @return the set */ - public SortedSet<EvaluatedDescription> getSet() { + public TreeSet<EvaluatedDescription> getSet() { return set; } @@ -103,4 +104,9 @@ } return list; } + + @Override + public String toString() { + return set.toString(); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2009-02-18 13:09:21
|
Revision: 1612 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1612&view=rev Author: kurzum Date: 2009-02-18 13:09:16 +0000 (Wed, 18 Feb 2009) Log Message: ----------- config options improved. added field for manual explanation in Componentmanager line 507 Modified Paths: -------------- trunk/doc/configOptions.txt trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/core/options/ConfigOption.java trunk/src/dl-learner/org/dllearner/core/options/DoubleConfigOption.java trunk/src/dl-learner/org/dllearner/core/options/IntegerConfigOption.java trunk/src/dl-learner/org/dllearner/core/options/StringConfigOption.java Property Changed: ---------------- trunk/ trunk/examples/arch/ trunk/lib/ Property changes on: trunk ___________________________________________________________________ Modified: svn:ignore - .lastUsedExample .settings .project .classpath classes log cache cachePersistant reports results local rdbtoonto the_log.txt + .lastUsedExample .settings .project .classpath classes log cache cachePersistant reports results local rdbtoonto the_log.txt tmp fragmentOntology.owl output ling Modified: trunk/doc/configOptions.txt =================================================================== --- trunk/doc/configOptions.txt 2009-02-18 11:33:18 UTC (rev 1611) +++ trunk/doc/configOptions.txt 2009-02-18 13:09:16 UTC (rev 1612) @@ -4,178 +4,151 @@ * Knowledge Sources * ********************* -component: KB file (org.dllearner.kb.KBFile) -============================================ +BEGIN MANUAL PART +END MANUAL PART -CLI usage: import ("$url", "null"); - -option name: url -description: URL pointer to the KB file -values: class org.dllearner.core.options.URLConfigOption -default value: null -CLI usage: null.url = null; - - -component: OWL API Ontology (org.dllearner.kb.OWLAPIOntology) -============================================================= - -CLI usage: import ("$url", "null"); - - -component: OWL file (org.dllearner.kb.OWLFile) -============================================== - -CLI usage: import ("$url", "owlfile"); - -option name: url -description: URL pointing to the OWL file -values: class org.dllearner.core.options.URLConfigOption -default value: null -CLI usage: owlfile.url = null; - - component: SPARQL Endpoint (org.dllearner.kb.sparql.SparqlKnowledgeSource) ========================================================================== -CLI usage: import ("$url", "sparql"); +conf file usage: import ("$url", "SPARQL"); option name: url description: URL of SPARQL Endpoint -values: class org.dllearner.core.options.URLConfigOption -default value: null -CLI usage: sparql.url = null; +allowed values: URL +default value: not set (mandatory) +conf file usage: sparql.url = ; option name: cacheDir description: dir of cache -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: cache -CLI usage: sparql.cacheDir = cache; +conf file usage: sparql.cacheDir = cache; option name: useCache description: If true a Cache is used -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: sparql.useCache = true; +conf file usage: sparql.useCache = true; option name: instances description: relevant instances e.g. positive and negative examples in a learning problem -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: sparql.instances = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: sparql.instances = ; option name: recursionDepth description: recursion depth of KB fragment selection -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 1 -CLI usage: sparql.recursionDepth = 1; +conf file usage: sparql.recursionDepth = 1; option name: predefinedFilter description: the mode of the SPARQL Filter, use one of YAGO,SKOS,YAGOSKOS , YAGOSPECIALHIERARCHY, TEST -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: sparql.predefinedFilter = null; +allowed values: String [] +default value: not set +conf file usage: sparql.predefinedFilter = ; option name: predefinedEndpoint description: the mode of the SPARQL Filter, use one of DBPEDIA, LOCAL, GOVTRACK, REVYU, MYOPENLINK, FACTBOOK -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: sparql.predefinedEndpoint = null; +allowed values: String [] +default value: not set +conf file usage: sparql.predefinedEndpoint = ; option name: predefinedManipulator description: the mode of the Manipulator, use one of STANDARD, DBPEDIA-NAVIGATOR -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: sparql.predefinedManipulator = null; +allowed values: String [] +default value: not set +conf file usage: sparql.predefinedManipulator = ; option name: predList description: list of all ignored roles -values: class org.dllearner.core.options.StringSetConfigOption +allowed values: Set<String> default value: [] -CLI usage: sparql.predList = []; +conf file usage: sparql.predList = []; option name: objList description: list of all ignored objects -values: class org.dllearner.core.options.StringSetConfigOption +allowed values: Set<String> default value: [] -CLI usage: sparql.objList = []; +conf file usage: sparql.objList = []; option name: saveExtractedFragment description: Specifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir.Some DBpedia URI will make the XML invalid -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: sparql.saveExtractedFragment = false; +conf file usage: sparql.saveExtractedFragment = false; option name: replacePredicate description: rule for replacing predicates -values: class org.dllearner.core.options.StringTupleListConfigOption +allowed values: List<StringTuple> default value: [] -CLI usage: sparql.replacePredicate = []; +conf file usage: sparql.replacePredicate = []; option name: replaceObject description: rule for replacing predicates -values: class org.dllearner.core.options.StringTupleListConfigOption +allowed values: List<StringTuple> default value: [] -CLI usage: sparql.replaceObject = []; +conf file usage: sparql.replaceObject = []; option name: breakSuperClassRetrievalAfter description: stops a cyclic hierarchy after specified number of classes -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 1000 -CLI usage: sparql.breakSuperClassRetrievalAfter = 1000; +conf file usage: sparql.breakSuperClassRetrievalAfter = 1000; option name: useLits description: use Literals in SPARQL query -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: sparql.useLits = true; +conf file usage: sparql.useLits = true; option name: getAllSuperClasses description: If true then all superclasses are retrieved until the most general class (owl:Thing) is reached. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: sparql.getAllSuperClasses = true; +conf file usage: sparql.getAllSuperClasses = true; option name: closeAfterRecursion description: gets all classes for all instances -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: sparql.closeAfterRecursion = true; +conf file usage: sparql.closeAfterRecursion = true; option name: getPropertyInformation description: gets all types for extracted ObjectProperties -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: sparql.getPropertyInformation = false; +conf file usage: sparql.getPropertyInformation = false; option name: dissolveBlankNodes description: determines whether Blanknodes are dissolved. This is a costly function. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: sparql.dissolveBlankNodes = true; +conf file usage: sparql.dissolveBlankNodes = true; option name: useImprovedSparqlTupelAquisitor description: uses deeply nested SparqlQueries, according to recursion depth, still EXPERIMENTAL -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: sparql.useImprovedSparqlTupelAquisitor = false; +conf file usage: sparql.useImprovedSparqlTupelAquisitor = false; option name: verbosity description: control verbosity of output for this component -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [debug, error, info, notice, quiet, warning] default value: warning -CLI usage: sparql.verbosity = warning; +conf file usage: sparql.verbosity = warning; option name: defaultGraphURIs description: a list of all default Graph URIs -values: class org.dllearner.core.options.StringSetConfigOption +allowed values: Set<String> default value: [] -CLI usage: sparql.defaultGraphURIs = []; +conf file usage: sparql.defaultGraphURIs = []; option name: namedGraphURIs description: a list of all named Graph URIs -values: class org.dllearner.core.options.StringSetConfigOption +allowed values: Set<String> default value: [] -CLI usage: sparql.namedGraphURIs = []; +conf file usage: sparql.namedGraphURIs = []; ************* @@ -185,67 +158,67 @@ component: DIG reasoner (org.dllearner.reasoning.DIGReasoner) ============================================================= -CLI usage: reasoner = digReasoner; +conf file usage: reasoner = digReasoner; option name: reasonerUrl description: URL of the DIG reasoner -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: digReasoner.reasonerUrl = null; +allowed values: String [] +default value: not set +conf file usage: digReasoner.reasonerUrl = ; option name: writeDIGProtocol description: specifies whether or not to write a protocoll of send and received DIG requests -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: digReasoner.writeDIGProtocol = false; +conf file usage: digReasoner.writeDIGProtocol = false; option name: digProtocolFile description: the file to store the DIG protocol -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: log/digProtocol.txt -CLI usage: digReasoner.digProtocolFile = log/digProtocol.txt; +conf file usage: digReasoner.digProtocolFile = log/digProtocol.txt; component: fast instance checker (org.dllearner.reasoning.FastInstanceChecker) ============================================================================== -CLI usage: reasoner = fastInstanceChecker; +conf file usage: reasoner = fastInstanceChecker; option name: reasonerType description: FaCT++ or Pellet to dematerialize -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [fact, pellet] default value: pellet -CLI usage: fastInstanceChecker.reasonerType = pellet; +conf file usage: fastInstanceChecker.reasonerType = pellet; option name: defaultNegation description: Whether to use default negation, i.e. an instance not being in a class means that it is in the negation of the class. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: fastInstanceChecker.defaultNegation = 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. -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [domain, forallExists, standard] default value: forallExists -CLI usage: fastInstanceChecker.forallRetrievalSemantics = forallExists; +conf file usage: fastInstanceChecker.forallRetrievalSemantics = forallExists; component: fast retrieval reasoner (org.dllearner.reasoning.FastRetrievalReasoner) ================================================================================== -CLI usage: reasoner = fastRetrievalReasoner; +conf file usage: reasoner = fastRetrievalReasoner; component: OWL API reasoner (org.dllearner.reasoning.OWLAPIReasoner) ==================================================================== -CLI usage: reasoner = owlAPIReasoner; +conf file usage: reasoner = owlAPIReasoner; option name: reasonerType description: FaCT++ or Pellet, which means "pellet" or "fact" -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [fact, pellet] default value: pellet -CLI usage: owlAPIReasoner.reasonerType = pellet; +conf file usage: owlAPIReasoner.reasonerType = pellet; ********************* @@ -255,157 +228,157 @@ component: unnamed component (org.dllearner.learningproblems.ClassLearningProblem) ================================================================================== -CLI usage: problem = classLearning; +conf file usage: problem = classLearning; option name: classToDescribe description: class of which a description should be learned -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: classLearning.classToDescribe = null; +allowed values: String [] +default value: not set (mandatory) +conf file usage: classLearning.classToDescribe = ; option name: type description: Whether to learn an equivalence class or super class axiom. -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [equivalence, superClass] default value: equivalence -CLI usage: classLearning.type = equivalence; +conf file usage: classLearning.type = equivalence; component: two valued inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) =================================================================================================== -CLI usage: problem = posNegInclusionLP; +conf file usage: problem = posNegInclusionLP; option name: positiveExamples description: positive examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegInclusionLP.positiveExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: posNegInclusionLP.positiveExamples = ; option name: negativeExamples description: negative examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegInclusionLP.negativeExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: posNegInclusionLP.negativeExamples = ; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: posNegInclusionLP.useRetrievalForClassficiation = false; +conf file usage: posNegInclusionLP.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 -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.05 -CLI usage: posNegInclusionLP.percentPerLenghtUnit = 0.05; +conf file usage: posNegInclusionLP.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [never, oneCheck, twoChecks] default value: twoChecks -CLI usage: posNegInclusionLP.useMultiInstanceChecks = twoChecks; +conf file usage: posNegInclusionLP.useMultiInstanceChecks = twoChecks; component: two valued definition learning problem (org.dllearner.learningproblems.PosNegLPStandard) =================================================================================================== -CLI usage: problem = posNegDefinitionLP; +conf file usage: problem = posNegDefinitionLP; option name: positiveExamples description: positive examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegDefinitionLP.positiveExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: posNegDefinitionLP.positiveExamples = ; option name: negativeExamples description: negative examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegDefinitionLP.negativeExamples = null; +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. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: posNegDefinitionLP.useRetrievalForClassficiation = 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 -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.05 -CLI usage: posNegDefinitionLP.percentPerLenghtUnit = 0.05; +conf file usage: posNegDefinitionLP.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [never, oneCheck, twoChecks] default value: twoChecks -CLI usage: posNegDefinitionLP.useMultiInstanceChecks = twoChecks; +conf file usage: posNegDefinitionLP.useMultiInstanceChecks = twoChecks; component: three valued definition learning problem (org.dllearner.learningproblems.PosNegLPStrict) =================================================================================================== -CLI usage: problem = posNegDefinitionLPStrict; +conf file usage: problem = posNegDefinitionLPStrict; option name: positiveExamples description: positive examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegDefinitionLPStrict.positiveExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: posNegDefinitionLPStrict.positiveExamples = ; option name: negativeExamples description: negative examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: posNegDefinitionLPStrict.negativeExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: posNegDefinitionLPStrict.negativeExamples = ; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: posNegDefinitionLPStrict.useRetrievalForClassficiation = false; +conf file usage: posNegDefinitionLPStrict.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 -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.05 -CLI usage: posNegDefinitionLPStrict.percentPerLenghtUnit = 0.05; +conf file usage: posNegDefinitionLPStrict.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [never, oneCheck, twoChecks] default value: twoChecks -CLI usage: posNegDefinitionLPStrict.useMultiInstanceChecks = twoChecks; +conf file usage: posNegDefinitionLPStrict.useMultiInstanceChecks = twoChecks; option name: penaliseNeutralExamples description: if set to true neutral examples are penalised -values: class org.dllearner.core.options.BooleanConfigOption -default value: null -CLI usage: posNegDefinitionLPStrict.penaliseNeutralExamples = null; +allowed values: boolean +default value: not set +conf file usage: posNegDefinitionLPStrict.penaliseNeutralExamples = ; option name: accuracyPenalty description: penalty for pos/neg examples which are classified as neutral -values: class org.dllearner.core.options.DoubleConfigOption +allowed values: double default value: 1.0 -CLI usage: posNegDefinitionLPStrict.accuracyPenalty = 1.0; +conf file usage: posNegDefinitionLPStrict.accuracyPenalty = 1.0; option name: errorPenalty description: penalty for pos. examples classified as negative or vice versa -values: class org.dllearner.core.options.DoubleConfigOption +allowed values: double default value: 3.0 -CLI usage: posNegDefinitionLPStrict.errorPenalty = 3.0; +conf file usage: posNegDefinitionLPStrict.errorPenalty = 3.0; component: positive only definition learning problem (org.dllearner.learningproblems.PosOnlyLP) =============================================================================================== -CLI usage: problem = null; +conf file usage: problem = null; option name: positiveExamples description: positive examples -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: null.positiveExamples = null; +allowed values: Set<String> +default value: not set (mandatory) +conf file usage: null.positiveExamples = ; *********************** @@ -415,624 +388,624 @@ component: brute force learning algorithm (org.dllearner.algorithms.BruteForceLearner) ====================================================================================== -CLI usage: algorithm = bruteForce; +conf file usage: algorithm = bruteForce; option name: maxLength description: maximum length of generated concepts -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 7 -CLI usage: bruteForce.maxLength = 7; +conf file usage: bruteForce.maxLength = 7; option name: returnType description: Specifies the type which the solution has to belong to (if already) known. This means we inform the learning algorithm that the solution is a subclass of this type. -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: bruteForce.returnType = null; +allowed values: String [] +default value: not set +conf file usage: bruteForce.returnType = ; component: random guesser learning algorithm (org.dllearner.algorithms.RandomGuesser) ===================================================================================== -CLI usage: algorithm = random; +conf file usage: algorithm = random; option name: numberOfTrees description: number of randomly generated concepts/trees -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 5 -CLI usage: random.numberOfTrees = 5; +conf file usage: random.numberOfTrees = 5; option name: maxDepth description: maximum depth of generated concepts/trees -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 5 -CLI usage: random.maxDepth = 5; +conf file usage: random.maxDepth = 5; component: CELOE (org.dllearner.algorithms.celoe.CELOE) ======================================================= -CLI usage: algorithm = celoe; +conf file usage: algorithm = celoe; option name: useAllConstructor description: specifies whether the universal concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useAllConstructor = true; +conf file usage: celoe.useAllConstructor = true; option name: useExistsConstructor description: specifies whether the existential concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useExistsConstructor = true; +conf file usage: celoe.useExistsConstructor = true; option name: useHasValueConstructor description: specifies whether the hasValue constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: celoe.useHasValueConstructor = false; +conf file usage: celoe.useHasValueConstructor = false; option name: valueFrequencyThreshold description: specifies how often an object must occur as value in order to be considered for hasValue restrictions -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 3 -CLI usage: celoe.valueFrequencyThreshold = 3; +conf file usage: celoe.valueFrequencyThreshold = 3; option name: useCardinalityRestrictions description: specifies whether CardinalityRestrictions is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useCardinalityRestrictions = true; +conf file usage: celoe.useCardinalityRestrictions = true; option name: cardinalityLimit description: Gives the maximum number used in cardinality restrictions. -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 5 -CLI usage: celoe.cardinalityLimit = 5; +conf file usage: celoe.cardinalityLimit = 5; option name: useNegation description: specifies whether negation is used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useNegation = true; +conf file usage: celoe.useNegation = true; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useBooleanDatatypes = true; +conf file usage: celoe.useBooleanDatatypes = true; option name: useDoubleDatatypes description: specifies whether boolean datatypes are used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: celoe.useDoubleDatatypes = true; +conf file usage: celoe.useDoubleDatatypes = true; option name: maxExecutionTimeInSeconds description: algorithm will stop after specified seconds -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 10 -CLI usage: celoe.maxExecutionTimeInSeconds = 10; +conf file usage: celoe.maxExecutionTimeInSeconds = 10; option name: noisePercentage description: the (approximated) percentage of noise within the examples -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 100.0 +allowed values: double min 0.0 max 100.0 default value: 0.0 -CLI usage: celoe.noisePercentage = 0.0; +conf file usage: celoe.noisePercentage = 0.0; option name: maxDepth description: maximum depth of description -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 4 -CLI usage: celoe.maxDepth = 4; +conf file usage: celoe.maxDepth = 4; component: standard EL learning algorithm (org.dllearner.algorithms.el.ELLearningAlgorithm) =========================================================================================== -CLI usage: algorithm = el; +conf file usage: algorithm = el; component: genetic programming learning algorithm (org.dllearner.algorithms.gp.GP) ================================================================================== -CLI usage: algorithm = gp; +conf file usage: algorithm = gp; option name: selectionType description: selection type -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [fps, rankSelection, tournament] default value: rankSelection -CLI usage: gp.selectionType = rankSelection; +conf file usage: gp.selectionType = rankSelection; option name: tournamentSize description: tournament size (applies only to tournament selection) -values: class org.dllearner.core.options.IntegerConfigOption min 2 max 20 +allowed values: int min 2 max 20 default value: 3 -CLI usage: gp.tournamentSize = 3; +conf file usage: gp.tournamentSize = 3; option name: elitism description: specifies whether to use elitism in selection -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: gp.elitism = true; +conf file usage: gp.elitism = true; option name: algorithmType description: algorithm type -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [generational, steadyState] default value: steadyState -CLI usage: gp.algorithmType = steadyState; +conf file usage: gp.algorithmType = steadyState; option name: mutationProbability description: mutation probability -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.03 -CLI usage: gp.mutationProbability = 0.03; +conf file usage: gp.mutationProbability = 0.03; option name: crossoverProbability description: crossover probability -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.95 -CLI usage: gp.crossoverProbability = 0.95; +conf file usage: gp.crossoverProbability = 0.95; option name: hillClimbingProbability description: hill climbing probability -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.0 -CLI usage: gp.hillClimbingProbability = 0.0; +conf file usage: gp.hillClimbingProbability = 0.0; option name: refinementProbability description: refinement operator probability (values higher than 0 turn this into a hybrid GP algorithm - see publication) -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.0 -CLI usage: gp.refinementProbability = 0.0; +conf file usage: gp.refinementProbability = 0.0; option name: numberOfIndividuals description: number of individuals -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 100 -CLI usage: gp.numberOfIndividuals = 100; +conf file usage: gp.numberOfIndividuals = 100; option name: numberOfSelectedIndividuals description: number of selected individuals -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 92 -CLI usage: gp.numberOfSelectedIndividuals = 92; +conf file usage: gp.numberOfSelectedIndividuals = 92; option name: useFixedNumberOfGenerations description: specifies whether to use a fixed number of generations -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: gp.useFixedNumberOfGenerations = false; +conf file usage: gp.useFixedNumberOfGenerations = false; option name: generations description: number of generations (only valid if a fixed number of generations is used) -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 20 -CLI usage: gp.generations = 20; +conf file usage: gp.generations = 20; option name: postConvergenceGenerations description: number of generations after which to stop if no improvement wrt. the best solution has been achieved -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 50 -CLI usage: gp.postConvergenceGenerations = 50; +conf file usage: gp.postConvergenceGenerations = 50; option name: adc description: whether to use automatically defined concept (this invents new helper concepts, but enlarges the search space -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: gp.adc = false; +conf file usage: gp.adc = false; option name: initMinDepth description: minimum depth to use when creating the initial population -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 4 -CLI usage: gp.initMinDepth = 4; +conf file usage: gp.initMinDepth = 4; option name: initMaxDepth description: maximum depth to use when creating the initial population -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 6 -CLI usage: gp.initMaxDepth = 6; +conf file usage: gp.initMaxDepth = 6; option name: maxConceptLength description: maximum concept length (higher length means lowest possible fitness) -values: class org.dllearner.core.options.IntegerConfigOption min 1 +allowed values: int min 1 default value: 75 -CLI usage: gp.maxConceptLength = 75; +conf file usage: gp.maxConceptLength = 75; component: refinement operator based learning algorithm (org.dllearner.algorithms.refinement.ROLearner) ======================================================================================================= -CLI usage: algorithm = refinement; +conf file usage: algorithm = refinement; option name: writeSearchTree description: specifies whether to write a search tree -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refinement.writeSearchTree = false; +conf file usage: refinement.writeSearchTree = false; option name: searchTreeFile description: file to use for the search tree -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: log/searchTree.txt -CLI usage: refinement.searchTreeFile = log/searchTree.txt; +conf file usage: refinement.searchTreeFile = log/searchTree.txt; option name: replaceSearchTree description: specifies whether to replace the search tree in the log file after each run or append the new search tree -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refinement.replaceSearchTree = false; +conf file usage: refinement.replaceSearchTree = false; option name: heuristic description: specifiy the heuristic to use -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [flexible, lexicographic] default value: lexicographic -CLI usage: refinement.heuristic = lexicographic; +conf file usage: refinement.heuristic = lexicographic; option name: applyAllFilter description: usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.applyAllFilter = true; +conf file usage: refinement.applyAllFilter = true; option name: applyExistsFilter description: usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.applyExistsFilter = true; +conf file usage: refinement.applyExistsFilter = true; option name: useTooWeakList description: try to filter out too weak concepts without sending them to the reasoner -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useTooWeakList = true; +conf file usage: refinement.useTooWeakList = true; option name: useOverlyGeneralList description: try to find overly general concept without sending them to the reasoner -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useOverlyGeneralList = true; +conf file usage: refinement.useOverlyGeneralList = true; option name: useShortConceptConstruction description: shorten concept to see whether they already exist -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useShortConceptConstruction = true; +conf file usage: refinement.useShortConceptConstruction = true; option name: horizontalExpansionFactor description: horizontal expansion factor (see publication for description) -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.6 -CLI usage: refinement.horizontalExpansionFactor = 0.6; +conf file usage: refinement.horizontalExpansionFactor = 0.6; option name: improveSubsumptionHierarchy description: simplify subsumption hierarchy to reduce search space (see publication for description) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.improveSubsumptionHierarchy = true; +conf file usage: refinement.improveSubsumptionHierarchy = true; option name: quiet description: may be deprecated soon -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refinement.quiet = false; +conf file usage: refinement.quiet = false; option name: allowedConcepts description: concepts the algorithm is allowed to use -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refinement.allowedConcepts = null; +allowed values: Set<String> +default value: not set +conf file usage: refinement.allowedConcepts = ; option name: ignoredConcepts description: concepts the algorithm must ignore -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refinement.ignoredConcepts = null; +allowed values: Set<String> +default value: not set +conf file usage: refinement.ignoredConcepts = ; option name: allowedRoles description: roles the algorithm is allowed to use -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refinement.allowedRoles = null; +allowed values: Set<String> +default value: not set +conf file usage: refinement.allowedRoles = ; option name: ignoredRoles description: roles the algorithm must ignore -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refinement.ignoredRoles = null; +allowed values: Set<String> +default value: not set +conf file usage: refinement.ignoredRoles = ; option name: useAllConstructor description: specifies whether the universal concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useAllConstructor = true; +conf file usage: refinement.useAllConstructor = true; option name: useExistsConstructor description: specifies whether the existential concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useExistsConstructor = true; +conf file usage: refinement.useExistsConstructor = true; option name: useNegation description: specifies whether negation is used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useNegation = true; +conf file usage: refinement.useNegation = true; option name: useCardinalityRestrictions description: specifies whether CardinalityRestrictions is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useCardinalityRestrictions = true; +conf file usage: refinement.useCardinalityRestrictions = true; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refinement.useBooleanDatatypes = true; +conf file usage: refinement.useBooleanDatatypes = true; option name: maxExecutionTimeInSeconds description: algorithm will stop after specified seconds -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refinement.maxExecutionTimeInSeconds = 0; +conf file usage: refinement.maxExecutionTimeInSeconds = 0; option name: minExecutionTimeInSeconds description: algorithm will run at least specified seconds -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refinement.minExecutionTimeInSeconds = 0; +conf file usage: refinement.minExecutionTimeInSeconds = 0; option name: guaranteeXgoodDescriptions description: algorithm will run until X good (100%) concept descritpions are found -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 1 -CLI usage: refinement.guaranteeXgoodDescriptions = 1; +conf file usage: refinement.guaranteeXgoodDescriptions = 1; option name: logLevel description: determines the logLevel for this component, can be {TRACE, DEBUG, INFO} -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: DEBUG -CLI usage: refinement.logLevel = DEBUG; +conf file usage: refinement.logLevel = DEBUG; component: refinement operator based learning algorithm II (org.dllearner.algorithms.refinement2.ROLComponent2) =============================================================================================================== -CLI usage: algorithm = refexamples; +conf file usage: algorithm = refexamples; option name: writeSearchTree description: specifies whether to write a search tree -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refexamples.writeSearchTree = false; +conf file usage: refexamples.writeSearchTree = false; option name: searchTreeFile description: file to use for the search tree -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: log/searchTree.txt -CLI usage: refexamples.searchTreeFile = log/searchTree.txt; +conf file usage: refexamples.searchTreeFile = log/searchTree.txt; option name: replaceSearchTree description: specifies whether to replace the search tree in the log file after each run or append the new search tree -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refexamples.replaceSearchTree = false; +conf file usage: refexamples.replaceSearchTree = false; option name: heuristic description: specifiy the heuristic to use -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [flexible, lexicographic] default value: lexicographic -CLI usage: refexamples.heuristic = lexicographic; +conf file usage: refexamples.heuristic = lexicographic; option name: applyAllFilter description: usage of equivalence ALL R.C AND ALL R.D = ALL R.(C AND D) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.applyAllFilter = true; +conf file usage: refexamples.applyAllFilter = true; option name: applyExistsFilter description: usage of equivalence EXISTS R.C OR EXISTS R.D = EXISTS R.(C OR D) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.applyExistsFilter = true; +conf file usage: refexamples.applyExistsFilter = true; option name: useTooWeakList description: try to filter out too weak concepts without sending them to the reasoner -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useTooWeakList = true; +conf file usage: refexamples.useTooWeakList = true; option name: useOverlyGeneralList description: try to find overly general concept without sending them to the reasoner -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useOverlyGeneralList = true; +conf file usage: refexamples.useOverlyGeneralList = true; option name: useShortConceptConstruction description: shorten concept to see whether they already exist -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useShortConceptConstruction = true; +conf file usage: refexamples.useShortConceptConstruction = true; option name: horizontalExpansionFactor description: horizontal expansion factor (see publication for description) -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 1.0 +allowed values: double min 0.0 max 1.0 default value: 0.6 -CLI usage: refexamples.horizontalExpansionFactor = 0.6; +conf file usage: refexamples.horizontalExpansionFactor = 0.6; option name: improveSubsumptionHierarchy description: simplify subsumption hierarchy to reduce search space (see publication for description) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.improveSubsumptionHierarchy = true; +conf file usage: refexamples.improveSubsumptionHierarchy = true; option name: allowedConcepts description: concepts the algorithm is allowed to use -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refexamples.allowedConcepts = null; +allowed values: Set<String> +default value: not set +conf file usage: refexamples.allowedConcepts = ; option name: ignoredConcepts description: concepts the algorithm must ignore -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refexamples.ignoredConcepts = null; +allowed values: Set<String> +default value: not set +conf file usage: refexamples.ignoredConcepts = ; option name: allowedRoles description: roles the algorithm is allowed to use -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refexamples.allowedRoles = null; +allowed values: Set<String> +default value: not set +conf file usage: refexamples.allowedRoles = ; option name: ignoredRoles description: roles the algorithm must ignore -values: class org.dllearner.core.options.StringSetConfigOption -default value: null -CLI usage: refexamples.ignoredRoles = null; +allowed values: Set<String> +default value: not set +conf file usage: refexamples.ignoredRoles = ; option name: useAllConstructor description: specifies whether the universal concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useAllConstructor = true; +conf file usage: refexamples.useAllConstructor = true; option name: useExistsConstructor description: specifies whether the existential concept constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useExistsConstructor = true; +conf file usage: refexamples.useExistsConstructor = true; option name: useHasValueConstructor description: specifies whether the hasValue constructor is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refexamples.useHasValueConstructor = false; +conf file usage: refexamples.useHasValueConstructor = false; option name: valueFrequencyThreshold description: specifies how often an object must occur as value in order to be considered for hasValue restrictions -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 3 -CLI usage: refexamples.valueFrequencyThreshold = 3; +conf file usage: refexamples.valueFrequencyThreshold = 3; option name: useCardinalityRestrictions description: specifies whether CardinalityRestrictions is used in the learning algorithm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useCardinalityRestrictions = true; +conf file usage: refexamples.useCardinalityRestrictions = true; option name: cardinalityLimit description: Gives the maximum number used in cardinality restrictions. -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 5 -CLI usage: refexamples.cardinalityLimit = 5; +conf file usage: refexamples.cardinalityLimit = 5; option name: useNegation description: specifies whether negation is used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useNegation = true; +conf file usage: refexamples.useNegation = true; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useBooleanDatatypes = true; +conf file usage: refexamples.useBooleanDatatypes = true; option name: useDoubleDatatypes description: specifies whether boolean datatypes are used in the learning algorothm -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.useDoubleDatatypes = true; +conf file usage: refexamples.useDoubleDatatypes = true; option name: maxExecutionTimeInSeconds description: algorithm will stop after specified seconds -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refexamples.maxExecutionTimeInSeconds = 0; +conf file usage: refexamples.maxExecutionTimeInSeconds = 0; option name: minExecutionTimeInSeconds description: algorithm will run at least specified seconds -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refexamples.minExecutionTimeInSeconds = 0; +conf file usage: refexamples.minExecutionTimeInSeconds = 0; option name: guaranteeXgoodDescriptions description: algorithm will run until X good (100%) concept descritpions are found -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 1 -CLI usage: refexamples.guaranteeXgoodDescriptions = 1; +conf file usage: refexamples.guaranteeXgoodDescriptions = 1; option name: maxClassDescriptionTests description: 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.) -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refexamples.maxClassDescriptionTests = 0; +conf file usage: refexamples.maxClassDescriptionTests = 0; option name: logLevel description: determines the logLevel for this component, can be {TRACE, DEBUG, INFO} -values: class org.dllearner.core.options.StringConfigOption +allowed values: String [] default value: DEBUG -CLI usage: refexamples.logLevel = DEBUG; +conf file usage: refexamples.logLevel = DEBUG; option name: usePropernessChecks description: specifies whether to check for equivalence (i.e. discard equivalent refinements) -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: false -CLI usage: refexamples.usePropernessChecks = 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 -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 4 -CLI usage: refexamples.maxPosOnlyExpansion = 4; +conf file usage: refexamples.maxPosOnlyExpansion = 4; option name: noisePercentage description: the (approximated) percentage of noise within the examples -values: class org.dllearner.core.options.DoubleConfigOption min 0.0 max 100.0 +allowed values: double min 0.0 max 100.0 default value: 0.0 -CLI usage: refexamples.noisePercentage = 0.0; +conf file usage: refexamples.noisePercentage = 0.0; option name: terminateOnNoiseReached description: specifies whether to terminate when noise criterion is met -values: class org.dllearner.core.options.BooleanConfigOption +allowed values: boolean default value: true -CLI usage: refexamples.terminateOnNoiseReached = true; +conf file usage: refexamples.terminateOnNoiseReached = true; option name: startClass description: the named class which should be used to start the algorithm (GUI: needs a widget for selecting a class) -values: class org.dllearner.core.options.StringConfigOption -default value: null -CLI usage: refexamples.startClass = null; +allowed values: String [] +default value: not set +conf file usage: refexamples.startClass = ; option name: forceRefinementLengthIncrease description: specifies whether nodes should be expanded until only longer refinements are reached -values: class org.dllearner.core.options.BooleanConfigOption -default value: null -CLI usage: refexamples.forceRefinementLengthIncrease = null; +allowed values: boolean +default value: not set +conf file usage: refexamples.forceRefinementLengthIncrease = ; option name: negativeWeight description: Used to penalise errors on negative examples different from those of positive examples (lower = less importance for negatives). -values: class org.dllearner.core.options.DoubleConfigOption +allowed values: double default value: 1.0 -CLI usage: refexamples.negativeWeight = 1.0; +conf file usage: refexamples.negativeWeight = 1.0; option name: startNodeBonus description: You can use this to give a heuristic bonus on the start node (= initially broader exploration of search space). -values: class org.dllearner.core.options.DoubleConfigOption +allowed values: double default value: 0.0 -CLI usage: refexamples.startNodeBonus = 0.0; +conf file usage: refexamples.startNodeBonus = 0.0; option name: negationPenalty description: Penalty on negations (TODO: better explanation). -values: class org.dllearner.core.options.IntegerConfigOption +allowed values: int default value: 0 -CLI usage: refexamples.negationPenalty = 0; +conf file usage: refexamples.negationPenalty = 0; option name: expansionPenaltyFactor description: describes the reduction in heuristic score one is willing to accept for reducing the length of the concept by one -values: class org.dllearner.core.options.DoubleConfigOption +allowed values: double default value: 0.02 -CLI usage: refexamples.expansionPenaltyFactor = 0.02; +conf file usage: refexamples.expansionPenaltyFactor = 0.02; Property changes on: trunk/examples/arch ___________________________________________________________________ Added: svn:ignore + arch_inconsistent.owl Property changes on: trunk/lib ___________________________________________________________________ Modified: svn:ignore - kaon2.jar + kaon2.jar rdbtoonto Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2009-02-18 11:33:18 UTC (rev 1611) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2009-02-18 13:09:16 UTC (rev 1612) @@ -46,6 +46,7 @@ import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.InvalidConfigOptionValueException; +import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.utilities.Files; /** @@ -503,7 +504,10 @@ doc += "*********************\n"; doc += "* Knowledge Sources *\n"; doc += "*********************\n\n"; + doc += "BEGIN MANUAL PART\n"; + doc += "END MANUAL PART\n\n"; for(Class<? extends Component> component : knowledgeSources) { + if(component != SparqlKnowledgeSource.class){continue;} doc += getComponentConfigString(component, KnowledgeSource.class); } @@ -542,14 +546,16 @@ } str += "\n\n"; if (componentType.equals(KnowledgeSource.class)){ - str += "CLI usage: "+cli+" (\"$url\", \""+usage+"\");\n\n"; + str += "conf file usage: "+cli+" (\"$url\", \""+usage.toUpperCase()+"\");\n\n"; }else{ - str += "CLI usage: "+cli+" = "+usage+";\n\n"; + str += "conf file usage: "+cli+" = "+usage+";\n\n"; } for(ConfigOption<?> option : componentOptions.get(component)) { - str += option.toString() + "CLI usage: "+usage+"." - + option.getName()+" = "+option.getDefaultValue()+";\n\n"; + String val = (option.getDefaultValue()==null)?"":option.getDefaultValue()+""; + str += option.toString() + + "conf file usage: "+usage+"." + + option.getName()+" = "+val+";\n\n"; } return str+"\n"; } Modified: trunk/src/dl-learner/org/dllearner/core/options/ConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/ConfigOption.java 2009-02-18 11:33:18 UTC (rev 1611) +++ trunk/src/dl-learner/org/dllearner/core/options/ConfigOption.java 2009-02-18 13:09:16 UTC (rev 1612) @@ -186,7 +186,7 @@ //TODO maybe change the function getClass in the options to get simpleName public String getAllowedValuesDescription() { - return getClass().toString(); + return getValueTypeAsJavaString(); } /** @@ -212,8 +212,13 @@ @Override public String toString() { - return "option name: " + name + "\ndescription: " + description + "\nvalues: " - + getAllowedValuesDescription() + "\ndefault value: " + defaultValue + "\n"; + String mand = (isMandatory())?" (mandatory)":""; + String defval = (defaultValue==null)?"not set":defaultValue+""; + return "option name: " + name + "\n" + + "description: " + description + "\n" + + "allowed values: " + getAllowedValuesDescription() + "\n" + + //"values: " + getValueTypeAsJavaString() + "\n" + + "default value: " + defval + mand+ "\n"; } public String getJavaDocString() { Modified: trunk/src/dl-learner/org/dllearner/core/options/DoubleConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/DoubleConfigOption.java 2009-02-18 11:33:18 UTC (rev 1611) +++ trunk/src/dl-learner/org/dllearner/core/options/DoubleConfigOption.java 2009-02-18 13:09:16 UTC (rev 1612) @@ -103,7 +103,7 @@ @Override public String getAllowedValuesDescription() { - String str = getClass().toString(); + String str = getValueTypeAsJavaString()+" ";//getClass().toString(); if (lowerLimit != Double.MIN_VALUE) str += " min " + lowerLimit; if (upperLimit != Double.MAX_VALUE) Modified: trunk/src/dl-learner/org/dllearner/core/options/IntegerConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/options/In... [truncated message content] |
From: <jen...@us...> - 2009-02-18 12:49:09
|
Revision: 1611 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1611&view=rev Author: jenslehmann Date: 2009-02-18 11:33:18 +0000 (Wed, 18 Feb 2009) Log Message: ----------- proof read manual Modified Paths: -------------- trunk/doc/manual/manual.tex Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-02-18 08:54:16 UTC (rev 1610) +++ trunk/doc/manual/manual.tex 2009-02-18 11:33:18 UTC (rev 1611) @@ -13,7 +13,7 @@ \urlstyle{tt} \urldef{\wwwc}{\url}{http://www.w3.org} \urldef{\owl}{\url}{http://www.w3.org/2004/OWL/} -\urldef{\owlce}{\url}{http://www.w3.org/TR/2008/WD-owl2-syntax-20081202/#Class_Expressions} +\urldef{\owlce}{\url}{http://www.w3.org/TR/owl2-syntax/#Class_Expressions} \urldef{\carc}{\url}{http://dl-learner.org/wiki/Carcinogenesis} \urldef{\dldownload}{\url}{http://sourceforge.net/project/showfiles.php?group_id=203619} \urldef{\mos}{\url}{http://www.co-ode.org/resources/reference/manchester_syntax/} @@ -36,7 +36,7 @@ \maketitle \begin{abstract} -DL-Learner is a machine learning framework for OWL and description logics. It includes several learning algorithms and is easy to extend. DL-Learner widens the scope of Inductive Logic Programming to Descriptions Logics and the Semantic Web. This manual provides the entry point to using DL-Learner and explains its basic concepts. +DL-Learner is a machine learning framework for OWL and description logics. It includes several learning algorithms and is easy to extend. DL-Learner widens the scope of Inductive Logic Programming to description logics and the Semantic Web. This manual provides the entry point to using DL-Learner and explains its basic concepts. \end{abstract} \tableofcontents @@ -52,21 +52,21 @@ \emph{Machine Learning} is a subfield of Artificial Intelligence, which focuses on detecting patterns, rules, models etc.~in data. Often, this involves a training process on the input data. In \emph{Supervised} learning, this data is labelled, i.e.~we are given a number of input-output mappings. Those mappings are also called \emph{examples}. If the output is binary, then we distinguish positive and negative examples. DL-Learner as a framework is not restricted to supervised learning, but all algorithms currently build into it, are supervised. -In the most common scenario we consider, supervised learning in OWL/DLs, means that we have a background knowledge base in OWL/DLs. Additionally, we are given positive and negative examples. Each example is an individual in our knowledge base. The goal is to find an OWL \emph{class expression}\footnote{\owlce} such that all/many of the positive examples are \emph{instances} of this expression and none/few of the negative examples are instances of it. The primary purpose of learning is to find a class expression, which can classify unseen individuals (i.e.~not belonging to the examples) correctly. It is also important that the obtained class expression is easy to understand for a domain expert. We call these criteria \emph{accuracy} and \emph{readability}. +In the most common scenario we consider, we have a background knowledge base in OWL/DLs and additionally, we are given positive and negative examples. Each example is an individual in our knowledge base. The goal is to find an OWL \emph{class expression}\footnote{\owlce} such that all/many of the positive examples are \emph{instances} of this expression and none/few of the negative examples are instances of it. The primary purpose of learning is to find a class expression, which can classify unseen individuals (i.e.~not belonging to the examples) correctly. It is also important that the obtained class expression is easy to understand for a domain expert. We call these criteria \emph{accuracy} and \emph{readability}. -As an example, consider the problem to find out whether a chemical compound can cause cancer\footnote{see \carc{} for a more detailed description}. In this case, the background knowledge contains information about chemical compounds in general and certain compounds we are interested in. The positive examples are those compounds causing cancer, whereas the negative examples are those compounds not causing cancer. The prediction for the examples is likely to have been obtained from experiments and long-term research trials in this case. Of course, all examples have to be present in the considered background knowledge. A learning algorithm can now derive a class expression from examples and background knowledge, e.g.~this class expression in natural language could be ``chemical compounds containing a phosphorus atom''. (Of course, in practice the expression will be more complex to obtain a reasonable accuracy.) Using this class expression, we can not classify unseen chemical compounds. +As an example, consider the problem to find out whether a chemical compound can cause cancer\footnote{see \carc{} for a more detailed description}. In this case, the background knowledge contains information about chemical compounds in general and certain concrete compounds we are interested in. The positive examples are those compounds causing cancer, whereas the negative examples are those compounds not causing cancer. The prediction for the examples has been obtained from experiments and long-term research trials in this case. Of course, all examples have to be described in the considered background knowledge. A learning algorithm can now derive a class expression from examples and background knowledge, e.g.~such a class expression in natural language could be ``chemical compounds containing a phosphorus atom''. (Of course, in practice the expression will be more complex to obtain a reasonable accuracy.) Using this class expression, we can not classify unseen chemical compounds. \section{Getting Started} \label{sec:start} -DL-Learner is written in Java, i.e.~it can be used on all platforms supporting Java. Currently, Java 6 or higher is required. To install the latest release, please visit the download page\footnote{\dldownload} and extract the file on your harddisk. In the top level directory, you will notice several executables. Those files ending with \verb|bat| are Windows executables, whereas the corresponding files without file extension are the Non-Windows (e.g.~Linux, Mac) executables. To test whether DL-Learner works, please run the following on the command line depending on your operating system: +DL-Learner is written in Java, i.e.~it can be used on almost all platforms. Currently, Java 6 or higher is required. To install the latest release, please visit the download page\footnote{\dldownload} and extract the file on your harddisk. In the top level directory, you will notice several executables. Those files ending with \verb|bat| are Windows executables, whereas the corresponding files without file extension are the Non-Windows (e.g.~Linux, Mac) executables. To test whether DL-Learner works, please run the following on the command line depending on your operating system: \begin{verbatim} dllearner examples/father.conf (Non-Windows Operating System) dllearner.bat examples/father.conf (Windows Operating System) \end{verbatim} -\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 simples 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: +\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 @@ -84,7 +84,7 @@ Algorithm terminated succesfully. number of retrievals: 4 -retrieval reasoning time: 0ms ( 0ms per retrieval) +retrieval reasoning time: 0ms (0ms per retrieval) number of instance checks: 93 (0 multiple) instance check reasoning time: 1ms ( 0ms per instance check) overall reasoning time: 1ms (11,016% of overall runtime) @@ -116,25 +116,24 @@ \section{DL-Learner Components} \label{sec:components} -In this part, we describe concrete components currently implemented in DL-Learner. Each of the subsections contains a list of components according to the type specified in the subsection heading. Note that this does not constitute a full description, i.e.~we omit some components and many configuration options. The purpose of the manual is to obtain a general understanding of the implemented components. A full list of components, which is generated automatically from the source code, can be found in \verb|doc/configOptions.txt| including the default values for all options and their usage in conf files. \todo{ConfigDocumentationGenerator seems partially broken, because it prints things like CLI usage: null = owlAPIReasoner;} +In this part, we describe concrete components currently implemented in DL-Learner. Each of the subsections contains a list of components according to the type specified in the subsection heading. Note that this does not constitute a full description, i.e.~we omit some components and many configuration options. The purpose of the manual is to obtain a general understanding of the implemented components. A full list, which is generated automatically from the source code, can be found in \verb|doc/configOptions.txt| including the default values for all options and their usage in conf files. \subsection{Knowledge Sources} Knowledge sources have a URI and can be included in conf files using \verb|import("$url");|, e.g.~\verb|import("ontology.owl")|. Depending on the file ending, DL-Learner will guess the correct type of knowledge source. If you want to overwrite this, you can use a second parameter with value \verb|OWL|, \verb|KB|, or \verb|SPARQL|, e.g.~\verb|import("ontology.owl","OWL")|. \begin{description} - \item[OWL File] DL-Learner supports OWL files in different formats, e.g. RDF/XML or N-Triples. If there is a standard OWL format, you want to use, but is not supported by DL-Learner please let us know. We use the OWL API for parsing, so all formats supported by it can be used\footnote{ for a list see \url{http://owlapi.sourceforge.net/}}. + \item[OWL File] DL-Learner supports OWL files in different formats, e.g. RDF/XML or N-Triples. If there is a standard OWL format, you want to use, but is not supported by DL-Learner please let us know. We use the OWL API for parsing, so all formats supported by it can be used\footnote{ for a list see \owlapi}. \item[KB File] KB files are an internal non-standardised knowledge representation format, which corresponds to description logic syntax except that the special symbols have been replaced by ASCII strings, e.g.~\verb|AND| instead of $\sqcap$. You can find several KB files in the examples folder. - \item[SPARQL Endpoint] DL-Learner allows to use SPARQL endpoints as background knowledge source, which enables the incorporation of very large knowledge bases, e.g. DBpedia\cite{2008_dbpedia}, in DL-Learner. This works by using a set of start instances, which usually correspond to the examples in a learning problem, and then retrieving knowledge about these instances via SPARQL queries. The obtained knowledge base fragment can be converted to OWL and consumed by a reasoner later since it is now sufficiently small to be processed in reasonable time. Please see \cite{2009_ijswis} for details, the parameters for the extraction algorithm are similar (different names only) to the ones here. Some options of the SPARQL component are: + \item[SPARQL Endpoint] DL-Learner allows to use SPARQL endpoints as background knowledge source, which enables the incorporation of very large knowledge bases, e.g. DBpedia\cite{2008_dbpedia}, in DL-Learner. This works by using a set of start instances, which usually correspond to the examples in a learning problem, and then retrieving knowledge about these instances via SPARQL queries. The obtained knowledge base fragment can be converted to OWL and consumed by a reasoner later since it is now sufficiently small to be processed in reasonable time. Please see \cite{2009_ijswis} for details about the knowledge fragment extraction algorithm. Some options of the SPARQL component are: \begin{itemize} \item instances: Set of individuals to use for starting the knowledge fragment extraction. Example use in conf file: \begin{verbatim}sparql.instances = {"http://dbpedia.org/resource/Matt_Stone", "http://dbpedia.org/resource/Sarah_Silverman"};\end{verbatim} - \item recursionDepth: Maximum distance of an extracted individual from a start individual. This influences the size of the extracted fragment and depends on the maximum property depth you want the learned class expression to have. Example use in conf file: \verb|sparql.recursionDepth = 1;|. -\item pecifies whether the extracted ontology is written to a file or not. The OWL file is written to the cache dir. The output is produced by OWL API, which does not check URI validity, but rather writes invalid XML. -\verb|sparql.saveExtractedFragment = true;| + \item recursionDepth: Maximum distance of an extracted individual from a start individual. This influences the size of the extracted fragment and depends on the maximum property depth you want the learned class expression to have. Example use in conf file: \verb|sparql.recursionDepth = 2;|. +\item saveExtractedFragment: Specifies whether the extracted ontology is written to a file or not. If set to true, then the OWL file is written to the cache dir. Example usage: \verb|sparql.saveExtractedFragment = true;| \end{itemize} Many further options allow to modify the extracted fragment on the fly or fine-tune the extraction process. -The extraction can be started separately by running and modifying \verb|org.dllearner.test.SparqlExtractionTest|. The collected ontology will be saved in the root dir. +The extraction can be started separately by running and modifying \verb|org.dllearner.test.SparqlExtractionTest|. The collected ontology will be saved in the DL-Learner directory. \end{description} \subsection{Reasoner Components} @@ -142,50 +141,48 @@ Several reasoner components are implemented, which can be interfaces to concrete reasoner implementations. To select a component in a conf file, use \verb|reasoner=$value;|, where \verb|$value| is one of \verb|digReasoner|, \verb|fastInstanceChecker|, or \verb|owlAPIReasoner|, which are explained below. \begin{description} - \item[OWL API] The OWL API\footnote{\owlapi} reasoner interface can be used in conjunction with the Pellet and FaCT++ reasoners. The only option allows to switch between both: + \item[OWL API] The OWL API reasoner interface can be used in conjunction with the Pellet and FaCT++ reasoners. The only option allows to switch between both: \begin{itemize} \item reasonerType: Selects the desired reasoner. By default, Pellet is used. Usage: \verb|owlAPIReasoner.reasonerType = fact;|. Note that FaCT++ is written in C++ and we currently ship the 32 bit version of the JNI layer. This may change to 64 bit in the future. \end{itemize} \item[DIG] DIG 1.1\footnote{\dig} is an interface to description logic reasoners and supported by a large variety of reasoners including Pellet, FaCT++, KAON2, and Racer Pro. The major drawback is that the current version DIG 1.1 is not aligned with the OWL specification and therefore lacks several features, which are crucial to the more recent learning algorithms in DL-Learner. If you still want to use the DIG interface, you have to download a DIG capable reasoner and start the DIG server there. DL-Learner communicates with the reasoner using the XML based protocol over HTTP. - \item[Fast Instance Checker] Instance checks, i.e.~testing whether an individual is instance of a class, is the major reasoner task in many learning algorithms. This reasoner is a self-development of the DL-Learner project. It remedies some problems related to Machine Learning and the Open World Assumption in OWL and therefore is not correct w.r.t.~OWL semantics. (See \cite{cheng00} Section 4 for an explanation.) Furthermore, it provides an improved performance for instance checks by precomputing some inferences. The fast instance checker is build on top of Pellet and the default reasoner component in DL-Learner. + \item[Fast Instance Checker] Instance checks, i.e.~testing whether an individual is instance of a class, is the major reasoner task in many learning algorithms. This reasoner is a self-development of the DL-Learner project. It remedies some problems related to Machine Learning and the Open World Assumption in OWL and therefore is not correct w.r.t.~OWL semantics. (See \cite{cheng00} Section 4 for an explanation.) Furthermore, it provides an improved performance for instance checks by precomputing some inferences and keeping them in memory. The fast instance checker is build on top of Pellet and the default reasoner component in DL-Learner. \end{description} \subsection{Learning Problems} -In the introduction 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|. -Default is \verb|posNegDefinitionLP;|. +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.} \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 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 individuals. - \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 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 is under construction, but will be implemented soon.} + \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.} \end{description} \subsection{Learning Algorithms} -The implemented algorithms vary from very simple (and usually inappropriate) algorithms to sophisticated ones. You can switch between the different algorithms using \verb|algorithm=$value;|, where \verb|$value| is one of \verb|bruteForce|, \verb|random|, \verb|gp|, \verb|refinement|, \verb|refexamples|, and \verb|celoe|. \todo{Rename refexamples to refinement2.} -Default is \verb|refexamples| (i.e. Refinement II). +The implemented algorithms vary from very simple (and usually inappropriate) algorithms to sophisticated ones. You can switch between the different algorithms using \verb|algorithm=$value;|, where \verb|$value| is one of \verb|bruteForce|, \verb|random|, \verb|gp|, \verb|refinement|, \verb|refinement2|, and \verb|celoe|. The default is \verb|refinement2|. \begin{description} \item[Brute Force]: This algorithm tests all class expressions up to a specified length, which you can set using e.g.~\verb|bruteForce.maxlength = 7|. - \item[Random Guesser]: This algorithm randomly generates class expressions. To do this it creates trees, which can be mapped to class expressions. Its main parameter is the number of created trees, which you can set using e.g.~\verb|random.numberOfTrees = 5|. + \item[Random Guesser]: This algorithm randomly generates class expressions. To do this, it creates trees, which can be mapped to class expressions. Its main parameter is the number of created trees, which you can set using e.g.~\verb|random.numberOfTrees = 5|. \item[Genetic Programming (GP)]: GP is a well-known general problem solution method, which can be adapted to class expression learning. The adaption is straightforward. In DL-Learner, however, an additional genetic refinement operator was implemented, which has shown to improve GP performance\cite{hybrid_gp}. Some options are: \begin{itemize} - \item number of individuals: The individual count is the size of each generation in a GP algorithm. It is one of the most crucial parameters. Setting it to a higher value usually means investing more computational resource for increasing the likelihood that a solution will be found. Usage: \verb|gp.numberOfIndividuals = 100| + \item number of individuals: The individual count is the size of each generation in a GP algorithm. It is one of the most crucial parameters. Setting it to a higher value usually means investing more computational resource for increasing the likelihood that a solution will be found. Usage: \verb|gp.numberOfIndividuals = 100|. \item refinement probability: This is used to specify how likely the usage of the genetic refinement operator should be, e.g.~\verb|gp.refinementProbability = 0.6| means that it will be selected 60\% of the time. \end{itemize} The GP algorithm has 15 more options documented in \verb|doc/configOptions.txt|. \item[Refinement] This is a top down refinement operator approach, which is described in \cite{alc_learning_algorithm}. Some options include: \begin{itemize} - \item target language: The standard target language of this algorithm is $\mathcal{ALCN(D)}$. However, you can specify the target language in more detail, i.e.~you can exclude the $\forall$ constructor by using \verb|refinement.useAllConstructor = true;|. Similar options exist for $\exists$, $\neg$, cardinality restrictions, and boolean datatypes. - \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 executiontime since it waits for the next internal loop of the algorithm to stop gracefully. + \item target language: The standard target language of this algorithm is $\mathcal{ALCN(D)}$. However, you can change the language, i.e.~you can exclude the $\forall$ constructor by using \verb|refinement.useAllConstructor = false;|. Similar options exist for $\exists$, $\neg$, cardinality restrictions, and boolean datatypes. + \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{say more about it?, include option descriptions?, rename noise to minAccuracy which describes it better} + \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.} \end{description} -Please note that while components are interchangeable, it is not possibly 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 a learning algorithm 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. 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. \section{DL-Learner Interfaces} @@ -198,24 +195,19 @@ \label{fig:gui} \end{figure} -Apart from the command line, there is also a prototypical graphical interface. You can use \verb|gui| (or \verb|gui.bat|) to start it. You can optionally pass it a conf file 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. +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 operation -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 (almost undocumented)} +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} -The fourth interface provides convenient methods to build tools with the DL-Learner in Java. Configurators as java classes are automatically created for each component with the help of \verb|org.dllearner.scripts.ConfigJavaGenerator| as explained in Section \ref{sec:developing}. An example can be found in \verb|org.dllearner.scripts.NewSample|, which is especially usefull, if you use eclipse together with its autocompletion feature. - - 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}. \section{Extending DL-Learner} \label{sec:developing} -DL-Learner is open source and component based. If you want to develop a specific part or extension of a class expression learning algorithm for OWL, then you are invited to use DL-Learner as a base. This allows you to focus on the part you want to implement while being able to use DL-Learner as a library and access it through one of the interfaces. In a first step, you have to decide which type of component you want to create. To implement a concrete component, you have to subclass one of the following classes and implement their abstract methods: +DL-Learner is open source and component based. If you want to develop a specific part or extension of a class expression learning algorithm for OWL, then you are invited to use DL-Learner as a base. This allows you to focus on the part you want to implement while being able to use DL-Learner as a library and access it through one of the interfaces. +If you want to create a new component, then you first have to decide on the type of your component. To implement a concrete component, you have to subclass one of the following classes and implement their abstract methods: + \begin{itemize} \item org.dllearner.core.KnowledgeSource \item org.dllearner.core.ReasonerComponent @@ -234,8 +226,10 @@ } \end{verbatim} -This creates an option with name \verb|maxDepth|, the given description, and a default value of 5. To add further options, simply add more of them to the collection. Running \verb|org.dllearner.scripts.ConfigJavaGenerator| generates a file for you in package \verb|org.dllearner.configurators| to access the options of your component programmatically if desired. Currently, the following configuration option types exist (new ones can be implemented if necessary): +This creates an option with name \verb|maxDepth|, the given description, and a default value of 5. To add further options, simply add more of them to the collection. If desired, running \verb|org.dllearner.scripts.ConfigJavaGenerator| generates a file for you in package \verb|org.dllearner.configurators| to access the options of your component programmatically. These configurator classes are particularly useful to build scripts or tools on top of DL-Learner components. An example for this can be found in \verb|org.dllearner.scripts.NewSample|. +Currently, the following configuration option types exist (new ones can be implemented if necessary): + \begin{itemize} \item boolean, e.g. \verb|useCache| \item string (a set of allowed strings can be specified), e.g. \verb|cacheDir| @@ -246,7 +240,7 @@ \item list of string tuples, e.g. \verb|replaceObject| \end{itemize} -Although, we loose the ability to use arbitrary argument types as options in components, this gives us the possibility to build very flexible user interfaces. Whenever, a new component or a new configuration option for a component is added, the current user interfaces (GUI, web service, commandline) will automatically support it without any or only minimal code changes. +Restricting to these option types this gives us the possibility to build very flexible user interfaces. Whenever, a new component or a new configuration option for a component is added, the current user interfaces (GUI, web service, commandline) will automatically support it without any or only minimal code changes. This quick introduction only serves as an entry point to get you started. For more detailed questions about how to extend DL-Learner, please drop us a message in the DL-Learner mailing list. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2009-02-18 08:54:20
|
Revision: 1610 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1610&view=rev Author: jenslehmann Date: 2009-02-18 08:54:16 +0000 (Wed, 18 Feb 2009) Log Message: ----------- accuracy of solutions displayed; some cleanup Modified Paths: -------------- trunk/doc/manual/manual.tex trunk/src/dl-learner/org/dllearner/Info.java trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLPStandard.java trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyLP.java Modified: trunk/doc/manual/manual.tex =================================================================== --- trunk/doc/manual/manual.tex 2009-02-17 19:23:47 UTC (rev 1609) +++ trunk/doc/manual/manual.tex 2009-02-18 08:54:16 UTC (rev 1610) @@ -70,30 +70,27 @@ \begin{verbatim} DL-Learner 2008-10-13 command line interface -starting component manager ... OK (81ms) +starting component manager ... OK (157ms) initialising component "OWL file" ... OK (0ms) -initialising component "fast instance checker" ... OK (861ms) -initialising component "two valued definition learning - problem" ... OK (0ms) -initialising component "refinement operator based learning - algorithm II" ... OK (14ms) +initialising component "fast instance checker" ... OK (842ms) +initialising component "pos neg learning problem" ... OK (0ms) +initialising component "refinement operator based + learning algorithm II" ... OK (14ms) starting top down refinement with: Thing (50% accuracy) more accurate (83,33%) class expression found: male solutions (at most 20 are shown): -1: (male and hasChild some Thing) (length 5, depth 3) +1: (male and hasChild some Thing) (accuracy 100%, length 5, depth 3) Algorithm terminated succesfully. number of retrievals: 4 retrieval reasoning time: 0ms ( 0ms per retrieval) number of instance checks: 93 (0 multiple) -instance check reasoning time: 0ms ( 0ms per instance check) -overall reasoning time: 0ms (1,931% of overall runtime) -overall algorithm runtime: 28ms +instance check reasoning time: 1ms ( 0ms per instance check) +overall reasoning time: 1ms (11,016% of overall runtime) +overall algorithm runtime: 17ms \end{verbatim} -\todo{display accuracy of solutions} - The first part of the output tells you which components are used (more on this in Section \ref{sec:components}). In the second part you see output coming from the used learning algorithm, i.e.~it can print information while running (``more accurate (83,33\%) class description found'') and the final solutions, it computed. The results are displayed in Manchester OWL Syntax\footnote{\mos}. There can be several solutions, in which case they are ordered with the most promising one in the first position. In this case the only solution is \verb|male and hasChild some Thing| defining the class father. The last part of the output contains some runtime statistics. \section{DL-Learner Architecture} @@ -126,7 +123,7 @@ Knowledge sources have a URI and can be included in conf files using \verb|import("$url");|, e.g.~\verb|import("ontology.owl")|. Depending on the file ending, DL-Learner will guess the correct type of knowledge source. If you want to overwrite this, you can use a second parameter with value \verb|OWL|, \verb|KB|, or \verb|SPARQL|, e.g.~\verb|import("ontology.owl","OWL")|. \begin{description} - \item[OWL File] DL-Learner supports OWL files in different formats, e.g. RDF/XML or N-Triples. If there is a standard OWL format, you want to use, but is not supported by DL-Learner please let us know. Note: As we use the OWL API for parsing, all formats supported by it are possible\footnote{ for a list see \url{http://owlapi.sourceforge.net/}}. + \item[OWL File] DL-Learner supports OWL files in different formats, e.g. RDF/XML or N-Triples. If there is a standard OWL format, you want to use, but is not supported by DL-Learner please let us know. We use the OWL API for parsing, so all formats supported by it can be used\footnote{ for a list see \url{http://owlapi.sourceforge.net/}}. \item[KB File] KB files are an internal non-standardised knowledge representation format, which corresponds to description logic syntax except that the special symbols have been replaced by ASCII strings, e.g.~\verb|AND| instead of $\sqcap$. You can find several KB files in the examples folder. \item[SPARQL Endpoint] DL-Learner allows to use SPARQL endpoints as background knowledge source, which enables the incorporation of very large knowledge bases, e.g. DBpedia\cite{2008_dbpedia}, in DL-Learner. This works by using a set of start instances, which usually correspond to the examples in a learning problem, and then retrieving knowledge about these instances via SPARQL queries. The obtained knowledge base fragment can be converted to OWL and consumed by a reasoner later since it is now sufficiently small to be processed in reasonable time. Please see \cite{2009_ijswis} for details, the parameters for the extraction algorithm are similar (different names only) to the ones here. Some options of the SPARQL component are: \begin{itemize} Modified: trunk/src/dl-learner/org/dllearner/Info.java =================================================================== --- trunk/src/dl-learner/org/dllearner/Info.java 2009-02-17 19:23:47 UTC (rev 1609) +++ trunk/src/dl-learner/org/dllearner/Info.java 2009-02-18 08:54:16 UTC (rev 1610) @@ -3,6 +3,6 @@ package org.dllearner; public class Info { - public static final String build = "2008-10-13"; + public static final String build = "2009-02-17"; } \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-02-17 19:23:47 UTC (rev 1609) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement2/ROLearner2.java 2009-02-18 08:54:16 UTC (rev 1610) @@ -149,10 +149,7 @@ private ExampleBasedNode startNode; // solution protocol - // TODO isn't solution found already true if solutions.size()>=0 ??? - @Deprecated - private boolean solutionFound = false; - private List<Description> solutions = new LinkedList<Description>(); + private List<ExampleBasedNode> solutions = new LinkedList<ExampleBasedNode>(); // used refinement operator and heuristic (exchangeable) private RhoDRDown operator; @@ -300,7 +297,6 @@ candidates.clear(); candidatesStable.clear(); newCandidates.clear(); - solutionFound = false; solutions.clear(); maxExecutionTimeAlreadyReached = false; minExecutionTimeAlreadyReached = false; @@ -493,7 +489,7 @@ boolean solution = checkSubtreePosOnly(bestNode); if (solution) { - solutions.add(bestNode.getConcept()); + solutions.add(bestNode); ExampleBasedNode bestChild = bestNode.getChildren().last(); System.out.println("solution: " + bestNode.getConcept()); System.out.println("maxPosOnlyExpansion: " + maxPosOnlyExpansion); @@ -513,14 +509,11 @@ } - // handle termination criteria - handleStoppingConditions(); - // Anzahl Schleifendurchläufe loop++; }// end while - if (isSolutionFound()) { + if (solutions.size()>0) { //if (solutionFound) { int solutionLimit = 20; // we do not need to print the best node if we display the top 20 solutions below anyway @@ -531,11 +524,11 @@ int show = 1; String manchester = "MANCHESTER:\n"; String kbSyntax = "KBSyntax:\n"; - for (Description c : solutions) { - logger.info(show + ": " + c.toManchesterSyntaxString(baseURI, prefixes) + " (length " + c.getLength() - + ", depth " + c.getDepth() + ")"); + for (ExampleBasedNode c : solutions) { + logger.info(show + ": " + c.getConcept().toManchesterSyntaxString(baseURI, prefixes) + " (accuracy " + df.format(100*c.getAccuracy(nrOfPositiveExamples, nrOfNegativeExamples)) + "%, length " + c.getConcept().getLength() + + ", depth " + c.getConcept().getDepth() + ")"); // manchester += show + ": " + c.toManchesterSyntaxString(baseURI, prefixes) + "\n"; - kbSyntax += show + ": " + c.toKBSyntaxString() + "\n"; + kbSyntax += show + ": " + c.getConcept().toKBSyntaxString() + "\n"; if (show >= solutionLimit) { break; } @@ -862,8 +855,7 @@ } else { // Lösung gefunden if (quality >= 0 && quality <= allowedMisclassifications && !posOnly) { - solutionFound = true; - solutions.add(refinement); + solutions.add(newNode); } newCandidates.add(newNode); @@ -1294,9 +1286,10 @@ logger.trace("ordered by generality (most special solutions first):"); SubsumptionComparator sc = new SubsumptionComparator(rs); TreeSet<Description> solutionsOrderedBySubsumption = new TreeSet<Description>(sc); - solutionsOrderedBySubsumption.addAll(solutions); +// solutionsOrderedBySubsumption.addAll(solutions); for (Description d : solutionsOrderedBySubsumption) logger.trace("special: " + d); + throw new Error("implementation needs to be updated to show ordered solutions"); } /* * for (int j = 0; j < solutions.size(); j++) { Description d = @@ -1438,94 +1431,6 @@ } - /** - * shows if a solution is found - * @return - */ - private boolean isSolutionFound(){ - if(this.solutionFound){ - return true; - }else if(solutions.size()>0){ - return true; - } - - return false; - - - } - - @Deprecated - private void handleStoppingConditions() { - solutionFound = (guaranteeXgoodDescriptions()); - solutionFound = (minExecutionTimeReached() && solutionFound); - if (maxExecutionTimeReached()) { - stop(); - if (solutions.size() > 0) - solutionFound = true; - } - if(!solutionFound && maxClassDescriptionTests != 0) { - int conceptTests = conceptTestsReasoner + conceptTestsTooWeakList + conceptTestsOverlyGeneralList; - solutionFound = (conceptTests >= maxClassDescriptionTests); - } - } - - @Deprecated - private boolean guaranteeXgoodDescriptions() { - if (guaranteeXgoodAlreadyReached) - return true; - if (solutions.size() > guaranteeXgoodDescriptions) { - if (guaranteeXgoodDescriptions != 1) { - logger.info("Minimum number (" + guaranteeXgoodDescriptions - + ") of good descriptions reached, stopping now."); - } - guaranteeXgoodAlreadyReached = true; - return true; - } else - return false; - - } - - @Deprecated - private boolean maxExecutionTimeReached() { - if (maxExecutionTimeInSeconds == 0) - return false; - if (maxExecutionTimeAlreadyReached) - return true; - long needed = System.currentTimeMillis() - this.runtime; - long maxMilliSeconds = maxExecutionTimeInSeconds * 1000; - if (maxMilliSeconds < needed) { - logger.info("Maximum time (" + maxExecutionTimeInSeconds - + " seconds) reached, stopping now..."); - maxExecutionTimeAlreadyReached = true; - return true; - } else - return false; - - } - - /** - * true if minExecutionTime reached - * - * @return true - */ - @Deprecated - private boolean minExecutionTimeReached() { - if (minExecutionTimeAlreadyReached) - return true; - long needed = System.currentTimeMillis() - this.runtime; - long minMilliSeconds = minExecutionTimeInSeconds * 1000; - if (minMilliSeconds < needed) { - if (minExecutionTimeInSeconds != 0) { - logger.info("Minimum time (" + minExecutionTimeInSeconds - + " seconds) reached, stopping when next solution is found"); - } - minExecutionTimeAlreadyReached = true; - return true; - } else - return false; - - } - public boolean isRunning() { return isRunning; } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLPStandard.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLPStandard.java 2009-02-17 19:23:47 UTC (rev 1609) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegLPStandard.java 2009-02-18 08:54:16 UTC (rev 1610) @@ -71,7 +71,7 @@ * @see org.dllearner.core.Component#getName() */ public static String getName() { - return "two valued definition learning problem"; + return "pos neg learning problem"; } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyLP.java 2009-02-17 19:23:47 UTC (rev 1609) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyLP.java 2009-02-18 08:54:16 UTC (rev 1610) @@ -83,7 +83,7 @@ } public static String getName() { - return "positive only definition learning problem"; + return "pos only learning problem"; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2009-02-17 19:23:57
|
Revision: 1609 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1609&view=rev Author: kurzum Date: 2009-02-17 19:23:47 +0000 (Tue, 17 Feb 2009) Log Message: ----------- added to executables: -Djava.library.path=lib/fact/ 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 Modified: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/dllearner 2009-02-17 19:23:47 UTC (rev 1609) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -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/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 Modified: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/dllearner.bat 2009-02-17 19:23:47 UTC (rev 1609) @@ -1 +1 @@ -java -Xmx512m -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\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 Modified: trunk/bin/gui =================================================================== --- trunk/bin/gui 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/gui 2009-02-17 19:23:47 UTC (rev 1609) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -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.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/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 Modified: trunk/bin/gui.bat =================================================================== --- trunk/bin/gui.bat 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/gui.bat 2009-02-17 19:23:47 UTC (rev 1609) @@ -1 +1 @@ -java -Xmx512m -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.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\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 Modified: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/quickstart 2009-02-17 19:23:47 UTC (rev 1609) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -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.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/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 Modified: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/quickstart.bat 2009-02-17 19:23:47 UTC (rev 1609) @@ -1 +1 @@ -java -Xmx512m -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.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\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 Modified: trunk/bin/ws =================================================================== --- trunk/bin/ws 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/ws 2009-02-17 19:23:47 UTC (rev 1609) @@ -1,2 +1,2 @@ #!/bin/bash -java -Xmx512m -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.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/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 Modified: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat 2009-02-17 19:18:32 UTC (rev 1608) +++ trunk/bin/ws.bat 2009-02-17 19:23:47 UTC (rev 1609) @@ -1 +1 @@ -java -Xmx512m -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.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\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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |