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: <ku...@us...> - 2008-04-02 15:35:43
|
Revision: 752 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=752&view=rev Author: kurzum Date: 2008-04-02 08:35:39 -0700 (Wed, 02 Apr 2008) Log Message: ----------- line for manchester syntax, minor importance Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-02 10:44:32 UTC (rev 751) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-04-02 15:35:39 UTC (rev 752) @@ -21,6 +21,7 @@ import java.io.File; import java.text.DecimalFormat; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; @@ -385,6 +386,8 @@ logger.info("\nsolutions:"); for(Description c : solutions) { logger.info(" " + c + " (length " + c.getLength() +", depth " + c.getDepth() + ")"); + //TODO remove this line + logger.info( "Manchester: " + c.toManchesterSyntaxString(baseURI, new HashMap<String,String>()) ); } } logger.debug("size of candidate set: " + candidates.size()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-02 10:44:36
|
Revision: 751 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=751&view=rev Author: kurzum Date: 2008-04-02 03:44:32 -0700 (Wed, 02 Apr 2008) Log Message: ----------- updated configOptions.txt Modified Paths: -------------- trunk/doc/configOptions.txt Modified: trunk/doc/configOptions.txt =================================================================== --- trunk/doc/configOptions.txt 2008-04-02 10:31:31 UTC (rev 750) +++ trunk/doc/configOptions.txt 2008-04-02 10:44:32 UTC (rev 751) @@ -7,161 +7,189 @@ component: KB file (org.dllearner.kb.KBFile) ============================================ -Usage: -import("kbFileName.kb"); +CLI usage: import = ; option name: filename description: pointer to the KB file on local file system values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: .filename = null; option name: url description: URL pointer to the KB file values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: .url = null; + component: OWL file (org.dllearner.kb.OWLFile) ============================================== -Usage: -import("owlFileName.owl"); +CLI usage: import = ; option name: url description: URL pointing to the OWL file values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: .url = null; + component: SPARQL Endpoint (org.dllearner.kb.sparql.SparqlKnowledgeSource) ========================================================================== -Usage: -Example: import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); +CLI usage: import = sparql; option name: url description: URL of SPARQL Endpoint values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: sparql.url = null; option name: instances description: relevant instances e.g. positive and negative examples in a learning problem values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.instances = null; option name: recursionDepth description: recursion depth of KB fragment selection values: class org.dllearner.core.config.IntegerConfigOption default value: 2 +CLI usage: sparql.recursionDepth = 2; option name: predefinedFilter description: the mode of the SPARQL Filter values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: sparql.predefinedFilter = null; option name: predefinedEndpoint description: the mode of the SPARQL Filter values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: sparql.predefinedEndpoint = null; option name: predList description: list of all ignored roles values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.predList = null; option name: objList description: list of all ignored objects values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.objList = null; option name: classList description: list of all ignored classes values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.classList = null; option name: format description: N-TRIPLES or KB format values: class org.dllearner.core.config.StringConfigOption default value: N-TRIPLES +CLI usage: sparql.format = N-TRIPLES; option name: dumpToFile description: Specifies whether the extracted ontology is written to a file or not. values: class org.dllearner.core.config.BooleanConfigOption default value: true +CLI usage: sparql.dumpToFile = true; option name: useLits description: use Literals in SPARQL query values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: sparql.useLits = null; 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.config.BooleanConfigOption default value: true +CLI usage: sparql.getAllSuperClasses = true; option name: learnDomain description: learns the Domain for a Role values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: sparql.learnDomain = null; option name: learnRange description: learns the Range for a Role values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: sparql.learnRange = null; option name: role description: role to learn Domain/Range from values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: sparql.role = null; option name: blankNodeIdentifier description: used to identify blanknodes in Tripels values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: sparql.blankNodeIdentifier = null; option name: example description: example values: class org.dllearner.core.config.StringTupleListConfigOption default value: null +CLI usage: sparql.example = null; option name: replacePredicate description: rule for replacing predicates values: class org.dllearner.core.config.StringTupleListConfigOption default value: null +CLI usage: sparql.replacePredicate = null; option name: replaceObject description: rule for replacing predicates values: class org.dllearner.core.config.StringTupleListConfigOption default value: null +CLI usage: sparql.replaceObject = null; option name: breakSuperClassRetrievalAfter description: stops a cyclic hierarchy after specified number of classes values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: sparql.breakSuperClassRetrievalAfter = null; option name: numberOfInstancesUsedForRoleLearning description: values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: sparql.numberOfInstancesUsedForRoleLearning = null; option name: closeAfterRecursion description: gets all classes for all instances values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: sparql.closeAfterRecursion = null; option name: verbosity description: control verbosity of output for this component values: class org.dllearner.core.config.StringConfigOption default value: warning +CLI usage: sparql.verbosity = warning; option name: defaultGraphURIs description: a list of all default Graph URIs values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.defaultGraphURIs = null; option name: namedGraphURIs description: a list of all named Graph URIs values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: sparql.namedGraphURIs = null; + ************* * Reasoners * ************* @@ -169,47 +197,51 @@ component: DIG reasoner (org.dllearner.reasoning.DIGReasoner) ============================================================= -Usage: -reasoner = dig; +CLI usage: reasoner = digReasoner; option name: reasonerUrl description: URL of the DIG reasoner values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: digReasoner.reasonerUrl = null; option name: writeDIGProtocol description: specifies whether or not to write a protocoll of send and received DIG requests values: class org.dllearner.core.config.BooleanConfigOption default value: false +CLI usage: digReasoner.writeDIGProtocol = false; option name: digProtocolFile description: the file to store the DIG protocol values: class org.dllearner.core.config.StringConfigOption default value: log/digProtocol.txt +CLI usage: digReasoner.digProtocolFile = log/digProtocol.txt; + component: fast instance checker (org.dllearner.reasoning.FastInstanceChecker) ============================================================================== -Usage: -reasoner = fastInstanceChecker; +CLI usage: reasoner = fastInstanceChecker; + component: fast retrieval reasoner (org.dllearner.reasoning.FastRetrievalReasoner) ================================================================================== -Usage: -reasoner = XXX; +CLI usage: reasoner = ; + component: OWL API reasoner (org.dllearner.reasoning.OWLAPIReasoner) ==================================================================== -Usage: -reasoner = owlAPI; +CLI usage: reasoner = owlAPIReasoner; option name: reasonerType description: FaCT++ or Pellet values: class org.dllearner.core.config.StringConfigOption default value: pellet +CLI usage: owlAPIReasoner.reasonerType = pellet; + ********************* * Learning Problems * ********************* @@ -217,76 +249,87 @@ component: two valued definition learning problem (org.dllearner.learningproblems.PosNegDefinitionLP) ===================================================================================================== -Usage: -problem = XXX DEFAULT +CLI usage: problem = posNegDefinitionLP; option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: posNegDefinitionLP.positiveExamples = null; option name: negativeExamples description: negative examples values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: posNegDefinitionLP.negativeExamples = null; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: posNegDefinitionLP.useRetrievalForClassficiation = null; 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.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.05 +CLI usage: posNegDefinitionLP.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: posNegDefinitionLP.useMultiInstanceChecks = null; + component: inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) ======================================================================================== -Usage: -problem = posNegInclusion; +CLI usage: problem = posNegInclusionLP; option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: posNegInclusionLP.positiveExamples = null; option name: negativeExamples description: negative examples values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: posNegInclusionLP.negativeExamples = null; option name: useRetrievalForClassficiation description: Specifies whether to use retrieval or instance checks for testing a concept. values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: posNegInclusionLP.useRetrievalForClassficiation = null; 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.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.05 +CLI usage: posNegInclusionLP.percentPerLenghtUnit = 0.05; option name: useMultiInstanceChecks description: See UseMultiInstanceChecks enum. values: class org.dllearner.core.config.StringConfigOption default value: null +CLI usage: posNegInclusionLP.useMultiInstanceChecks = null; + component: positive only definition learning problem (org.dllearner.learningproblems.PosOnlyDefinitionLP) ========================================================================================================= -Usage: -problem = posOnlyDefinition; +CLI usage: problem = posOnlyDefinitionLP; option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: posOnlyDefinitionLP.positiveExamples = null; + *********************** * Learning Algorithms * *********************** @@ -294,335 +337,396 @@ component: brute force learning algorithm (org.dllearner.algorithms.BruteForceLearner) ====================================================================================== -Usage: -null +CLI usage: algorithm = ; option name: maxLength description: maximum length of generated concepts values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: .maxLength = null; 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.config.StringConfigOption default value: null +CLI usage: .returnType = null; + component: random guesser learning algorithm (org.dllearner.algorithms.RandomGuesser) ===================================================================================== -Usage: -null +CLI usage: algorithm = ; option name: numberOfTrees description: number of randomly generated concepts/trees values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: .numberOfTrees = null; option name: maxDepth description: maximum depth of generated concepts/trees values: class org.dllearner.core.config.IntegerConfigOption default value: null +CLI usage: .maxDepth = null; + component: genetic programming learning algorithm (org.dllearner.algorithms.gp.GP) ================================================================================== -Usage: -null +CLI usage: algorithm = gp; option name: selectionType description: selection type values: class org.dllearner.core.config.StringConfigOption default value: rankSelection +CLI usage: gp.selectionType = rankSelection; option name: tournamentSize description: tournament size (applies only to tournament selection) values: class org.dllearner.core.config.IntegerConfigOption min 2 max 20 default value: 3 +CLI usage: gp.tournamentSize = 3; option name: elitism description: specifies whether to use elitism in selection values: class org.dllearner.core.config.BooleanConfigOption default value: true +CLI usage: gp.elitism = true; option name: mutationProbablitiy description: mutation probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.03 +CLI usage: gp.mutationProbablitiy = 0.03; option name: crossoverProbablitiy description: crossover probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.95 +CLI usage: gp.crossoverProbablitiy = 0.95; option name: hillClimbingProbablitiy description: hill climbing probability values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.0 +CLI usage: gp.hillClimbingProbablitiy = 0.0; option name: refinementProbablitiy description: refinement operator probability (values higher than 0 turn this into a hybrid GP algorithm - see publication) values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.0 +CLI usage: gp.refinementProbablitiy = 0.0; option name: numberOfIndividuals description: number of individuals values: class org.dllearner.core.config.IntegerConfigOption min 1 default value: 100 +CLI usage: gp.numberOfIndividuals = 100; option name: numberOfSelectedIndividuals description: number of selected individuals values: class org.dllearner.core.config.IntegerConfigOption min 1 default value: 92 +CLI usage: gp.numberOfSelectedIndividuals = 92; option name: useFixedNumberOfGenerations description: specifies whether to use a fixed number of generations values: class org.dllearner.core.config.BooleanConfigOption default value: false +CLI 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.config.IntegerConfigOption min 1 default value: 20 +CLI 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.config.IntegerConfigOption min 1 default value: 50 +CLI 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.config.BooleanConfigOption default value: false +CLI usage: gp.adc = false; option name: initMinDepth description: minimum depth to use when creating the initial population values: class org.dllearner.core.config.IntegerConfigOption min 1 default value: 4 +CLI usage: gp.initMinDepth = 4; option name: initMaxDepth description: maximum depth to use when creating the initial population values: class org.dllearner.core.config.IntegerConfigOption min 1 default value: 6 +CLI usage: gp.initMaxDepth = 6; option name: maxConceptLength description: maximum concept length (higher length means lowest possible fitness) values: class org.dllearner.core.config.IntegerConfigOption min 1 default value: 75 +CLI usage: gp.maxConceptLength = 75; + component: example driven refinement operator based learning algorithm (org.dllearner.algorithms.refexamples.ExampleBasedROLComponent) ====================================================================================================================================== -Usage: -algorithm = refexamples; +CLI usage: algorithm = refexamples; option name: writeSearchTree description: specifies whether to write a search tree values: class org.dllearner.core.config.BooleanConfigOption default value: false +CLI usage: refexamples.writeSearchTree = false; option name: searchTreeFile description: file to use for the search tree values: class org.dllearner.core.config.StringConfigOption default value: log/searchTree.txt +CLI 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.config.BooleanConfigOption default value: false +CLI usage: refexamples.replaceSearchTree = false; option name: heuristic description: specifiy the heuristic to use values: class org.dllearner.core.config.StringConfigOption default value: lexicographic +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI usage: refexamples.useOverlyGeneralList = true; option name: useShortConceptConstruction description: shorten concept to see whether they already exist values: class org.dllearner.core.config.BooleanConfigOption default value: true +CLI usage: refexamples.useShortConceptConstruction = true; option name: horizontalExpansionFactor description: horizontal expansion factor (see publication for description) values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.6 +CLI 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.config.BooleanConfigOption default value: true +CLI usage: refexamples.improveSubsumptionHierarchy = true; option name: allowedConcepts description: concepts the algorithm is allowed to use values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refexamples.allowedConcepts = null; option name: ignoredConcepts description: concepts the algorithm must ignore values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refexamples.ignoredConcepts = null; option name: allowedRoles description: roles the algorithm is allowed to use values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refexamples.allowedRoles = null; option name: ignoredRoles description: roles the algorithm must ignore values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refexamples.ignoredRoles = null; option name: useAllConstructor description: specifies whether to universal concept constructor is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refexamples.useAllConstructor = null; option name: useExistsConstructor description: specifies whether to existential concept constructor is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refexamples.useExistsConstructor = null; option name: useNegation description: specifies whether negation is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refexamples.useNegation = null; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refexamples.useBooleanDatatypes = null; option name: noisePercentage description: the (approximated) percentage of noise within the examples values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 100.0 default value: null +CLI usage: refexamples.noisePercentage = null; 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.config.StringConfigOption default value: null +CLI usage: refexamples.startClass = null; + component: refinement operator based learning algorithm (org.dllearner.algorithms.refinement.ROLearner) ======================================================================================================= -Usage: -algorithm = refinement; +CLI usage: algorithm = refinement; option name: writeSearchTree description: specifies whether to write a search tree values: class org.dllearner.core.config.BooleanConfigOption default value: false +CLI usage: refinement.writeSearchTree = false; option name: searchTreeFile description: file to use for the search tree values: class org.dllearner.core.config.StringConfigOption default value: log/searchTree.txt +CLI 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.config.BooleanConfigOption default value: false +CLI usage: refinement.replaceSearchTree = false; option name: heuristic description: specifiy the heuristic to use values: class org.dllearner.core.config.StringConfigOption default value: lexicographic +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI 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.config.BooleanConfigOption default value: true +CLI usage: refinement.useOverlyGeneralList = true; option name: useShortConceptConstruction description: shorten concept to see whether they already exist values: class org.dllearner.core.config.BooleanConfigOption default value: true +CLI usage: refinement.useShortConceptConstruction = true; option name: horizontalExpansionFactor description: horizontal expansion factor (see publication for description) values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 default value: 0.6 +CLI 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.config.BooleanConfigOption default value: true +CLI usage: refinement.improveSubsumptionHierarchy = true; option name: quiet description: may be deprecated soon values: class org.dllearner.core.config.BooleanConfigOption default value: false +CLI usage: refinement.quiet = false; option name: allowedConcepts description: concepts the algorithm is allowed to use values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refinement.allowedConcepts = null; option name: ignoredConcepts description: concepts the algorithm must ignore values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refinement.ignoredConcepts = null; option name: allowedRoles description: roles the algorithm is allowed to use values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refinement.allowedRoles = null; option name: ignoredRoles description: roles the algorithm must ignore values: class org.dllearner.core.config.StringSetConfigOption default value: null +CLI usage: refinement.ignoredRoles = null; option name: useAllConstructor description: specifies whether to universal concept constructor is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refinement.useAllConstructor = null; option name: useExistsConstructor description: specifies whether to existential concept constructor is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refinement.useExistsConstructor = null; option name: useNegation description: specifies whether negation is used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refinement.useNegation = null; option name: useBooleanDatatypes description: specifies whether boolean datatypes are used in the learning algorothm values: class org.dllearner.core.config.BooleanConfigOption default value: null +CLI usage: refinement.useBooleanDatatypes = null; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-02 10:31:33
|
Revision: 750 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=750&view=rev Author: kurzum Date: 2008-04-02 03:31:31 -0700 (Wed, 02 Apr 2008) Log Message: ----------- some more changes to the option doc generator, still not perfect Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/cli/Start.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java Modified: trunk/src/dl-learner/org/dllearner/cli/Start.java =================================================================== --- trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-04-01 11:48:39 UTC (rev 749) +++ trunk/src/dl-learner/org/dllearner/cli/Start.java 2008-04-02 10:31:31 UTC (rev 750) @@ -224,9 +224,12 @@ componentPrefixMapping.put(SparqlKnowledgeSource.class, "sparql"); // reasoners componentPrefixMapping.put(DIGReasoner.class, "digReasoner"); + componentPrefixMapping.put(FastInstanceChecker.class, "fastInstanceChecker"); componentPrefixMapping.put(OWLAPIReasoner.class, "owlAPIReasoner"); // learning problems - configured via + and - flags for examples componentPrefixMapping.put(PosNegDefinitionLP.class, "posNegDefinitionLP"); + componentPrefixMapping.put(PosNegInclusionLP.class, "posNegInclusionLP"); + componentPrefixMapping.put(PosOnlyDefinitionLP.class, "posOnlyDefinitionLP"); // learning algorithms componentPrefixMapping.put(ROLearner.class, "refinement"); componentPrefixMapping.put(ExampleBasedROLComponent.class, "refexamples"); Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-04-01 11:48:39 UTC (rev 749) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-04-02 10:31:31 UTC (rev 750) @@ -40,6 +40,7 @@ import java.util.TreeMap; import java.util.TreeSet; +import org.dllearner.cli.Start; import org.dllearner.core.config.ConfigEntry; import org.dllearner.core.config.ConfigOption; import org.dllearner.core.config.InvalidConfigOptionValueException; @@ -421,31 +422,43 @@ private String getComponentConfigString(Class<? extends Component> component) { String componentDescription = "component: " + invokeStaticMethod(component,"getName") + " (" + component.getName() + ")"; String str = componentDescription + "\n"; + String CLI = getCLIMapping(component.getSuperclass().getSimpleName()+""); String usage =""; - //usage = invokeStaticMethod(component,"getUsage")+""; - - - /*if(usage.equals("null")) { - System.out.println("Component "+component.getName()+" needs Usage definition"); + Map<Class<? extends Component>, String> m=Start.createComponentPrefixMapping(); + for (Class<? extends Component> c : m.keySet()) { + if(c.getCanonicalName().equals(component.getCanonicalName())) + { usage=m.get(c); + } } - else { - System.out.println(usage +" |in| "+ component.getName()); + + for(int i=0; i<componentDescription.length(); i++) { + str += "="; } - */ - - for(int i=0; i<componentDescription.length(); i++) - str += "="; str += "\n\n"; + str += "CLI usage: "+CLI+" = "+usage+";\n\n"; - //str += "Usage:\n"+usage+"\n\n"; for(ConfigOption<?> option : componentOptions.get(component)) { - str += option.toString() + "\n"; + str += option.toString() + + "CLI usage: "+usage+"."+ + option.getName()+" = "+option.getDefaultValue()+ + ";\n\n"; } - return str; + return str+"\n"; } + 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); + } + + private Object invokeStaticMethod(Class<?> clazz, String methodName, Object... args) { // unfortunately Java does not seem to offer a way to call // a static method given a class object directly, so we have Modified: trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java 2008-04-01 11:48:39 UTC (rev 749) +++ trunk/src/dl-learner/org/dllearner/core/config/ConfigOption.java 2008-04-02 10:31:31 UTC (rev 750) @@ -77,10 +77,12 @@ public abstract boolean isValidValue(T value); + //TODO maybe change the function getClass in the options to get simpleName public String getAllowedValuesDescription() { return getClass().toString(); } + @Override public String toString() { return "option name: " + name + "\ndescription: " + description + "\nvalues: " This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-01 11:41:49
|
Revision: 748 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=748&view=rev Author: kurzum Date: 2008-04-01 04:41:46 -0700 (Tue, 01 Apr 2008) Log Message: ----------- refexamples algorithm doesn't work with owlapi and dig see examples for testing Added Paths: ----------- trunk/examples/conflict/ trunk/examples/conflict/arch.owl trunk/examples/conflict/arch_refexamples_dig.conf trunk/examples/conflict/arch_refexamples_fastInstance.conf trunk/examples/conflict/arch_refexamples_owlAPI.conf trunk/examples/conflict/test_ZERO_ONE.owl trunk/examples/conflict/test_ZERO_ONE_refexamples_dig.conf trunk/examples/conflict/test_ZERO_ONE_refexamples_fastInstance.conf trunk/examples/conflict/test_ZERO_ONE_refexamples_owlAPI.conf Added: trunk/examples/conflict/arch.owl =================================================================== --- trunk/examples/conflict/arch.owl (rev 0) +++ trunk/examples/conflict/arch.owl 2008-04-01 11:41:46 UTC (rev 748) @@ -0,0 +1,362 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY foo "http://localhost/foo#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl11 "http://www.w3.org/2006/12/owl11#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl11xml "http://www.w3.org/2006/12/owl11-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://example.com#" + xml:base="http://example.com" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl11="http://www.w3.org/2006/12/owl11#" + xmlns:owl11xml="http://www.w3.org/2006/12/owl11-xml#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:foo="http://localhost/foo#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#hasParallelpipe --> + + <owl:ObjectProperty rdf:about="&foo;hasParallelpipe"> + <rdfs:range rdf:resource="&foo;parallelpipe"/> + <rdfs:domain rdf:resource="&foo;construction"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#hasPillar --> + + <owl:ObjectProperty rdf:about="&foo;hasPillar"> + <rdfs:domain rdf:resource="&foo;construction"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#leftof --> + + <owl:ObjectProperty rdf:about="&foo;leftof"> + <rdfs:domain rdf:resource="&foo;pillar"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#supports --> + + <owl:ObjectProperty rdf:about="&foo;supports"> + <rdfs:range rdf:resource="&foo;parallelpipe"/> + <rdfs:domain rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- http://localhost/foo#touches --> + + <owl:ObjectProperty rdf:about="&foo;touches"> + <rdfs:domain rdf:resource="&foo;pillar"/> + <rdfs:range rdf:resource="&foo;pillar"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#brick --> + + <owl:Class rdf:about="&foo;brick"/> + + + + <!-- http://localhost/foo#construction --> + + <owl:Class rdf:about="&foo;construction"/> + + + + <!-- http://localhost/foo#freeStandingPillar --> + + <owl:Class rdf:about="&foo;freeStandingPillar"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;pillar"/> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="&foo;touches"/> + <owl:someValuesFrom rdf:resource="&owl;Thing"/> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://localhost/foo#parallelpipe --> + + <owl:Class rdf:about="&foo;parallelpipe"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;wedge"/> + <rdf:Description rdf:about="&foo;brick"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://localhost/foo#pillar --> + + <owl:Class rdf:about="&foo;pillar"/> + + + + <!-- http://localhost/foo#wedge --> + + <owl:Class rdf:about="&foo;wedge"/> + + + + <!-- http://www.w3.org/2002/07/owl#Nothing --> + + <owl:Class rdf:about="&owl;Nothing"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;pillar"/> + <rdf:Description rdf:about="&foo;parallelpipe"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;construction"/> + <rdf:Description rdf:about="&foo;parallelpipe"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <rdf:Description rdf:about="&foo;construction"/> + <rdf:Description rdf:about="&foo;pillar"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + + + + <!-- http://www.w3.org/2002/07/owl#Thing --> + + <owl:Class rdf:about="&owl;Thing"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://localhost/foo#a --> + + <foo:brick rdf:about="&foo;a"/> + + + + <!-- http://localhost/foo#b --> + + <foo:brick rdf:about="&foo;b"/> + + + + <!-- http://localhost/foo#c --> + + <foo:brick rdf:about="&foo;c"/> + + + + <!-- http://localhost/foo#c1 --> + + <foo:construction rdf:about="&foo;c1"> + <foo:hasParallelpipe rdf:resource="&foo;a"/> + <foo:hasPillar rdf:resource="&foo;p2"/> + <foo:hasPillar rdf:resource="&foo;p1"/> + </foo:construction> + + + + <!-- http://localhost/foo#c2 --> + + <foo:construction rdf:about="&foo;c2"> + <foo:hasPillar rdf:resource="&foo;p3"/> + <foo:hasParallelpipe rdf:resource="&foo;b"/> + <foo:hasPillar rdf:resource="&foo;p4"/> + </foo:construction> + + + + <!-- http://localhost/foo#c3 --> + + <foo:construction rdf:about="&foo;c3"> + <foo:hasPillar rdf:resource="&foo;p5"/> + <foo:hasParallelpipe rdf:resource="&foo;c"/> + <foo:hasPillar rdf:resource="&foo;p6"/> + </foo:construction> + + + + <!-- http://localhost/foo#c4 --> + + <foo:construction rdf:about="&foo;c4"> + <foo:hasParallelpipe rdf:resource="&foo;d"/> + <foo:hasPillar rdf:resource="&foo;p8"/> + <foo:hasPillar rdf:resource="&foo;p7"/> + </foo:construction> + + + + <!-- http://localhost/foo#c5 --> + + <foo:construction rdf:about="&foo;c5"> + <foo:hasPillar rdf:resource="&foo;p9"/> + <foo:hasParallelpipe rdf:resource="&foo;e"/> + </foo:construction> + + + + <!-- http://localhost/foo#d --> + + <foo:wedge rdf:about="&foo;d"/> + + + + <!-- http://localhost/foo#e --> + + <foo:wedge rdf:about="&foo;e"/> + + + + <!-- http://localhost/foo#p1 --> + + <foo:pillar rdf:about="&foo;p1"> + <rdf:type rdf:resource="&foo;freeStandingPillar"/> + <foo:supports rdf:resource="&foo;a"/> + <foo:leftof rdf:resource="&foo;p2"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p2 --> + + <foo:pillar rdf:about="&foo;p2"> + <rdf:type rdf:resource="&foo;freeStandingPillar"/> + <foo:supports rdf:resource="&foo;a"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p3 --> + + <foo:freeStandingPillar rdf:about="&foo;p3"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:leftof rdf:resource="&foo;p4"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p4 --> + + <foo:freeStandingPillar rdf:about="&foo;p4"> + <rdf:type rdf:resource="&foo;pillar"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p5 --> + + <foo:pillar rdf:about="&foo;p5"> + <foo:supports rdf:resource="&foo;c"/> + <foo:touches rdf:resource="&foo;p6"/> + <foo:leftof rdf:resource="&foo;p6"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p6 --> + + <foo:pillar rdf:about="&foo;p6"> + <foo:supports rdf:resource="&foo;c"/> + </foo:pillar> + + + + <!-- http://localhost/foo#p7 --> + + <foo:freeStandingPillar rdf:about="&foo;p7"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:leftof rdf:resource="&foo;p8"/> + <foo:supports rdf:resource="&foo;d"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p8 --> + + <foo:freeStandingPillar rdf:about="&foo;p8"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:supports rdf:resource="&foo;d"/> + </foo:freeStandingPillar> + + + + <!-- http://localhost/foo#p9 --> + + <foo:freeStandingPillar rdf:about="&foo;p9"> + <rdf:type rdf:resource="&foo;pillar"/> + <foo:supports rdf:resource="&foo;e"/> + </foo:freeStandingPillar> +</rdf:RDF> Added: trunk/examples/conflict/arch_refexamples_dig.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_dig.conf (rev 0) +++ trunk/examples/conflict/arch_refexamples_dig.conf 2008-04-01 11:41:46 UTC (rev 748) @@ -0,0 +1,36 @@ +/** + * Arches Example + * + * Originally published in Winston, P.H. (1975). Learning structural descriptions + * from examples. In P.H. Winstons (Ed.), The psychology of computer vision. New + * York: Mc Graw- Hill. + * + * See the pictures for an illustration of the input data. + * + * The example is a converted, modified and extended version of the original + * learning problem. + * + * possible solution: + * EXISTS hasPillar.(freeStandingPillar AND EXISTS leftof.EXISTS supports.TOP) + * + * Copyright (C) 2007, Sebastian Hellmann + */ + + +algorithm = refexamples; +reasoner=dig; + + + +/** background knowledge **/ +import("arch.owl"); + + + + +/** examples **/ ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/conflict/arch_refexamples_fastInstance.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_fastInstance.conf (rev 0) +++ trunk/examples/conflict/arch_refexamples_fastInstance.conf 2008-04-01 11:41:46 UTC (rev 748) @@ -0,0 +1,31 @@ +/** + * Arches Example + * + * Originally published in Winston, P.H. (1975). Learning structural descriptions + * from examples. In P.H. Winstons (Ed.), The psychology of computer vision. New + * York: Mc Graw- Hill. + * + * See the pictures for an illustration of the input data. + * + * The example is a converted, modified and extended version of the original + * learning problem. + * + * possible solution: + * EXISTS hasPillar.(freeStandingPillar AND EXISTS leftof.EXISTS supports.TOP) + * + * Copyright (C) 2007, Sebastian Hellmann + */ + +algorithm = refexamples; +reasoner=fastInstanceChecker; + + +/** background knowledge **/ +import("arch.owl"); + +/** examples **/ ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/conflict/arch_refexamples_owlAPI.conf =================================================================== --- trunk/examples/conflict/arch_refexamples_owlAPI.conf (rev 0) +++ trunk/examples/conflict/arch_refexamples_owlAPI.conf 2008-04-01 11:41:46 UTC (rev 748) @@ -0,0 +1,32 @@ +/** + * Arches Example + * + * Originally published in Winston, P.H. (1975). Learning structural descriptions + * from examples. In P.H. Winstons (Ed.), The psychology of computer vision. New + * York: Mc Graw- Hill. + * + * See the pictures for an illustration of the input data. + * + * The example is a converted, modified and extended version of the original + * learning problem. + * + * possible solution: + * EXISTS hasPillar.(freeStandingPillar AND EXISTS leftof.EXISTS supports.TOP) + * + * Copyright (C) 2007, Sebastian Hellmann + */ + +algorithm = refexamples; +reasoner=owlAPI; + + + +/** background knowledge **/ +import("arch.owl"); + +/** examples **/ ++c1 ++c4 +-c2 +-c3 +-c5 Added: trunk/examples/conflict/test_ZERO_ONE.owl =================================================================== --- trunk/examples/conflict/test_ZERO_ONE.owl (rev 0) +++ trunk/examples/conflict/test_ZERO_ONE.owl 2008-04-01 11:41:46 UTC (rev 748) @@ -0,0 +1,5043 @@ +<?xml version="1.0"?> + + +<!DOCTYPE rdf:RDF [ + <!ENTITY test "http://www.test.de/test#" > + <!ENTITY owl "http://www.w3.org/2002/07/owl#" > + <!ENTITY owl11 "http://www.w3.org/2006/12/owl11#" > + <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > + <!ENTITY owl11xml "http://www.w3.org/2006/12/owl11-xml#" > + <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" > + <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" > +]> + + +<rdf:RDF xmlns="http://www.test.de/test#" + xml:base="http://www.test.de/test" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl11="http://www.w3.org/2006/12/owl11#" + xmlns:owl11xml="http://www.w3.org/2006/12/owl11-xml#" + xmlns:test="http://www.test.de/test#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> + <owl:Ontology rdf:about=""/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Object Properties + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.de/test#fileDistance0 --> + + <owl:ObjectProperty rdf:about="#fileDistance0"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan1"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance1 --> + + <owl:ObjectProperty rdf:about="#fileDistance1"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan2"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance2 --> + + <owl:ObjectProperty rdf:about="#fileDistance2"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan3"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance3 --> + + <owl:ObjectProperty rdf:about="#fileDistance3"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan4"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance4 --> + + <owl:ObjectProperty rdf:about="#fileDistance4"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan5"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance5 --> + + <owl:ObjectProperty rdf:about="#fileDistance5"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan6"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance6 --> + + <owl:ObjectProperty rdf:about="#fileDistance6"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan7"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistance7 --> + + <owl:ObjectProperty rdf:about="#fileDistance7"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan8"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan0 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan0"> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan1"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan1 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan1"> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan2"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan2 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan2"> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan3"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan3 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan3"> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan4"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan4 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan4"> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan5"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan5 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan5"> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan6"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan6 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan6"> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan7"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan7 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan7"> + <rdfs:subPropertyOf rdf:resource="#fileDistanceLessThan8"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#fileDistanceLessThan8 --> + + <owl:ObjectProperty rdf:about="#fileDistanceLessThan8"> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#hasLowerFileThan --> + + <owl:ObjectProperty rdf:about="#hasLowerFileThan"> + <rdf:type rdf:resource="&owl;TransitiveProperty"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#hasLowerRankThan --> + + <owl:ObjectProperty rdf:about="#hasLowerRankThan"> + <rdf:type rdf:resource="&owl;TransitiveProperty"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#hasPiece --> + + <owl:ObjectProperty rdf:about="#hasPiece"> + <rdfs:domain rdf:resource="#Game"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance0 --> + + <owl:ObjectProperty rdf:about="#rankDistance0"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan1"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance1 --> + + <owl:ObjectProperty rdf:about="#rankDistance1"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan2"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance2 --> + + <owl:ObjectProperty rdf:about="#rankDistance2"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan3"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance3 --> + + <owl:ObjectProperty rdf:about="#rankDistance3"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan4"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance4 --> + + <owl:ObjectProperty rdf:about="#rankDistance4"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan5"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance5 --> + + <owl:ObjectProperty rdf:about="#rankDistance5"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan6"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance6 --> + + <owl:ObjectProperty rdf:about="#rankDistance6"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan7"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistance7 --> + + <owl:ObjectProperty rdf:about="#rankDistance7"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan8"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan0 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan0"> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan1"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan1 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan1"> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan2"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan2 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan2"> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan3"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan3 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan3"> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan4"/> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan4 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan4"> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan5"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan5 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan5"> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan6"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan6 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan6"> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan7"/> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan7 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan7"> + <rdfs:domain rdf:resource="#Piece"/> + <rdfs:subPropertyOf rdf:resource="#rankDistanceLessThan8"/> + <rdfs:range rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- http://www.test.de/test#rankDistanceLessThan8 --> + + <owl:ObjectProperty rdf:about="#rankDistanceLessThan8"> + <rdfs:range rdf:resource="#Piece"/> + <rdfs:domain rdf:resource="#Piece"/> + </owl:ObjectProperty> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Classes + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.de/test#BKing --> + + <owl:Class rdf:about="#BKing"> + <rdfs:subClassOf rdf:resource="#Piece"/> + <owl:disjointWith rdf:resource="#WKing"/> + </owl:Class> + + + + <!-- http://www.test.de/test#Game --> + + <owl:Class rdf:about="#Game"/> + + + + <!-- http://www.test.de/test#ONE --> + + <owl:Class rdf:about="#ONE"/> + + + + <!-- http://www.test.de/test#Piece --> + + <owl:Class rdf:about="#Piece"> + <owl:disjointWith rdf:resource="#Game"/> + </owl:Class> + + + + <!-- http://www.test.de/test#WKing --> + + <owl:Class rdf:about="#WKing"> + <rdfs:subClassOf rdf:resource="#Piece"/> + </owl:Class> + + + + <!-- http://www.test.de/test#WRook --> + + <owl:Class rdf:about="#WRook"> + <rdfs:subClassOf rdf:resource="#Piece"/> + <owl:disjointWith rdf:resource="#BKing"/> + <owl:disjointWith rdf:resource="#WKing"/> + </owl:Class> + + + + <!-- http://www.test.de/test#ZERO --> + + <owl:Class rdf:about="#ZERO"/> + + + + <!-- + /////////////////////////////////////////////////////////////////////////////////////// + // + // Individuals + // + /////////////////////////////////////////////////////////////////////////////////////// + --> + + + + + <!-- http://www.test.de/test#bking_a1_1 --> + + <BKing rdf:about="#bking_a1_1"> + <hasLowerFileThan rdf:resource="#wking_c1_1"/> + <hasLowerRankThan rdf:resource="#wrook_a3_1"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_10 --> + + <BKing rdf:about="#bking_a1_10"> + <hasLowerRankThan rdf:resource="#wrook_a5_10"/> + <hasLowerRankThan rdf:resource="#wking_c2_10"/> + <hasLowerFileThan rdf:resource="#wking_c2_10"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_12 --> + + <BKing rdf:about="#bking_a1_12"> + <hasLowerRankThan rdf:resource="#wrook_a6_12"/> + <hasLowerRankThan rdf:resource="#wking_c2_12"/> + <hasLowerFileThan rdf:resource="#wking_c2_12"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_14 --> + + <BKing rdf:about="#bking_a1_14"> + <hasLowerRankThan rdf:resource="#wrook_a7_14"/> + <hasLowerFileThan rdf:resource="#wking_c2_14"/> + <hasLowerRankThan rdf:resource="#wking_c2_14"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_16 --> + + <BKing rdf:about="#bking_a1_16"> + <hasLowerRankThan rdf:resource="#wking_c2_16"/> + <hasLowerRankThan rdf:resource="#wrook_a8_16"/> + <hasLowerFileThan rdf:resource="#wking_c2_16"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_2 --> + + <BKing rdf:about="#bking_a1_2"> + <hasLowerRankThan rdf:resource="#wrook_a4_2"/> + <hasLowerFileThan rdf:resource="#wking_c1_2"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_3 --> + + <BKing rdf:about="#bking_a1_3"> + <hasLowerRankThan rdf:resource="#wrook_a5_3"/> + <hasLowerFileThan rdf:resource="#wking_c1_3"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_35 --> + + <BKing rdf:about="#bking_a1_35"> + <hasLowerFileThan rdf:resource="#wking_c2_35"/> + <hasLowerRankThan rdf:resource="#wking_c2_35"/> + <hasLowerFileThan rdf:resource="#wrook_b4_35"/> + <hasLowerRankThan rdf:resource="#wrook_b4_35"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_36 --> + + <BKing rdf:about="#bking_a1_36"> + <hasLowerFileThan rdf:resource="#wrook_b5_36"/> + <hasLowerRankThan rdf:resource="#wrook_b5_36"/> + <hasLowerRankThan rdf:resource="#wking_c2_36"/> + <hasLowerFileThan rdf:resource="#wking_c2_36"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_37 --> + + <BKing rdf:about="#bking_a1_37"> + <hasLowerFileThan rdf:resource="#wking_c2_37"/> + <hasLowerRankThan rdf:resource="#wking_c2_37"/> + <hasLowerFileThan rdf:resource="#wrook_b6_37"/> + <hasLowerRankThan rdf:resource="#wrook_b6_37"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_38 --> + + <BKing rdf:about="#bking_a1_38"> + <hasLowerFileThan rdf:resource="#wrook_b7_38"/> + <hasLowerRankThan rdf:resource="#wking_c2_38"/> + <hasLowerRankThan rdf:resource="#wrook_b7_38"/> + <hasLowerFileThan rdf:resource="#wking_c2_38"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_39 --> + + <BKing rdf:about="#bking_a1_39"> + <hasLowerRankThan rdf:resource="#wrook_b8_39"/> + <hasLowerFileThan rdf:resource="#wking_c2_39"/> + <hasLowerRankThan rdf:resource="#wking_c2_39"/> + <hasLowerFileThan rdf:resource="#wrook_b8_39"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_4 --> + + <BKing rdf:about="#bking_a1_4"> + <hasLowerFileThan rdf:resource="#wking_c1_4"/> + <hasLowerRankThan rdf:resource="#wrook_a6_4"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_41 --> + + <BKing rdf:about="#bking_a1_41"> + <hasLowerRankThan rdf:resource="#wking_c2_41"/> + <hasLowerFileThan rdf:resource="#wking_c2_41"/> + <hasLowerFileThan rdf:resource="#wrook_c4_41"/> + <hasLowerRankThan rdf:resource="#wrook_c4_41"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_43 --> + + <BKing rdf:about="#bking_a1_43"> + <hasLowerRankThan rdf:resource="#wking_c2_43"/> + <hasLowerFileThan rdf:resource="#wking_c2_43"/> + <hasLowerFileThan rdf:resource="#wrook_c5_43"/> + <hasLowerRankThan rdf:resource="#wrook_c5_43"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_44 --> + + <BKing rdf:about="#bking_a1_44"> + <hasLowerFileThan rdf:resource="#wking_c2_44"/> + <hasLowerFileThan rdf:resource="#wrook_c6_44"/> + <hasLowerRankThan rdf:resource="#wking_c2_44"/> + <hasLowerRankThan rdf:resource="#wrook_c6_44"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_45 --> + + <BKing rdf:about="#bking_a1_45"> + <hasLowerFileThan rdf:resource="#wking_c2_45"/> + <hasLowerRankThan rdf:resource="#wrook_c7_45"/> + <hasLowerRankThan rdf:resource="#wking_c2_45"/> + <hasLowerFileThan rdf:resource="#wrook_c7_45"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_46 --> + + <BKing rdf:about="#bking_a1_46"> + <hasLowerRankThan rdf:resource="#wrook_c8_46"/> + <hasLowerRankThan rdf:resource="#wking_c2_46"/> + <hasLowerFileThan rdf:resource="#wrook_c8_46"/> + <hasLowerFileThan rdf:resource="#wking_c2_46"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_48 --> + + <BKing rdf:about="#bking_a1_48"> + <hasLowerFileThan rdf:resource="#wrook_d4_48"/> + <hasLowerFileThan rdf:resource="#wking_c2_48"/> + <hasLowerRankThan rdf:resource="#wking_c2_48"/> + <hasLowerRankThan rdf:resource="#wrook_d4_48"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_5 --> + + <BKing rdf:about="#bking_a1_5"> + <hasLowerRankThan rdf:resource="#wrook_a7_5"/> + <hasLowerFileThan rdf:resource="#wking_c1_5"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_50 --> + + <BKing rdf:about="#bking_a1_50"> + <hasLowerRankThan rdf:resource="#wking_c2_50"/> + <hasLowerFileThan rdf:resource="#wking_c2_50"/> + <hasLowerRankThan rdf:resource="#wrook_d5_50"/> + <hasLowerFileThan rdf:resource="#wrook_d5_50"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_51 --> + + <BKing rdf:about="#bking_a1_51"> + <hasLowerRankThan rdf:resource="#wrook_d6_51"/> + <hasLowerFileThan rdf:resource="#wrook_d6_51"/> + <hasLowerRankThan rdf:resource="#wking_c2_51"/> + <hasLowerFileThan rdf:resource="#wking_c2_51"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_52 --> + + <BKing rdf:about="#bking_a1_52"> + <hasLowerFileThan rdf:resource="#wking_c2_52"/> + <hasLowerRankThan rdf:resource="#wking_c2_52"/> + <hasLowerFileThan rdf:resource="#wrook_d7_52"/> + <hasLowerRankThan rdf:resource="#wrook_d7_52"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_53 --> + + <BKing rdf:about="#bking_a1_53"> + <hasLowerFileThan rdf:resource="#wrook_d8_53"/> + <hasLowerFileThan rdf:resource="#wking_c2_53"/> + <hasLowerRankThan rdf:resource="#wrook_d8_53"/> + <hasLowerRankThan rdf:resource="#wking_c2_53"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_55 --> + + <BKing rdf:about="#bking_a1_55"> + <hasLowerRankThan rdf:resource="#wking_c2_55"/> + <hasLowerFileThan rdf:resource="#wrook_e4_55"/> + <hasLowerFileThan rdf:resource="#wking_c2_55"/> + <hasLowerRankThan rdf:resource="#wrook_e4_55"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_57 --> + + <BKing rdf:about="#bking_a1_57"> + <hasLowerRankThan rdf:resource="#wking_c2_57"/> + <hasLowerRankThan rdf:resource="#wrook_e5_57"/> + <hasLowerFileThan rdf:resource="#wking_c2_57"/> + <hasLowerFileThan rdf:resource="#wrook_e5_57"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_58 --> + + <BKing rdf:about="#bking_a1_58"> + <hasLowerFileThan rdf:resource="#wking_c2_58"/> + <hasLowerRankThan rdf:resource="#wrook_e6_58"/> + <hasLowerFileThan rdf:resource="#wrook_e6_58"/> + <hasLowerRankThan rdf:resource="#wking_c2_58"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_59 --> + + <BKing rdf:about="#bking_a1_59"> + <hasLowerRankThan rdf:resource="#wking_c2_59"/> + <hasLowerFileThan rdf:resource="#wrook_e7_59"/> + <hasLowerRankThan rdf:resource="#wrook_e7_59"/> + <hasLowerFileThan rdf:resource="#wking_c2_59"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_6 --> + + <BKing rdf:about="#bking_a1_6"> + <hasLowerFileThan rdf:resource="#wking_c1_6"/> + <hasLowerRankThan rdf:resource="#wrook_a8_6"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_60 --> + + <BKing rdf:about="#bking_a1_60"> + <hasLowerRankThan rdf:resource="#wking_c2_60"/> + <hasLowerRankThan rdf:resource="#wrook_e8_60"/> + <hasLowerFileThan rdf:resource="#wrook_e8_60"/> + <hasLowerFileThan rdf:resource="#wking_c2_60"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_62 --> + + <BKing rdf:about="#bking_a1_62"> + <hasLowerRankThan rdf:resource="#wking_c2_62"/> + <hasLowerRankThan rdf:resource="#wrook_f4_62"/> + <hasLowerFileThan rdf:resource="#wrook_f4_62"/> + <hasLowerFileThan rdf:resource="#wking_c2_62"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_64 --> + + <BKing rdf:about="#bking_a1_64"> + <hasLowerRankThan rdf:resource="#wrook_f5_64"/> + <hasLowerRankThan rdf:resource="#wking_c2_64"/> + <hasLowerFileThan rdf:resource="#wking_c2_64"/> + <hasLowerFileThan rdf:resource="#wrook_f5_64"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_65 --> + + <BKing rdf:about="#bking_a1_65"> + <hasLowerFileThan rdf:resource="#wrook_f6_65"/> + <hasLowerRankThan rdf:resource="#wrook_f6_65"/> + <hasLowerRankThan rdf:resource="#wking_c2_65"/> + <hasLowerFileThan rdf:resource="#wking_c2_65"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_66 --> + + <BKing rdf:about="#bking_a1_66"> + <hasLowerRankThan rdf:resource="#wrook_f7_66"/> + <hasLowerRankThan rdf:resource="#wking_c2_66"/> + <hasLowerFileThan rdf:resource="#wking_c2_66"/> + <hasLowerFileThan rdf:resource="#wrook_f7_66"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_67 --> + + <BKing rdf:about="#bking_a1_67"> + <hasLowerRankThan rdf:resource="#wking_c2_67"/> + <hasLowerFileThan rdf:resource="#wking_c2_67"/> + <hasLowerFileThan rdf:resource="#wrook_f8_67"/> + <hasLowerRankThan rdf:resource="#wrook_f8_67"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_69 --> + + <BKing rdf:about="#bking_a1_69"> + <hasLowerFileThan rdf:resource="#wrook_g4_69"/> + <hasLowerRankThan rdf:resource="#wking_c2_69"/> + <hasLowerFileThan rdf:resource="#wking_c2_69"/> + <hasLowerRankThan rdf:resource="#wrook_g4_69"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_7 --> + + <BKing rdf:about="#bking_a1_7"> + <hasLowerRankThan rdf:resource="#wrook_a3_7"/> + <hasLowerRankThan rdf:resource="#wking_c2_7"/> + <hasLowerFileThan rdf:resource="#wking_c2_7"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_71 --> + + <BKing rdf:about="#bking_a1_71"> + <hasLowerFileThan rdf:resource="#wking_c2_71"/> + <hasLowerRankThan rdf:resource="#wrook_g5_71"/> + <hasLowerRankThan rdf:resource="#wking_c2_71"/> + <hasLowerFileThan rdf:resource="#wrook_g5_71"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_72 --> + + <BKing rdf:about="#bking_a1_72"> + <hasLowerRankThan rdf:resource="#wrook_g6_72"/> + <hasLowerFileThan rdf:resource="#wking_c2_72"/> + <hasLowerRankThan rdf:resource="#wking_c2_72"/> + <hasLowerFileThan rdf:resource="#wrook_g6_72"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_73 --> + + <BKing rdf:about="#bking_a1_73"> + <hasLowerRankThan rdf:resource="#wking_c2_73"/> + <hasLowerRankThan rdf:resource="#wrook_g7_73"/> + <hasLowerFileThan rdf:resource="#wrook_g7_73"/> + <hasLowerFileThan rdf:resource="#wking_c2_73"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_74 --> + + <BKing rdf:about="#bking_a1_74"> + <hasLowerRankThan rdf:resource="#wrook_g8_74"/> + <hasLowerRankThan rdf:resource="#wking_c2_74"/> + <hasLowerFileThan rdf:resource="#wrook_g8_74"/> + <hasLowerFileThan rdf:resource="#wking_c2_74"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_76 --> + + <BKing rdf:about="#bking_a1_76"> + <hasLowerRankThan rdf:resource="#wrook_h4_76"/> + <hasLowerFileThan rdf:resource="#wking_c2_76"/> + <hasLowerFileThan rdf:resource="#wrook_h4_76"/> + <hasLowerRankThan rdf:resource="#wking_c2_76"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_78 --> + + <BKing rdf:about="#bking_a1_78"> + <hasLowerFileThan rdf:resource="#wrook_h5_78"/> + <hasLowerRankThan rdf:resource="#wrook_h5_78"/> + <hasLowerFileThan rdf:resource="#wking_c2_78"/> + <hasLowerRankThan rdf:resource="#wking_c2_78"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_79 --> + + <BKing rdf:about="#bking_a1_79"> + <hasLowerFileThan rdf:resource="#wking_c2_79"/> + <hasLowerRankThan rdf:resource="#wking_c2_79"/> + <hasLowerRankThan rdf:resource="#wrook_h6_79"/> + <hasLowerFileThan rdf:resource="#wrook_h6_79"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_8 --> + + <BKing rdf:about="#bking_a1_8"> + <hasLowerFileThan rdf:resource="#wking_c2_8"/> + <hasLowerRankThan rdf:resource="#wking_c2_8"/> + <hasLowerRankThan rdf:resource="#wrook_a4_8"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_80 --> + + <BKing rdf:about="#bking_a1_80"> + <hasLowerFileThan rdf:resource="#wrook_h7_80"/> + <hasLowerRankThan rdf:resource="#wking_c2_80"/> + <hasLowerFileThan rdf:resource="#wking_c2_80"/> + <hasLowerRankThan rdf:resource="#wrook_h7_80"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a1_81 --> + + <BKing rdf:about="#bking_a1_81"> + <hasLowerRankThan rdf:resource="#wking_c2_81"/> + <hasLowerRankThan rdf:resource="#wrook_h8_81"/> + <hasLowerFileThan rdf:resource="#wking_c2_81"/> + <hasLowerFileThan rdf:resource="#wrook_h8_81"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_11 --> + + <BKing rdf:about="#bking_a2_11"> + <hasLowerRankThan rdf:resource="#wrook_a5_11"/> + <hasLowerFileThan rdf:resource="#wking_c2_11"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_13 --> + + <BKing rdf:about="#bking_a2_13"> + <hasLowerFileThan rdf:resource="#wking_c2_13"/> + <hasLowerRankThan rdf:resource="#wrook_a6_13"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_15 --> + + <BKing rdf:about="#bking_a2_15"> + <hasLowerRankThan rdf:resource="#wrook_a7_15"/> + <hasLowerFileThan rdf:resource="#wking_c2_15"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_17 --> + + <BKing rdf:about="#bking_a2_17"> + <hasLowerRankThan rdf:resource="#wrook_a8_17"/> + <hasLowerFileThan rdf:resource="#wking_c2_17"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_28 --> + + <BKing rdf:about="#bking_a2_28"> + <hasLowerFileThan rdf:resource="#wking_c1_28"/> + <hasLowerFileThan rdf:resource="#wrook_c3_28"/> + <hasLowerRankThan rdf:resource="#wrook_c3_28"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_29 --> + + <BKing rdf:about="#bking_a2_29"> + <hasLowerFileThan rdf:resource="#wking_c1_29"/> + <hasLowerRankThan rdf:resource="#wrook_d3_29"/> + <hasLowerFileThan rdf:resource="#wrook_d3_29"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_30 --> + + <BKing rdf:about="#bking_a2_30"> + <hasLowerRankThan rdf:resource="#wrook_e3_30"/> + <hasLowerFileThan rdf:resource="#wrook_e3_30"/> + <hasLowerFileThan rdf:resource="#wking_c1_30"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_31 --> + + <BKing rdf:about="#bking_a2_31"> + <hasLowerFileThan rdf:resource="#wking_c1_31"/> + <hasLowerRankThan rdf:resource="#wrook_f3_31"/> + <hasLowerFileThan rdf:resource="#wrook_f3_31"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_32 --> + + <BKing rdf:about="#bking_a2_32"> + <hasLowerRankThan rdf:resource="#wrook_g3_32"/> + <hasLowerFileThan rdf:resource="#wking_c1_32"/> + <hasLowerFileThan rdf:resource="#wrook_g3_32"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_33 --> + + <BKing rdf:about="#bking_a2_33"> + <hasLowerFileThan rdf:resource="#wrook_h3_33"/> + <hasLowerRankThan rdf:resource="#wrook_h3_33"/> + <hasLowerFileThan rdf:resource="#wking_c1_33"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_34 --> + + <BKing rdf:about="#bking_a2_34"> + <hasLowerFileThan rdf:resource="#wking_c2_34"/> + <hasLowerFileThan rdf:resource="#wrook_b3_34"/> + <hasLowerRankThan rdf:resource="#wrook_b3_34"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_40 --> + + <BKing rdf:about="#bking_a2_40"> + <hasLowerFileThan rdf:resource="#wking_c2_40"/> + <hasLowerRankThan rdf:resource="#wrook_c3_40"/> + <hasLowerFileThan rdf:resource="#wrook_c3_40"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_47 --> + + <BKing rdf:about="#bking_a2_47"> + <hasLowerRankThan rdf:resource="#wrook_d3_47"/> + <hasLowerFileThan rdf:resource="#wrook_d3_47"/> + <hasLowerFileThan rdf:resource="#wking_c2_47"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_54 --> + + <BKing rdf:about="#bking_a2_54"> + <hasLowerFileThan rdf:resource="#wrook_e3_54"/> + <hasLowerFileThan rdf:resource="#wking_c2_54"/> + <hasLowerRankThan rdf:resource="#wrook_e3_54"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_61 --> + + <BKing rdf:about="#bking_a2_61"> + <hasLowerRankThan rdf:resource="#wrook_f3_61"/> + <hasLowerFileThan rdf:resource="#wrook_f3_61"/> + <hasLowerFileThan rdf:resource="#wking_c2_61"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_68 --> + + <BKing rdf:about="#bking_a2_68"> + <hasLowerFileThan rdf:resource="#wrook_g3_68"/> + <hasLowerRankThan rdf:resource="#wrook_g3_68"/> + <hasLowerFileThan rdf:resource="#wking_c2_68"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_75 --> + + <BKing rdf:about="#bking_a2_75"> + <hasLowerRankThan rdf:resource="#wrook_h3_75"/> + <hasLowerFileThan rdf:resource="#wking_c2_75"/> + <hasLowerFileThan rdf:resource="#wrook_h3_75"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a2_9 --> + + <BKing rdf:about="#bking_a2_9"> + <hasLowerFileThan rdf:resource="#wking_c2_9"/> + <hasLowerRankThan rdf:resource="#wrook_a4_9"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_42 --> + + <BKing rdf:about="#bking_a3_42"> + <hasLowerFileThan rdf:resource="#wking_c2_42"/> + <hasLowerRankThan rdf:resource="#wrook_c4_42"/> + <hasLowerFileThan rdf:resource="#wrook_c4_42"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_49 --> + + <BKing rdf:about="#bking_a3_49"> + <hasLowerFileThan rdf:resource="#wrook_d4_49"/> + <hasLowerRankThan rdf:resource="#wrook_d4_49"/> + <hasLowerFileThan rdf:resource="#wking_c2_49"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_56 --> + + <BKing rdf:about="#bking_a3_56"> + <hasLowerRankThan rdf:resource="#wrook_e4_56"/> + <hasLowerFileThan rdf:resource="#wking_c2_56"/> + <hasLowerFileThan rdf:resource="#wrook_e4_56"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_63 --> + + <BKing rdf:about="#bking_a3_63"> + <hasLowerFileThan rdf:resource="#wking_c2_63"/> + <hasLowerFileThan rdf:resource="#wrook_f4_63"/> + <hasLowerRankThan rdf:resource="#wrook_f4_63"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_70 --> + + <BKing rdf:about="#bking_a3_70"> + <hasLowerFileThan rdf:resource="#wrook_g4_70"/> + <hasLowerFileThan rdf:resource="#wking_c2_70"/> + <hasLowerRankThan rdf:resource="#wrook_g4_70"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_a3_77 --> + + <BKing rdf:about="#bking_a3_77"> + <hasLowerRankThan rdf:resource="#wrook_h4_77"/> + <hasLowerFileThan rdf:resource="#wrook_h4_77"/> + <hasLowerFileThan rdf:resource="#wking_c2_77"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_82 --> + + <BKing rdf:about="#bking_b1_82"> + <hasLowerRankThan rdf:resource="#wking_c3_82"/> + <hasLowerFileThan rdf:resource="#wking_c3_82"/> + <hasLowerRankThan rdf:resource="#wrook_a3_82"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_83 --> + + <BKing rdf:about="#bking_b1_83"> + <hasLowerRankThan rdf:resource="#wking_c3_83"/> + <hasLowerRankThan rdf:resource="#wrook_a4_83"/> + <hasLowerFileThan rdf:resource="#wking_c3_83"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_84 --> + + <BKing rdf:about="#bking_b1_84"> + <hasLowerRankThan rdf:resource="#wrook_a5_84"/> + <hasLowerRankThan rdf:resource="#wking_c3_84"/> + <hasLowerFileThan rdf:resource="#wking_c3_84"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_85 --> + + <BKing rdf:about="#bking_b1_85"> + <hasLowerRankThan rdf:resource="#wking_c3_85"/> + <hasLowerFileThan rdf:resource="#wking_c3_85"/> + <hasLowerRankThan rdf:resource="#wrook_a6_85"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_86 --> + + <BKing rdf:about="#bking_b1_86"> + <hasLowerRankThan rdf:resource="#wking_c3_86"/> + <hasLowerRankThan rdf:resource="#wrook_a7_86"/> + <hasLowerFileThan rdf:resource="#wking_c3_86"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_b1_87 --> + + <BKing rdf:about="#bking_b1_87"> + <hasLowerRankThan rdf:resource="#wking_c3_87"/> + <hasLowerRankThan rdf:resource="#wrook_a8_87"/> + <hasLowerFileThan rdf:resource="#wking_c3_87"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_18 --> + + <BKing rdf:about="#bking_c1_18"> + <hasLowerRankThan rdf:resource="#wking_c3_18"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_19 --> + + <BKing rdf:about="#bking_c1_19"> + <hasLowerFileThan rdf:resource="#wrook_e1_19"/> + <hasLowerRankThan rdf:resource="#wking_c3_19"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_20 --> + + <BKing rdf:about="#bking_c1_20"> + <hasLowerRankThan rdf:resource="#wking_c3_20"/> + <hasLowerFileThan rdf:resource="#wrook_f1_20"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_21 --> + + <BKing rdf:about="#bking_c1_21"> + <hasLowerFileThan rdf:resource="#wrook_g1_21"/> + <hasLowerRankThan rdf:resource="#wking_c3_21"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_22 --> + + <BKing rdf:about="#bking_c1_22"> + <hasLowerFileThan rdf:resource="#wrook_h1_22"/> + <hasLowerRankThan rdf:resource="#wking_c3_22"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_94 --> + + <BKing rdf:about="#bking_c1_94"> + <hasLowerFileThan rdf:resource="#wking_d3_94"/> + <hasLowerRankThan rdf:resource="#wking_d3_94"/> + <hasLowerRankThan rdf:resource="#wrook_b3_94"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_95 --> + + <BKing rdf:about="#bking_c1_95"> + <hasLowerFileThan rdf:resource="#wking_d3_95"/> + <hasLowerRankThan rdf:resource="#wrook_b4_95"/> + <hasLowerRankThan rdf:resource="#wking_d3_95"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_96 --> + + <BKing rdf:about="#bking_c1_96"> + <hasLowerRankThan rdf:resource="#wking_d3_96"/> + <hasLowerFileThan rdf:resource="#wking_d3_96"/> + <hasLowerRankThan rdf:resource="#wrook_b5_96"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_97 --> + + <BKing rdf:about="#bking_c1_97"> + <hasLowerRankThan rdf:resource="#wrook_b6_97"/> + <hasLowerFileThan rdf:resource="#wking_d3_97"/> + <hasLowerRankThan rdf:resource="#wking_d3_97"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_98 --> + + <BKing rdf:about="#bking_c1_98"> + <hasLowerRankThan rdf:resource="#wrook_b7_98"/> + <hasLowerFileThan rdf:resource="#wking_d3_98"/> + <hasLowerRankThan rdf:resource="#wking_d3_98"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_c1_99 --> + + <BKing rdf:about="#bking_c1_99"> + <hasLowerRankThan rdf:resource="#wrook_b8_99"/> + <hasLowerRankThan rdf:resource="#wking_d3_99"/> + <hasLowerFileThan rdf:resource="#wking_d3_99"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_23 --> + + <BKing rdf:about="#bking_d1_23"> + <hasLowerRankThan rdf:resource="#wking_d3_23"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_24 --> + + <BKing rdf:about="#bking_d1_24"> + <hasLowerRankThan rdf:resource="#wking_d3_24"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_25 --> + + <BKing rdf:about="#bking_d1_25"> + <hasLowerFileThan rdf:resource="#wrook_f1_25"/> + <hasLowerRankThan rdf:resource="#wking_d3_25"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_26 --> + + <BKing rdf:about="#bking_d1_26"> + <hasLowerFileThan rdf:resource="#wrook_g1_26"/> + <hasLowerRankThan rdf:resource="#wking_d3_26"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_27 --> + + <BKing rdf:about="#bking_d1_27"> + <hasLowerFileThan rdf:resource="#wrook_h1_27"/> + <hasLowerRankThan rdf:resource="#wking_d3_27"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_88 --> + + <BKing rdf:about="#bking_d1_88"> + <hasLowerRankThan rdf:resource="#wrook_e3_88"/> + <hasLowerRankThan rdf:resource="#wking_c3_88"/> + <hasLowerFileThan rdf:resource="#wrook_e3_88"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_89 --> + + <BKing rdf:about="#bking_d1_89"> + <hasLowerRankThan rdf:resource="#wking_c3_89"/> + <hasLowerRankThan rdf:resource="#wrook_e4_89"/> + <hasLowerFileThan rdf:resource="#wrook_e4_89"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_90 --> + + <BKing rdf:about="#bking_d1_90"> + <hasLowerFileThan rdf:resource="#wrook_e5_90"/> + <hasLowerRankThan rdf:resource="#wking_c3_90"/> + <hasLowerRankThan rdf:resource="#wrook_e5_90"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_91 --> + + <BKing rdf:about="#bking_d1_91"> + <hasLowerRankThan rdf:resource="#wrook_e6_91"/> + <hasLowerRankThan rdf:resource="#wking_c3_91"/> + <hasLowerFileThan rdf:resource="#wrook_e6_91"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_92 --> + + <BKing rdf:about="#bking_d1_92"> + <hasLowerRankThan rdf:resource="#wrook_e7_92"/> + <hasLowerRankThan rdf:resource="#wking_c3_92"/> + <hasLowerFileThan rdf:resource="#wrook_e7_92"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_d1_93 --> + + <BKing rdf:about="#bking_d1_93"> + <hasLowerRankThan rdf:resource="#wking_c3_93"/> + <hasLowerRankThan rdf:resource="#wrook_e8_93"/> + <hasLowerFileThan rdf:resource="#wrook_e8_93"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_100 --> + + <BKing rdf:about="#bking_e1_100"> + <hasLowerRankThan rdf:resource="#wking_d3_100"/> + <hasLowerRankThan rdf:resource="#wrook_f3_100"/> + <hasLowerFileThan rdf:resource="#wrook_f3_100"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_101 --> + + <BKing rdf:about="#bking_e1_101"> + <hasLowerRankThan rdf:resource="#wking_d3_101"/> + <hasLowerFileThan rdf:resource="#wrook_f4_101"/> + <hasLowerRankThan rdf:resource="#wrook_f4_101"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_102 --> + + <BKing rdf:about="#bking_e1_102"> + <hasLowerFileThan rdf:resource="#wrook_f5_102"/> + <hasLowerRankThan rdf:resource="#wking_d3_102"/> + <hasLowerRankThan rdf:resource="#wrook_f5_102"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_103 --> + + <BKing rdf:about="#bking_e1_103"> + <hasLowerRankThan rdf:resource="#wking_d3_103"/> + <hasLowerFileThan rdf:resource="#wrook_f6_103"/> + <hasLowerRankThan rdf:resource="#wrook_f6_103"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_104 --> + + <BKing rdf:about="#bking_e1_104"> + <hasLowerRankThan rdf:resource="#wrook_f7_104"/> + <hasLowerFileThan rdf:resource="#wrook_f7_104"/> + <hasLowerRankThan rdf:resource="#wking_d3_104"/> + </BKing> + + + + <!-- http://www.test.de/test#bking_e1_105 --> + + <BKing rdf:about="#bking_e1_105"> + <hasLowerRankThan rdf:resource="#wking_d3_105"/> + <hasLowerRankThan rdf:resource="#wrook_f8_105"/> + <hasLowerFileThan rdf:resource="#wrook_f8_105"/> + </BKing> + + + + <!-- http://www.test.de/test#game1 --> + + <ZERO rdf:about="#game1"> + <rdf:type rdf:resource="#Game"/> + <hasPiece rdf:resource="#wking_c1_1"/> + <hasPiece rdf:resource="#wrook_a3_1"/> + <hasPiece rdf:resource="#bking_a1_1"/> + </ZERO> + + + + <!-- http://www.test.de/test#game10 --> + + <ZERO rdf:about="#game10"> + <rdf:type rdf:resource="#Game"/> + <hasPiece rdf:resource="#wrook_a5_10"/> + <hasPiece rdf:resource="#bking_a1_10"/> + <hasPiece rdf:resource="#wking_c2_10"/> + </ZERO> + + + + <!-- http://www.test.de/test#game100 --> + + <Game rdf:about="#game100"> + <rdf:type rdf:resource="#ONE"/> + <hasPiece rdf:resource="#wking_d3_100"/> + <hasPiece rdf:resource="#wrook_f3_100"/> + <hasPiece rdf:resource="#bking_e1_100"/> + </Game> + + + + <!-- http://www.test.de/test#game101 --> + + <Game rdf:about="#game101"> + <rdf:type rdf:resource="#ONE"/> + <hasPiece rdf:resource="#wrook_f4_101"/> + <hasPiece rdf:resource="#bking_e1_101"/> + <hasPiece rdf:resource="#wking_d3_101"/> + </Game> + + + + <!-- http://www.test.de/test#game102 --> + + <Game ... [truncated message content] |
From: <ku...@us...> - 2008-04-01 10:46:17
|
Revision: 747 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=747&view=rev Author: kurzum Date: 2008-04-01 03:46:11 -0700 (Tue, 01 Apr 2008) Log Message: ----------- rollback Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/kb/KBFile.java trunk/src/dl-learner/org/dllearner/kb/OWLFile.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-04-01 10:46:11 UTC (rev 747) @@ -423,21 +423,22 @@ String str = componentDescription + "\n"; String usage =""; - usage = invokeStaticMethod(component,"getUsage")+""; + //usage = invokeStaticMethod(component,"getUsage")+""; - if(usage.equals("null")) { + /*if(usage.equals("null")) { System.out.println("Component "+component.getName()+" needs Usage definition"); } else { System.out.println(usage +" |in| "+ component.getName()); } + */ for(int i=0; i<componentDescription.length(); i++) str += "="; str += "\n\n"; - str += "Usage:\n"+usage+"\n\n"; + //str += "Usage:\n"+usage+"\n\n"; for(ConfigOption<?> option : componentOptions.get(component)) { str += option.toString() + "\n"; Modified: trunk/src/dl-learner/org/dllearner/kb/KBFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-04-01 10:46:11 UTC (rev 747) @@ -83,9 +83,6 @@ return "KB file"; } - public static String getUsage() { - return "import(\"kbFileName.kb\");"; - } public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); Modified: trunk/src/dl-learner/org/dllearner/kb/OWLFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-04-01 10:46:11 UTC (rev 747) @@ -48,9 +48,6 @@ return "OWL file"; } - public static String getUsage() { - return "import(\"owlFileName.owl\");"; - } public static Collection<ConfigOption<?>> createConfigOptions() { Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-04-01 10:46:11 UTC (rev 747) @@ -104,9 +104,7 @@ public static String getName() { return "SPARQL Endpoint"; } - public static String getUsage() { - return "Example: import(\"http://dbpedia.openlinksw.com:8890/sparql\",\"SPARQL\");"; - } + private static Logger logger = Logger .getLogger(SparqlKnowledgeSource.class); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java 2008-04-01 10:46:11 UTC (rev 747) @@ -65,9 +65,6 @@ return "two valued definition learning problem"; } - public static String getUsage() { - return "problem = XXX DEFAULT"; - } public static Collection<ConfigOption<?>> createConfigOptions() { return PosNegLP.createConfigOptions(); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-04-01 10:46:11 UTC (rev 747) @@ -76,11 +76,7 @@ return "inclusion learning problem"; } - public static String getUsage() { - return "problem = posNegInclusion;"; - } - - + /* * (non-Javadoc) * Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-04-01 10:46:11 UTC (rev 747) @@ -46,10 +46,7 @@ public static String getName() { return "positive only definition learning problem"; } - - public static String getUsage() { - return "problem = posOnlyDefinition;"; - } + /* (non-Javadoc) * @see org.dllearner.core.Component#init() Modified: trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-04-01 10:46:11 UTC (rev 747) @@ -174,9 +174,6 @@ return "DIG reasoner"; } - public static String getUsage() { - return "reasoner = dig;"; - } public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-04-01 10:46:11 UTC (rev 747) @@ -133,10 +133,7 @@ return "fast instance checker"; } - public static String getUsage() { - return "reasoner = fastInstanceChecker;"; - } - + /* * (non-Javadoc) * Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-04-01 10:46:11 UTC (rev 747) @@ -152,10 +152,8 @@ return "fast retrieval reasoner"; } - public static String getUsage() { - return "reasoner = XXX;"; - } + /* (non-Javadoc) * @see org.dllearner.core.Component#applyConfigEntry(org.dllearner.core.ConfigEntry) */ Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-04-01 10:24:36 UTC (rev 746) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-04-01 10:46:11 UTC (rev 747) @@ -158,9 +158,6 @@ return "OWL API reasoner"; } - public static String getUsage() { - return "reasoner = owlAPI;"; - } public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-01 10:24:42
|
Revision: 746 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=746&view=rev Author: kurzum Date: 2008-04-01 03:24:36 -0700 (Tue, 01 Apr 2008) Log Message: ----------- updated docs Modified Paths: -------------- trunk/doc/configOptions.txt Modified: trunk/doc/configOptions.txt =================================================================== --- trunk/doc/configOptions.txt 2008-04-01 10:23:30 UTC (rev 745) +++ trunk/doc/configOptions.txt 2008-04-01 10:24:36 UTC (rev 746) @@ -7,6 +7,9 @@ component: KB file (org.dllearner.kb.KBFile) ============================================ +Usage: +import("kbFileName.kb"); + option name: filename description: pointer to the KB file on local file system values: class org.dllearner.core.config.StringConfigOption @@ -20,6 +23,9 @@ component: OWL file (org.dllearner.kb.OWLFile) ============================================== +Usage: +import("owlFileName.owl"); + option name: url description: URL pointing to the OWL file values: class org.dllearner.core.config.StringConfigOption @@ -28,6 +34,9 @@ component: SPARQL Endpoint (org.dllearner.kb.sparql.SparqlKnowledgeSource) ========================================================================== +Usage: +Example: import("http://dbpedia.openlinksw.com:8890/sparql","SPARQL"); + option name: url description: URL of SPARQL Endpoint values: class org.dllearner.core.config.StringConfigOption @@ -160,6 +169,9 @@ component: DIG reasoner (org.dllearner.reasoning.DIGReasoner) ============================================================= +Usage: +reasoner = dig; + option name: reasonerUrl description: URL of the DIG reasoner values: class org.dllearner.core.config.StringConfigOption @@ -175,12 +187,24 @@ values: class org.dllearner.core.config.StringConfigOption default value: log/digProtocol.txt +component: fast instance checker (org.dllearner.reasoning.FastInstanceChecker) +============================================================================== + +Usage: +reasoner = fastInstanceChecker; + component: fast retrieval reasoner (org.dllearner.reasoning.FastRetrievalReasoner) ================================================================================== +Usage: +reasoner = XXX; + component: OWL API reasoner (org.dllearner.reasoning.OWLAPIReasoner) ==================================================================== +Usage: +reasoner = owlAPI; + option name: reasonerType description: FaCT++ or Pellet values: class org.dllearner.core.config.StringConfigOption @@ -193,6 +217,9 @@ component: two valued definition learning problem (org.dllearner.learningproblems.PosNegDefinitionLP) ===================================================================================================== +Usage: +problem = XXX DEFAULT + option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption @@ -221,6 +248,9 @@ component: inclusion learning problem (org.dllearner.learningproblems.PosNegInclusionLP) ======================================================================================== +Usage: +problem = posNegInclusion; + option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption @@ -249,6 +279,9 @@ component: positive only definition learning problem (org.dllearner.learningproblems.PosOnlyDefinitionLP) ========================================================================================================= +Usage: +problem = posOnlyDefinition; + option name: positiveExamples description: positive examples values: class org.dllearner.core.config.StringSetConfigOption @@ -261,6 +294,9 @@ component: brute force learning algorithm (org.dllearner.algorithms.BruteForceLearner) ====================================================================================== +Usage: +null + option name: maxLength description: maximum length of generated concepts values: class org.dllearner.core.config.IntegerConfigOption @@ -274,6 +310,9 @@ component: random guesser learning algorithm (org.dllearner.algorithms.RandomGuesser) ===================================================================================== +Usage: +null + option name: numberOfTrees description: number of randomly generated concepts/trees values: class org.dllearner.core.config.IntegerConfigOption @@ -287,6 +326,9 @@ component: genetic programming learning algorithm (org.dllearner.algorithms.gp.GP) ================================================================================== +Usage: +null + option name: selectionType description: selection type values: class org.dllearner.core.config.StringConfigOption @@ -370,6 +412,9 @@ component: example driven refinement operator based learning algorithm (org.dllearner.algorithms.refexamples.ExampleBasedROLComponent) ====================================================================================================================================== +Usage: +algorithm = refexamples; + option name: writeSearchTree description: specifies whether to write a search tree values: class org.dllearner.core.config.BooleanConfigOption @@ -460,14 +505,27 @@ values: class org.dllearner.core.config.BooleanConfigOption default value: null +option name: useBooleanDatatypes +description: specifies whether boolean datatypes are used in the learning algorothm +values: class org.dllearner.core.config.BooleanConfigOption +default value: null + option name: noisePercentage description: the (approximated) percentage of noise within the examples -values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 1.0 +values: class org.dllearner.core.config.DoubleConfigOption min 0.0 max 100.0 default value: null +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.config.StringConfigOption +default value: null + component: refinement operator based learning algorithm (org.dllearner.algorithms.refinement.ROLearner) ======================================================================================================= +Usage: +algorithm = refinement; + option name: writeSearchTree description: specifies whether to write a search tree values: class org.dllearner.core.config.BooleanConfigOption @@ -563,3 +621,8 @@ values: class org.dllearner.core.config.BooleanConfigOption default value: null +option name: useBooleanDatatypes +description: specifies whether boolean datatypes are used in the learning algorothm +values: class org.dllearner.core.config.BooleanConfigOption +default value: null + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2008-04-01 10:23:37
|
Revision: 745 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=745&view=rev Author: kurzum Date: 2008-04-01 03:23:30 -0700 (Tue, 01 Apr 2008) Log Message: ----------- added function getUsage() to components for writing a better doc file. implemented it in some component, where I was sure. added some output to ConfigOptionScriptGenerator, respectively to ComponentManager Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/kb/KBFile.java trunk/src/dl-learner/org/dllearner/kb/OWLFile.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLComponent.java 2008-04-01 10:23:30 UTC (rev 745) @@ -324,6 +324,10 @@ return "example driven refinement operator based learning algorithm"; } + public static String getUsage() { + return "algorithm = refexamples;"; + } + @Override public void start() { algorithm.start(); Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2008-04-01 10:23:30 UTC (rev 745) @@ -327,6 +327,10 @@ return "refinement operator based learning algorithm"; } + public static String getUsage() { + return "algorithm = refinement;"; + } + private int coveredNegativesOrTooWeak(Description concept) { if(posOnly) return posOnlyLearningProblem.coveredPseudoNegativeExamplesOrTooWeak(concept); Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-04-01 10:23:30 UTC (rev 745) @@ -421,10 +421,24 @@ private String getComponentConfigString(Class<? extends Component> component) { String componentDescription = "component: " + invokeStaticMethod(component,"getName") + " (" + component.getName() + ")"; String str = componentDescription + "\n"; + String usage =""; + + usage = invokeStaticMethod(component,"getUsage")+""; + + + if(usage.equals("null")) { + System.out.println("Component "+component.getName()+" needs Usage definition"); + } + else { + System.out.println(usage +" |in| "+ component.getName()); + } + for(int i=0; i<componentDescription.length(); i++) str += "="; str += "\n\n"; + str += "Usage:\n"+usage+"\n\n"; + for(ConfigOption<?> option : componentOptions.get(component)) { str += option.toString() + "\n"; } Modified: trunk/src/dl-learner/org/dllearner/kb/KBFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/kb/KBFile.java 2008-04-01 10:23:30 UTC (rev 745) @@ -82,6 +82,10 @@ public static String getName() { return "KB file"; } + + public static String getUsage() { + return "import(\"kbFileName.kb\");"; + } public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); Modified: trunk/src/dl-learner/org/dllearner/kb/OWLFile.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/kb/OWLFile.java 2008-04-01 10:23:30 UTC (rev 745) @@ -47,6 +47,11 @@ public static String getName() { return "OWL file"; } + + public static String getUsage() { + return "import(\"owlFileName.owl\");"; + } + public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlKnowledgeSource.java 2008-04-01 10:23:30 UTC (rev 745) @@ -104,6 +104,9 @@ public static String getName() { return "SPARQL Endpoint"; } + public static String getUsage() { + return "Example: import(\"http://dbpedia.openlinksw.com:8890/sparql\",\"SPARQL\");"; + } private static Logger logger = Logger .getLogger(SparqlKnowledgeSource.class); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegDefinitionLP.java 2008-04-01 10:23:30 UTC (rev 745) @@ -64,6 +64,10 @@ public static String getName() { return "two valued definition learning problem"; } + + public static String getUsage() { + return "problem = XXX DEFAULT"; + } public static Collection<ConfigOption<?>> createConfigOptions() { return PosNegLP.createConfigOptions(); Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosNegInclusionLP.java 2008-04-01 10:23:30 UTC (rev 745) @@ -76,6 +76,11 @@ return "inclusion learning problem"; } + public static String getUsage() { + return "problem = posNegInclusion;"; + } + + /* * (non-Javadoc) * Modified: trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/learningproblems/PosOnlyDefinitionLP.java 2008-04-01 10:23:30 UTC (rev 745) @@ -46,6 +46,10 @@ public static String getName() { return "positive only definition learning problem"; } + + public static String getUsage() { + return "problem = posOnlyDefinition;"; + } /* (non-Javadoc) * @see org.dllearner.core.Component#init() Modified: trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/reasoning/DIGReasoner.java 2008-04-01 10:23:30 UTC (rev 745) @@ -173,6 +173,10 @@ public static String getName() { return "DIG reasoner"; } + + public static String getUsage() { + return "reasoner = dig;"; + } public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastInstanceChecker.java 2008-04-01 10:23:30 UTC (rev 745) @@ -133,6 +133,10 @@ return "fast instance checker"; } + public static String getUsage() { + return "reasoner = fastInstanceChecker;"; + } + /* * (non-Javadoc) * Modified: trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/reasoning/FastRetrievalReasoner.java 2008-04-01 10:23:30 UTC (rev 745) @@ -150,8 +150,12 @@ public static String getName() { return "fast retrieval reasoner"; - } + } + public static String getUsage() { + return "reasoner = XXX;"; + } + /* (non-Javadoc) * @see org.dllearner.core.Component#applyConfigEntry(org.dllearner.core.ConfigEntry) */ Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-03-31 14:36:13 UTC (rev 744) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-04-01 10:23:30 UTC (rev 745) @@ -158,6 +158,10 @@ return "OWL API reasoner"; } + public static String getUsage() { + return "reasoner = owlAPI;"; + } + public static Collection<ConfigOption<?>> createConfigOptions() { Collection<ConfigOption<?>> options = new LinkedList<ConfigOption<?>>(); StringConfigOption type = new StringConfigOption("reasonerType", "FaCT++ or Pellet", "pellet"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-03-31 14:36:15
|
Revision: 744 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=744&view=rev Author: jenslehmann Date: 2008-03-31 07:36:13 -0700 (Mon, 31 Mar 2008) Log Message: ----------- fix for #1928052 Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:30:50 UTC (rev 743) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:36:13 UTC (rev 744) @@ -71,7 +71,7 @@ // you can either use the components.ini file or directly specify the classes to use private static String componentsFile = "lib/components.ini"; private static String[] componentClasses = new String[]{}; - private static ComponentManager cm = new ComponentManager(); + private static ComponentManager cm = null; // list of all configuration options of all components private static Map<Class<? extends Component>, String> componentNames; Modified: trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-03-31 14:30:50 UTC (rev 743) +++ trunk/src/dl-learner/org/dllearner/reasoning/OWLAPIReasoner.java 2008-03-31 14:36:13 UTC (rev 744) @@ -27,6 +27,7 @@ import java.util.Comparator; import java.util.HashSet; import java.util.LinkedList; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.SortedSet; @@ -146,6 +147,9 @@ private Map<String, String> prefixes = new TreeMap<String,String>(); private String baseURI; + // references to OWL API ontologies + private List<OWLOntology> owlAPIOntologies = new LinkedList<OWLOntology>(); + public OWLAPIReasoner(Set<KnowledgeSource> sources) { this.sources = sources; } @@ -201,6 +205,7 @@ try { OWLOntology ontology = manager.loadOntologyFromPhysicalURI(url.toURI()); + owlAPIOntologies.add(ontology); allImports.addAll(manager.getImportsClosure(ontology)); classes.addAll(ontology.getReferencedClasses()); owlObjectProperties.addAll(ontology.getReferencedObjectProperties()); @@ -234,6 +239,7 @@ e.printStackTrace(); } OWLAPIAxiomConvertVisitor.fillOWLOntology(manager, ontology, kb); + owlAPIOntologies.add(ontology); allImports.add(ontology); atomicConcepts.addAll(kb.findAllAtomicConcepts()); atomicRoles.addAll(kb.findAllAtomicRoles()); @@ -1035,4 +1041,8 @@ } } + public List<OWLOntology> getOWLAPIOntologies() { + return owlAPIOntologies; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-03-31 14:30:54
|
Revision: 743 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=743&view=rev Author: jenslehmann Date: 2008-03-31 07:30:50 -0700 (Mon, 31 Mar 2008) Log Message: ----------- small fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:26:03 UTC (rev 742) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:30:50 UTC (rev 743) @@ -168,6 +168,8 @@ * @return The singleton <code>ComponentManager</code> instance. */ public static ComponentManager getInstance() { + if(cm == null) + cm = new ComponentManager(); return cm; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2008-03-31 14:26:16
|
Revision: 742 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=742&view=rev Author: jenslehmann Date: 2008-03-31 07:26:03 -0700 (Mon, 31 Mar 2008) Log Message: ----------- - fixed errors in ORE - component classes in component manager can be specified directly Modified Paths: -------------- trunk/examples/carcinogenesis/train.conf trunk/examples/krk/test_ZERO_against_1to5.conf trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/examples/Carcinogenesis.java trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java Modified: trunk/examples/carcinogenesis/train.conf =================================================================== --- trunk/examples/carcinogenesis/train.conf 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/examples/carcinogenesis/train.conf 2008-03-31 14:26:03 UTC (rev 742) @@ -2,7 +2,7 @@ reasoner = fastInstanceChecker; algorithm = refexamples; -refexamples.noisePercentage = 29; +refexamples.noisePercentage = 28; refexamples.startClass = "http://dl-learner.org/carcinogenesis#Compound"; refexamples.writeSearchTree = false; refexamples.searchTreeFile = "log/carcinogenesis/searchTree.log"; Modified: trunk/examples/krk/test_ZERO_against_1to5.conf =================================================================== --- trunk/examples/krk/test_ZERO_against_1to5.conf 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/examples/krk/test_ZERO_against_1to5.conf 2008-03-31 14:26:03 UTC (rev 742) @@ -33,8 +33,9 @@ //algorithm = refinement; //refinement.heuristic=flexible; reasoner=fastInstanceChecker; +refexamples.startClass = "http://www.test.de/test#Game"; +refexamples.useAllConstructor = false; - /**ZERO**/ +"http://www.test.de/test#game1" +"http://www.test.de/test#game10" Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/ExampleBasedROLearner.java 2008-03-31 14:26:03 UTC (rev 742) @@ -312,8 +312,8 @@ long lastTreeTraversalTime = System.nanoTime(); long lastReductionTime = System.nanoTime(); // try a traversal after 100 seconds - long traversalInterval = 1000l * 1000000000l; - long reductionInterval = 300l * 1000000000l; + long traversalInterval = 300l * 1000000000l; + long reductionInterval = 500l * 1000000000l; long currentTime; while(!solutionFound && !stop) { Modified: trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/algorithms/refexamples/MultiHeuristic.java 2008-03-31 14:26:03 UTC (rev 742) @@ -78,7 +78,7 @@ private double expansionPenaltyFactor; private double gainBonusFactor; private double nodeChildPenalty = 0.0001; - private double startNodeBonus = 1.0; + private double startNodeBonus = 2.0; // penalise errors on positive examples harder than on negative examples // (positive weight = 1) private double negativeWeight = 0.8; @@ -146,7 +146,7 @@ // do not count TOP symbols (in particular in ALL r.TOP and EXISTS r.TOP) // as they provide no extra information if(description instanceof Thing) - bonus = 1; + bonus = 2; // if(description instanceof BooleanValueRestriction) // bonus = -1; @@ -154,7 +154,7 @@ // some bonus for doubles because they are already penalised by length 3 if(description instanceof DatatypeSomeRestriction) { // System.out.println(description); - bonus = 3; + bonus = 2; } List<Description> children = description.getChildren(); Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-03-31 14:26:03 UTC (rev 742) @@ -28,6 +28,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.Arrays; import java.util.Collection; import java.util.Comparator; import java.util.HashMap; @@ -61,14 +62,16 @@ private ComponentPool pool = new ComponentPool(); - // these variables are valid for the complete lifetime of DL-Learner - private static String componentsFile = "lib/components.ini"; - private static ComponentManager cm = new ComponentManager(); + // these variables are valid for the complete lifetime of a DL-Learner session private static Collection<Class<? extends Component>> components; private static Collection<Class<? extends KnowledgeSource>> knowledgeSources; private static Collection<Class<? extends ReasonerComponent>> reasonerComponents; private static Collection<Class<? extends LearningProblem>> learningProblems; private static Collection<Class<? extends LearningAlgorithm>> learningAlgorithms; + // you can either use the components.ini file or directly specify the classes to use + private static String componentsFile = "lib/components.ini"; + private static String[] componentClasses = new String[]{}; + private static ComponentManager cm = new ComponentManager(); // list of all configuration options of all components private static Map<Class<? extends Component>, String> componentNames; @@ -90,7 +93,11 @@ @SuppressWarnings( { "unchecked" }) private ComponentManager() { // read in components file - List<String> componentsString = readComponentsFile(); + List<String> componentsString; + if(componentClasses.length > 0) + componentsString = Arrays.asList(componentClasses); + else + componentsString = readComponentsFile(); // component list components = new TreeSet<Class<? extends Component>>(classComparator); @@ -164,6 +171,10 @@ return cm; } + public static void setComponentClasses(String[] componentClasses) { + ComponentManager.componentClasses = componentClasses; + } + private static List<String> readComponentsFile() { List<String> componentStrings = new LinkedList<String>(); Modified: trunk/src/dl-learner/org/dllearner/examples/Carcinogenesis.java =================================================================== --- trunk/src/dl-learner/org/dllearner/examples/Carcinogenesis.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/examples/Carcinogenesis.java 2008-03-31 14:26:03 UTC (rev 742) @@ -260,14 +260,13 @@ // generating conf files File confTrainFile = new File("examples/carcinogenesis/train.conf"); Files.clearFile(confTrainFile); - String confHeader = "import(\"pte.owl\");\n\n"; + String confHeader = "import(\"carcinogenesis.owl\");\n\n"; confHeader += "reasoner = fastInstanceChecker;\n"; confHeader += "algorithm = refexamples;\n"; - confHeader += "refexamples.noisePercentage = 35;\n"; + confHeader += "refexamples.noisePercentage = 31;\n"; confHeader += "refexamples.startClass = " + getURI2("Compound") + ";\n"; confHeader += "refexamples.writeSearchTree = false;\n"; confHeader += "refexamples.searchTreeFile = \"log/carcinogenesis/searchTree.log\";\n"; - confHeader += "posNegDefinition.percentPerLengthUnit = 0.10;\n"; confHeader += "\n"; Files.appendFile(confTrainFile, confHeader); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-03-31 14:26:03 UTC (rev 742) @@ -37,7 +37,6 @@ } - @Override public void valueChanged(ListSelectionEvent e) { setNextButtonAccordingToConceptSelected(); if (!e.getValueIsAdjusting()) Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-03-31 14:26:03 UTC (rev 742) @@ -72,19 +72,16 @@ } - @Override public void changedUpdate(DocumentEvent e) { setNextButtonAccordingToExistingOWLFile(); } - @Override public void insertUpdate(DocumentEvent e) { setNextButtonAccordingToExistingOWLFile(); } - @Override public void removeUpdate(DocumentEvent e) { setNextButtonAccordingToExistingOWLFile(); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-31 14:07:52 UTC (rev 741) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-31 14:26:03 UTC (rev 742) @@ -97,7 +97,6 @@ void updateList(final List<Description> result) { Runnable doUpdateList = new Runnable() { - @Override public void run() { panel4.getModel().clear(); for (Description d : result) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-03-31 14:07:56
|
Revision: 741 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=741&view=rev Author: heeroyuy Date: 2008-03-31 07:07:52 -0700 (Mon, 31 Mar 2008) Log Message: ----------- Added Paths: ----------- trunk/lib/protege/log4j.jar trunk/lib/protege/org.protege.editor.core.application.jar trunk/lib/protege/org.protege.editor.owl.jar trunk/lib/protege/org.semanticweb.owl.owlapi.jar Added: trunk/lib/protege/log4j.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/protege/log4j.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lib/protege/org.protege.editor.core.application.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/protege/org.protege.editor.core.application.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lib/protege/org.protege.editor.owl.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/protege/org.protege.editor.owl.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/lib/protege/org.semanticweb.owl.owlapi.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/protege/org.semanticweb.owl.owlapi.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-03-31 14:06:31
|
Revision: 740 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=740&view=rev Author: heeroyuy Date: 2008-03-31 07:06:28 -0700 (Mon, 31 Mar 2008) Log Message: ----------- needed to compile plugin Added Paths: ----------- trunk/lib/protege/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hee...@us...> - 2008-03-31 14:04:21
|
Revision: 739 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=739&view=rev Author: heeroyuy Date: 2008-03-31 07:04:17 -0700 (Mon, 31 Mar 2008) Log Message: ----------- first hello world protege plugin Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/protege/ 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/DLLearnerComponentListener.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java Added: trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ActionHandler.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,38 @@ +package org.dllearner.tools.protege; + +import java.awt.event.*; + +public class ActionHandler implements ActionListener, ComponentListener{ + private ActionHandler action; + + + public ActionHandler(ActionHandler a) + { + action = a; + } + public void actionPerformed(ActionEvent z){ + System.out.println("hihihi: "+ z.getActionCommand()); + } + + public void componentHidden(ComponentEvent e) + { + System.out.println("1: "+e.getID()); + } + + public void componentMoved(ComponentEvent e) + { + System.out.println("2: "+ e.getComponent().getClass().getName()); + } + + public void componentResized(ComponentEvent e) + { + //System.out.println("3: "+ e.getComponent().getClass().getName()); + } + + public void componentShown(ComponentEvent e) + { + System.out.println("4: "+ e.getID()); + } + + +} Added: trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ButtonList.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,25 @@ +package org.dllearner.tools.protege; + +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.semanticweb.owl.model.OWLClass; +import org.protege.editor.owl.OWLEditorKit; + +public class ButtonList extends AbstractOWLFrame<OWLClass>{ + + public ButtonList(OWLEditorKit editorKit) + { + super(editorKit.getOWLModelManager().getOWLOntologyManager()); + addSection(new OWLEquivalentClassesAxiomFrameSection(editorKit, this)); + addSection(new SuggestClassButton(editorKit, this)); + addSection(new OWLSubClassAxiomFrameSection(editorKit, this)); + //addSection(new SuggestClassButton(editorKit, this)); + addSection(new InheritedAnonymousClassesFrameSection(editorKit, this)); + addSection(new OWLClassAssertionAxiomIndividualSection(editorKit, this)); + addSection(new OWLDisjointClassesAxiomFrameSection(editorKit, this)); + } +} Added: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerComponentListener.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,16 @@ +package org.dllearner.tools.protege; + +import java.awt.event.*; + +public class DLLearnerComponentListener implements ItemListener { + + public void itemStateChanged(ItemEvent e) { + if (e.getStateChange() == ItemEvent.SELECTED) { + + System.out.println("JUHU "+e.getStateChange()); + + } else { + + } + } +} Added: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerConfig.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,54 @@ +package org.dllearner.tools.protege; + +import org.protege.editor.owl.OWLEditorKit; + +public class DLLearnerConfig { + + + + public void DLLearnerStart() + { + System.out.println("blub"); + /*ComponentManager cm = ComponentManager.getInstance(); + KnowledgeSource source = cm.knowledgeSource(OWLFile.class); + String example = "examples/family/father.owl"; + cm.applyConfigEntry(source, "url", new File(example).toURI().toString()); + source.init(); + + // create DIG reasoning service with standard settings + ReasonerComponent reasoner = cm.reasoner(DIGReasoner.class, source); + // ReasoningService rs = cm.reasoningService(DIGReasonerNew.class, source); + reasoner.init(); + ReasoningService rs = cm.reasoningService(reasoner); + + // create a learning problem and set positive and negative examples + LearningProblem lp = cm.learningProblem(PosNegDefinitionLP.class, rs); + Set<String> positiveExamples = new TreeSet<String>(); + positiveExamples.add("http://example.com/father#stefan"); + positiveExamples.add("http://example.com/father#markus"); + positiveExamples.add("http://example.com/father#martin"); + Set<String> negativeExamples = new TreeSet<String>(); + negativeExamples.add("http://example.com/father#heinz"); + negativeExamples.add("http://example.com/father#anna"); + negativeExamples.add("http://example.com/father#michelle"); + cm.applyConfigEntry(lp, "positiveExamples", positiveExamples); + cm.applyConfigEntry(lp, "negativeExamples", negativeExamples); + lp.init(); + + // create the learning algorithm + LearningAlgorithm la = null; + try { + la = cm.learningAlgorithm(RandomGuesser.class, lp, rs); + } catch (LearningProblemUnsupportedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + cm.applyConfigEntry(la, "numberOfTrees", 100); + cm.applyConfigEntry(la, "maxDepth", 5); + la.init(); + + // start the algorithm and print the best concept found + la.start(); + System.out.println(la.getBestSolution());*/ + } +} Added: trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/DLLearnerOptionTab.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,175 @@ +package org.dllearner.tools.protege; + +import org.protege.editor.owl.OWLEditorKit; + +import org.semanticweb.owl.model.OWLClass; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLException; +import org.protege.editor.owl.ui.frame.*; +import org.protege.editor.owl.ui.framelist.OWLFrameList2; + +import javax.swing.*; +import javax.swing.event.ChangeEvent; +import javax.swing.event.ChangeListener; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; + +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.util.*; + +import org.dllearner.algorithms.RandomGuesser; +import org.dllearner.core.ComponentInitException; +import org.dllearner.algorithms.refexamples.ExampleBasedROLearner; +import org.dllearner.core.ComponentManager; +import org.dllearner.reasoning.DIGReasoner; +import org.dllearner.algorithms.RandomGuesser; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblem; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.ReasoningService; +import org.dllearner.kb.OWLFile; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.reasoning.DIGReasoner; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.kb.OWLFile; +import org.semanticweb.owl.model.*; + + + +public class DLLearnerOptionTab extends AbstractOWLFrameSectionRowObjectEditor<OWLDescription> + { + + private JLabel pos; + private JComponent learner; + private JSplitPane split; + private JButton accept; + private JButton config; + private OWLEditorKit editor; + private JPanel option; + private JScrollPane suggest; + private JPanel vorschlag; + private Object[] blub; + private OWLDescription initialDescription; + private JLabel neg; + private String test; + private ActionHandler action; + private DLLearnerComponentListener listen; + private DLLearnerConfig dlLearnerConfig; + private JCheckBox hi; + + + //TODO: Layout selber festlegen denn die standartlayouts sind scheisse + //TODO: ActionListener implementieren + //TODO: Reasoner, learningproblems und algos direkt vom dl-learner beziehen + //TODO: instanz vom DLLearnerOptionTab wieder zuruecksetzen damit beim laden neue Ontologie erkannt wird + public DLLearnerOptionTab(OWLEditorKit editorKit, OWLDescription description) { + + dlLearnerConfig = new DLLearnerConfig(); + editor = editorKit; + initialDescription = description; + split = new JSplitPane(split.HORIZONTAL_SPLIT,false); + suggest = new JScrollPane(); + vorschlag = new JPanel(new GridLayout(3,1)); + learner = new JPanel(); + option = new JPanel(new GridLayout(20,1)); + init(); + hi= new JCheckBox("Test", true); + //buildLearnerOption(); + } + + public void startDLLearner() + { + new DLLearnerConfig().DLLearnerStart(); + + + } + public void init() + { + action = new ActionHandler(this.action); + listen = new DLLearnerComponentListener(); + } + + public OWLDescription getEditedObject() + { + String expression = "JUHU"; + try { + return editor.getOWLModelManager().getOWLDescriptionParser().createOWLDescription(expression); + } + catch (OWLException e){ + return null; + } + + } + + private void buildLearnerOption() + { + learner.setPreferredSize(new Dimension(500, 400)); + split = new JSplitPane(split.HORIZONTAL_SPLIT,false); + split.setResizeWeight(0.5); + + pos = new JLabel("Positive Examples"); + option.add(pos); + blub=editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().toArray(); + for(int j = 0; j<editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().size();j++) + { + option.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j], true)).addComponentListener(action); + } + neg = new JLabel("Negative Examples"); + option.add(neg); + for(int j = 0; j<editor.getOWLModelManager().getActiveOntology().getReferencedIndividuals().size();j++) + { + option.add(new JCheckBox(editor.getOWLModelManager().getActiveOntology().getURI().toString()+"#"+blub[j], true)).addComponentListener(action); + } + config = new JButton("Config"); + config.addActionListener(this.action); + option.add(config); + option.add(hi); + accept = new JButton("RUN"); + accept.addActionListener(this.action); + vorschlag.add(suggest); + vorschlag.add(accept); + split.setLeftComponent(option); + split.setRightComponent(vorschlag); + learner.add(split); + System.out.println(""); + //System.out.println("hi: "+hi.get); + startDLLearner(); + + } + +public void actionPerformed(ActionEvent a) +{ + System.out.println(a.getSource()); +} + public JComponent getEditorComponent() + { + buildLearnerOption(); + return learner; + } + + public void clear() + { + if(split!=null) + { + split.removeAll(); + option.removeAll(); + vorschlag.removeAll(); + } + } + + public void dispose(){ + } + + public Set<OWLDescription> getEditedObjects() + { + return super.getEditedObjects(); + } + } \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/MANIFEST.MF 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Hallo Welt +Bundle-SymbolicName: org.dllearner.tools.protege;singleton:=true +Bundle-Category: protege +Bundle-Description: blablabla +Bundle-Vendor: blablabla +Bundle-DocURL: blablabla +Bundle-ClassPath: .,lib/xbean.jar,lib/dig1.1-xmlbeans.jar,lib/junit-4.4.jar,log4j.jar,lib/components.ini +Import-Package: org.osgi.framework,org.apache.log4j +Export-Package: lib +Bundle-Version: 1.0.0 +Bundle-Activator: org.protege.editor.core.plugin.DefaultPluginActivator +Require-Bundle: org.eclipse.equinox.registry,org.eclipse.equinox.common,org.protege.editor.core.application,org.protege.editor.owl,org.semanticweb.owl.owlapi Added: trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/META-INF/plugin.xml 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,10 @@ +<?xml version="1.0" ?> + <plugin> + <extension id="org.dllearner.tools.protege.ProtegePlugin" + point="org.protege.editor.core.application.ViewComponent"> + <label value="Hallo Welt"/> + <class value="org.dllearner.tools.protege.ProtegePlugin"/> + <headerColor value="@org.protege.classcolor"/> + <category value="@org.protege.classcategory"/> + </extension> + </plugin> \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/ProtegePlugin.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,34 @@ +package org.dllearner.tools.protege; + +import org.protege.editor.owl.ui.view.AbstractOWLClassViewComponent; +import org.semanticweb.owl.model.OWLClass; +import org.protege.editor.owl.ui.framelist.OWLFrameList2; +import javax.swing.*; +import java.awt.*; + + +public class ProtegePlugin extends AbstractOWLClassViewComponent +{ + +private OWLFrameList2<OWLClass> list; + + public void initialiseClassView() throws Exception { + list = new OWLFrameList2<OWLClass>(getOWLEditorKit(), new ButtonList(getOWLEditorKit())); + setLayout(new BorderLayout()); + JScrollPane hallo = new JScrollPane(list); + add(hallo); + + + } + + + protected OWLClass updateView(OWLClass selectedClass) { + list.setRootObject(selectedClass); + return selectedClass; + } + + + public void disposeView() { + list.dispose(); + } +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/protege/SuggestClassButton.java 2008-03-31 14:04:17 UTC (rev 739) @@ -0,0 +1,64 @@ +package org.dllearner.tools.protege; + +import java.util.Comparator; + +import org.protege.editor.owl.OWLEditorKit; +import org.protege.editor.owl.ui.frame.AbstractOWLFrameSection; +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.model.OWLClass; +import org.semanticweb.owl.model.OWLDescription; +import org.semanticweb.owl.model.OWLEquivalentClassesAxiom; +import org.semanticweb.owl.model.OWLOntology; +import org.semanticweb.owl.util.CollectionFactory; + + +public class SuggestClassButton extends AbstractOWLFrameSection<OWLClass, OWLEquivalentClassesAxiom, OWLDescription> { + + private static final String LABEL = "Suggest a class"; + + + public SuggestClassButton(OWLEditorKit editorKit, OWLFrame<OWLClass> frame) + { + super(editorKit, LABEL, frame); + } + + protected void clear() { + + } + + + + protected void refill(OWLOntology ontology) { + + } + + + protected void refillInferred() { + + } + + + public void visit(SuggestClassButton axiom) { + + + } + + + protected OWLEquivalentClassesAxiom createAxiom(OWLDescription object) { + return getOWLDataFactory().getOWLEquivalentClassesAxiom(CollectionFactory.createSet(getRootObject(), object)); + } + + + public OWLFrameSectionRowObjectEditor<OWLDescription> getObjectEditor() { + + return new DLLearnerOptionTab(getOWLEditorKit(), null); + + } + + + public Comparator<OWLFrameSectionRow<OWLClass, OWLEquivalentClassesAxiom, OWLDescription>> getRowComparator() { + return null; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-30 11:19:05
|
Revision: 738 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=738&view=rev Author: lorenz_b Date: 2008-03-30 04:19:02 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-29 21:05:25 UTC (rev 737) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-30 11:19:02 UTC (rev 738) @@ -15,7 +15,7 @@ - private javax.swing.JList conceptList; + private javax.swing.JList resultList; private JPanel contentPanel; @@ -51,9 +51,9 @@ JScrollPane scroll = new JScrollPane(); - conceptList = new JList(model); + resultList = new JList(model); scroll.setPreferredSize(new Dimension(300, 300)); - scroll.setViewportView(conceptList); + scroll.setViewportView(resultList); contentPanel1.add(scroll); @@ -85,6 +85,10 @@ public DefaultListModel getModel() { return model; } + + public javax.swing.JList getResultList() { + return resultList; + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-29 21:05:25 UTC (rev 737) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-30 11:19:02 UTC (rev 738) @@ -7,6 +7,7 @@ import java.util.TimerTask; import java.util.concurrent.ExecutionException; +import javax.swing.SwingUtilities; import javax.swing.SwingWorker; import org.dllearner.core.LearningAlgorithm; @@ -42,10 +43,7 @@ return ConceptPanelDescriptor.IDENTIFIER; } - - public void displayingPanel(){ - - } + class ResultSwingWorker extends SwingWorker<List<Description>, List<Description>> { @@ -76,29 +74,42 @@ try { result = get(); } catch (InterruptedException e) { - e.printStackTrace(); } catch (ExecutionException e) { - e.printStackTrace(); } panel4.getStartButton().setEnabled(true); panel4.getStopButton().setEnabled(false); + updateList(result); - for (Description d : result) - panel4.getModel().addElement(d); - } @Override protected void process(List<List<Description>> resultLists) { panel4.getModel().clear(); for (List<Description> list : resultLists) { - for (Description d : list) - panel4.getModel().addElement(d); + for( Description d : list) + System.out.println(d); + updateList(list); } } + + void updateList(final List<Description> result) { + Runnable doUpdateList = new Runnable() { + @Override + public void run() { + panel4.getModel().clear(); + for (Description d : result) { + panel4.getModel().addElement(d); + } + + } + }; + SwingUtilities.invokeLater(doUpdateList); + + } + public LearningAlgorithm getLa() { return la; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-29 21:05:35
|
Revision: 737 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=737&view=rev Author: lorenz_b Date: 2008-03-29 14:05:25 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-29 20:37:54 UTC (rev 736) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-29 21:05:25 UTC (rev 737) @@ -1,6 +1,7 @@ package org.dllearner.tools.ore; import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ActionListener; import javax.swing.DefaultListModel; @@ -51,7 +52,7 @@ conceptList = new JList(model); - scroll.setSize(100,100); + scroll.setPreferredSize(new Dimension(300, 300)); scroll.setViewportView(conceptList); contentPanel1.add(scroll); @@ -80,6 +81,10 @@ public JButton getStopButton() { return stopButton; } + + public DefaultListModel getModel() { + return model; + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-29 20:37:54 UTC (rev 736) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-29 21:05:25 UTC (rev 737) @@ -2,12 +2,14 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.List; import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.ExecutionException; import javax.swing.SwingWorker; +import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.owl.Description; @@ -45,50 +47,64 @@ } - class ResultSwingWorker extends SwingWorker<Description, Description> - { - @Override - public Description doInBackground() { - - getWizardModel().getOre().start(); + class ResultSwingWorker extends + SwingWorker<List<Description>, List<Description>> { + LearningAlgorithm la; + + @Override + public List<Description> doInBackground() { + + la = getWizardModel().getOre().start(); timer = new Timer(); - timer.schedule(new TimerTask(){ + timer.schedule(new TimerTask() { public void run() { - System.err.println(getWizardModel().getOre() - .getLearningResults(3)); + publish(getWizardModel().getOre().getLearningResults(5)); } - + }, 0, 1000); - - - Description result = getWizardModel().getOre().getLearningResult(); + List<Description> result = getWizardModel().getOre() + .getLearningResults(5); + return result; } - - public void done() { - timer.cancel(); - Description result = null; + + public void done() { + timer.cancel(); + List<Description> result = null; try { result = get(); } catch (InterruptedException e) { - + e.printStackTrace(); } catch (ExecutionException e) { - + e.printStackTrace(); } panel4.getStartButton().setEnabled(true); panel4.getStopButton().setEnabled(false); - panel4.setResult(result.toString()); + for (Description d : result) + panel4.getModel().addElement(d); + } - - - - } + @Override + protected void process(List<List<Description>> resultLists) { + panel4.getModel().clear(); + for (List<Description> list : resultLists) { + for (Description d : list) + panel4.getModel().addElement(d); + } + } + + public LearningAlgorithm getLa() { + return la; + } + + } + public void actionPerformed(ActionEvent event) { if(event.getActionCommand().equals("Start")){ @@ -99,7 +115,7 @@ } else{ panel4.getStopButton().setEnabled(false); - worker.cancel(true); + worker.getLa().stop(); panel4.getStartButton().setEnabled(true); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-29 20:37:54 UTC (rev 736) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-29 21:05:25 UTC (rev 737) @@ -126,20 +126,14 @@ } - public void startLearningThread(){ - - - la.start(); - - - } - - public void start(){ + public LearningAlgorithm start(){ this.setPosNegExamples(); this.setLearningProblem(); this.setLearningAlgorithm(); la.start(); - this.startLearningThread(); + + return la; + } public Description getLearningResult(){ @@ -171,7 +165,7 @@ System.out.println(test.negExamples); test.setLearningProblem(); test.setLearningAlgorithm(); - test.startLearningThread(); + test.start(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-29 20:37:57
|
Revision: 736 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=736&view=rev Author: lorenz_b Date: 2008-03-29 13:37:54 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-03-29 17:13:15 UTC (rev 735) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-03-29 20:37:54 UTC (rev 736) @@ -65,9 +65,8 @@ conceptList = new JList(model); - scroll.setSize(100,100); + scroll.setPreferredSize(new Dimension(200,200)); scroll.setViewportView(conceptList); - contentPanel1.add(scroll); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-29 17:13:15 UTC (rev 735) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-29 20:37:54 UTC (rev 736) @@ -20,17 +20,26 @@ private DefaultListModel model; private JLabel result; - private JButton run; + private JButton startButton; + private JButton stopButton; public LearningPanel() { super(); model = new DefaultListModel(); result = new JLabel(); - run = new JButton("Run"); + JPanel buttonPanel = new JPanel(); + startButton = new JButton("Start"); + + stopButton = new JButton("Stop"); + stopButton.setEnabled(false); + + buttonPanel.add(startButton); + buttonPanel.add(stopButton); contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); - add(run,BorderLayout.EAST); + + add(buttonPanel, BorderLayout.EAST); add(contentPanel,BorderLayout.CENTER); add(result, BorderLayout.SOUTH); } @@ -52,13 +61,25 @@ return contentPanel1; } - public void addButtonListener(ActionListener a){ - run.addActionListener(a); + public void addStartButtonListener(ActionListener a){ + startButton.addActionListener(a); } + public void addStopButtonListener(ActionListener a){ + stopButton.addActionListener(a); + } + public void setResult(String resultStr){ result.setText(resultStr); } + + public JButton getStartButton() { + return startButton; + } + + public JButton getStopButton() { + return stopButton; + } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-29 17:13:15 UTC (rev 735) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-29 20:37:54 UTC (rev 736) @@ -2,6 +2,8 @@ import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.Timer; +import java.util.TimerTask; import java.util.concurrent.ExecutionException; import javax.swing.SwingWorker; @@ -16,12 +18,15 @@ public static final String IDENTIFIER = "LEARNING_PANEL"; LearningPanel panel4; + ResultSwingWorker worker; + Timer timer; public LearningPanelDescriptor() { panel4 = new LearningPanel(); - panel4.addButtonListener(this); - + panel4.addStartButtonListener(this); + panel4.addStopButtonListener(this); + setPanelDescriptorIdentifier(IDENTIFIER); setPanelComponent(panel4); @@ -40,43 +45,64 @@ } - class Result extends SwingWorker<Description, Void> + class ResultSwingWorker extends SwingWorker<Description, Description> { @Override - public Description doInBackground() - { - getWizardModel().getOre().start(); - Description result = getWizardModel().getOre().getLearningResult(); - - - return result; - } + public Description doInBackground() { + + getWizardModel().getOre().start(); + timer = new Timer(); + timer.schedule(new TimerTask(){ + + public void run() { + System.err.println(getWizardModel().getOre() + .getLearningResults(3)); + } + + }, 0, 1000); - public void done(){ - Description result=null; - try { - result = get(); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (ExecutionException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + + Description result = getWizardModel().getOre().getLearningResult(); + + return result; } - panel4.setResult(result.toString()); - } + public void done() { + timer.cancel(); + Description result = null; + try { + result = get(); + } catch (InterruptedException e) { + + e.printStackTrace(); + } catch (ExecutionException e) { + + e.printStackTrace(); + } + panel4.getStartButton().setEnabled(true); + panel4.getStopButton().setEnabled(false); + + panel4.setResult(result.toString()); + } + } - - - - - @Override - public void actionPerformed(ActionEvent arg0) { - new Result().execute(); + public void actionPerformed(ActionEvent event) { + if(event.getActionCommand().equals("Start")){ + panel4.getStartButton().setEnabled(false); + panel4.getStopButton().setEnabled(true); + worker = new ResultSwingWorker(); + worker.execute(); + } + else{ + panel4.getStopButton().setEnabled(false); + worker.cancel(true); + panel4.getStartButton().setEnabled(true); + } + + }} Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-29 17:13:15 UTC (rev 735) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-29 20:37:54 UTC (rev 736) @@ -20,6 +20,8 @@ import org.dllearner.learningproblems.PosNegDefinitionLP; import org.dllearner.reasoning.OWLAPIReasoner; +import java.util.List; + public class ORE { private LearningAlgorithm la; @@ -125,15 +127,11 @@ public void startLearningThread(){ - Thread laThread = new Thread() - { - @Override - public void run(){ + + la.start(); - } - }; - laThread.start(); + } public void start(){ @@ -147,6 +145,10 @@ public Description getLearningResult(){ return la.getBestSolution(); } + + public List<Description> getLearningResults(int anzahl){ + return la.getBestSolutions(anzahl); + } public static void main(String[] args){ Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-03-29 17:13:15 UTC (rev 735) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-03-29 20:37:54 UTC (rev 736) @@ -66,7 +66,7 @@ //TODO nochmal \xFCberdenken if(nextPanelDescriptor.equals("CONCEPT_CHOOSE_PANEL")){ - //((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel3.getModel().clear(); + ((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel3.getModel().clear(); new ConceptRetriever(nextPanelDescriptor).execute(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-29 17:13:31
|
Revision: 735 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=735&view=rev Author: lorenz_b Date: 2008-03-29 10:13:15 -0700 (Sat, 29 Mar 2008) Log Message: ----------- needed for ORE-Wizard Added Paths: ----------- trunk/lib/ore-tool/ trunk/lib/ore-tool/swingx-0.9.2.jar Added: trunk/lib/ore-tool/swingx-0.9.2.jar =================================================================== (Binary files differ) Property changes on: trunk/lib/ore-tool/swingx-0.9.2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-29 17:12:11
|
Revision: 734 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=734&view=rev Author: lorenz_b Date: 2008-03-29 10:11:56 -0700 (Sat, 29 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardModel.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-03-29 17:11:56 UTC (rev 734) @@ -1,7 +1,9 @@ package org.dllearner.tools.ore; import java.awt.BorderLayout; -import java.awt.Color; +import java.awt.Dimension; +import java.awt.geom.Ellipse2D; +import java.awt.geom.RoundRectangle2D; import javax.swing.DefaultListModel; import javax.swing.JLabel; @@ -10,6 +12,11 @@ import javax.swing.JScrollPane; import javax.swing.event.ListSelectionListener; +import org.jdesktop.swingx.JXBusyLabel; +import org.jdesktop.swingx.icon.EmptyIcon; +import org.jdesktop.swingx.painter.BusyPainter; + + public class ConceptPanel extends JPanel{ @@ -19,18 +26,36 @@ private JPanel contentPanel; private DefaultListModel model; - private BlinkLabel blink; + private JXBusyLabel loadingLabel; + private JLabel statusLabel; public ConceptPanel() { super(); + model = new DefaultListModel(); - blink = new BlinkLabel(); - blink.setText("Loading Concepts"); + loadingLabel = new JXBusyLabel(new Dimension(24,24)); + statusLabel = new JLabel(); + + BusyPainter<?> painter = new BusyPainter( + new RoundRectangle2D.Float(0, 0,10.0f,3.2f,10.0f,10.0f), + new Ellipse2D.Float(3.5f,3.5f,17.0f,17.0f)); + painter.setTrailLength(4); + painter.setPoints(8); + painter.setFrame(-1); + loadingLabel.setPreferredSize(new Dimension(24,24)); + loadingLabel.setIcon(new EmptyIcon(24,24)); + loadingLabel.setBusyPainter(painter); + + + JPanel labelPanel = new JPanel(); + labelPanel.add(statusLabel); + labelPanel.add(loadingLabel); + contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); add(contentPanel,BorderLayout.CENTER); - add(blink, BorderLayout.SOUTH); + add(labelPanel, BorderLayout.SOUTH); } private JPanel getContentPanel() { @@ -66,33 +91,44 @@ return conceptList; } - public BlinkLabel getBlinkLabel(){ - return blink; - } + + public JLabel getStatusLabel() { + return statusLabel; + } + + public JXBusyLabel getLoadingLabel() { + return loadingLabel; + } - class BlinkLabel extends JLabel implements Runnable{ - private boolean blinking = false; - - public void start(){ - blinking = true; - new Thread(this).start(); - } - public void stop(){ - blinking = false; - setText("Done! Select Concept and press 'Next'"); - } - public void run(){ - while(blinking){ - setForeground(Color.red); - try { - Thread.sleep(100); - } catch (InterruptedException e) { - return; - } - setForeground(Color.black); - } - } - } +// class BlinkLabel extends JLabel implements Runnable{ +// private boolean blinking = false; +// +// public void start(){ +// blinking = true; +// new Thread(this).start(); +// } +// public void stop(){ +// blinking = false; +// setForeground(Color.black); +// +// } +// public void run(){ +// while(blinking){ +// setText("Loading Concept"); +// +// //setForeground(Color.red); +// try { +// Thread.sleep(300); +// } catch (InterruptedException e) { +// return; +// } +// setText(""); +// +// } +// if(!blinking) +// setText("Done! Select Concept and press 'Next'"); +// } +// } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-03-29 17:11:56 UTC (rev 734) @@ -3,9 +3,11 @@ import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; +import org.dllearner.core.owl.NamedClass; + public class ConceptPanelDescriptor extends WizardPanelDescriptor implements ListSelectionListener{ public static final String IDENTIFIER = "CONCEPT_CHOOSE_PANEL"; @@ -39,7 +41,7 @@ public void valueChanged(ListSelectionEvent e) { setNextButtonAccordingToConceptSelected(); if (!e.getValueIsAdjusting()) - getWizardModel().getOre().setConcept(panel3.getList().getSelectedValue().toString()); + getWizardModel().getOre().setConcept((NamedClass)panel3.getList().getSelectedValue()); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-03-29 17:11:56 UTC (rev 734) @@ -17,13 +17,11 @@ private javax.swing.JButton browseButton; private JPanel contentPanel; - private LeftPanel leftPanel; private JLabel message; public KnowledgeSourcePanel() { -// super(); - leftPanel = new LeftPanel(1); +new LeftPanel(1); contentPanel = getContentPanel(); setLayout(new java.awt.BorderLayout()); Modified: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-29 17:11:56 UTC (rev 734) @@ -5,7 +5,6 @@ import java.util.SortedSet; import java.util.TreeSet; -import org.dllearner.algorithms.RandomGuesser; import org.dllearner.algorithms.refinement.ROLearner; import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; @@ -16,11 +15,10 @@ import org.dllearner.core.ReasoningService; import org.dllearner.core.owl.Description; import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; import org.dllearner.kb.OWLFile; import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; -import org.dllearner.reasoning.DIGReasoner; +import org.dllearner.reasoning.OWLAPIReasoner; public class ORE { @@ -31,34 +29,30 @@ private ComponentManager cm; SortedSet<Individual> posExamples; SortedSet<Individual> negExamples; - Description concept; + NamedClass concept; - public ORE(){ - + public ORE() { + cm = ComponentManager.getInstance(); - - + } // step 1: detect knowledge sources - public void setKnowledgeSource(File f){ - + public void setKnowledgeSource(File f) { + Class<OWLFile> owl = OWLFile.class; - - - ks = cm.knowledgeSource(owl); - - cm.applyConfigEntry(ks, "url", f.toURI().toString()); - - try { - ks.init(); - } catch (ComponentInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - + ks = cm.knowledgeSource(owl); + + cm.applyConfigEntry(ks, "url", f.toURI().toString()); + + try { + ks.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } @@ -66,7 +60,7 @@ public void detectReasoner(){ ReasonerComponent reasoner = cm.reasoner( - DIGReasoner.class, ks); + OWLAPIReasoner.class, ks); try { reasoner.init(); @@ -97,7 +91,7 @@ } public void setLearningProblem(){ - lp = new PosNegDefinitionLP(rs,posExamples, negExamples); + lp = new PosNegDefinitionLP(rs, posExamples, negExamples); lp.init(); } @@ -111,8 +105,8 @@ //la = new ROLearner(lp, rs); Set<String> t = new TreeSet<String>(); - t.add(concept.toString()); - //cm.applyConfigEntry(la, "ignoredConcepts", t ); + t.add(concept.getName()); + cm.applyConfigEntry(la, "ignoredConcepts", t ); try { la.init(); } catch (ComponentInitException e) { @@ -121,13 +115,12 @@ } } - public void setConcept(String conceptStr){ - try { - concept = KBParser.parseConcept(conceptStr); - } catch (ParseException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } +// public void setConcept(String conceptStr){ +// concept = new NamedClass(conceptStr); +// } + + public void setConcept(NamedClass concept){ + this.concept = concept; } @@ -170,7 +163,7 @@ - test.setConcept("http://example.com/father#father"); + test.setConcept(new NamedClass("http://example.com/father#father")); test.setPosNegExamples(); System.out.println(test.posExamples); System.out.println(test.negExamples); Deleted: trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java 2008-03-29 17:11:56 UTC (rev 734) @@ -1,619 +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.ore; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.dllearner.algorithms.BruteForceLearner; -import org.dllearner.algorithms.RandomGuesser; -import org.dllearner.algorithms.gp.GP; -import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.cli.ConfFileOption; -import org.dllearner.core.Component; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.KnowledgeSource; -import org.dllearner.core.LearningAlgorithm; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.core.ReasoningService; -import org.dllearner.core.config.BooleanConfigOption; -import org.dllearner.core.config.ConfigEntry; -import org.dllearner.core.config.ConfigOption; -import org.dllearner.core.config.DoubleConfigOption; -import org.dllearner.core.config.IntegerConfigOption; -import org.dllearner.core.config.InvalidConfigOptionValueException; -import org.dllearner.core.config.StringConfigOption; -import org.dllearner.core.config.StringSetConfigOption; -import org.dllearner.core.config.StringTupleListConfigOption; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.kb.KBFile; -import org.dllearner.kb.OWLFile; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.parser.ConfParser; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; -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.ConceptComparator; -import org.dllearner.utilities.Datastructures; -import org.dllearner.utilities.Helper; -import org.dllearner.utilities.StringTuple; - -/** - * Start class for the ontology repair and enrichment tool. - * - * @author Lorenz Buehmann. - * - */ -public class ORE_alt { - - private static Logger logger = Logger.getRootLogger(); - - private static LearningAlgorithm la; - private ReasoningService rs; - private KnowledgeSource ks; - - /** - * Entry point for CLI interface. - * - * @param args - */ - public static void main(String[] args) throws ComponentInitException { - - File file = new File(args[args.length - 1]); - - // create logger (a simple logger which outputs - // its messages to the console) - SimpleLayout layout = new SimpleLayout(); - ConsoleAppender consoleAppender = new ConsoleAppender(layout); - logger.removeAllAppenders(); - logger.addAppender(consoleAppender); - logger.setLevel(Level.DEBUG); - - ORE_alt ore = null; - ore = new ORE_alt(file); - ore.start(); - } - - public ORE_alt(){ - - } - - public void setKnowledgeSource(File file){ - - } - - /** - * Initialise all components based on conf file. - * - * @param file - * Conf file to read. - * @throws ComponentInitException - */ - public ORE_alt(File file) throws ComponentInitException { - String baseDir = file.getParentFile().getPath(); - - // create component manager instance - String message = "starting component manager ... "; - long cmStartTime = System.nanoTime(); - ComponentManager cm = ComponentManager.getInstance(); - long cmTime = System.nanoTime() - cmStartTime; - message += "OK (" + Helper.prettyPrintNanoSeconds(cmTime) + ")"; - logger.info(message); - - // create a mapping between components and prefixes in the conf file - Map<Class<? extends Component>, String> componentPrefixMapping = createComponentPrefixMapping(); - - // parse conf file - ConfParser parser = ConfParser.parseFile(file); - - // step 1: detect knowledge sources - Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); - Map<URL, Class<? extends KnowledgeSource>> importedFiles = getImportedFiles( - parser, baseDir); - for (Map.Entry<URL, Class<? extends KnowledgeSource>> entry : importedFiles - .entrySet()) { - KnowledgeSource ks = cm.knowledgeSource(entry.getValue()); - // apply URL entry (this assumes that every knowledge source has a - // configuration option "url"), so this may need to be changed in - // the - // future - cm.applyConfigEntry(ks, "url", entry.getKey().toString()); - - sources.add(ks); - configureComponent(cm, ks, componentPrefixMapping, parser); - initComponent(cm, ks); - } - - // step 2: detect used reasoner - ConfFileOption reasonerOption = parser.getConfOptionsByName("reasoner"); - ReasonerComponent reasoner = cm.reasoner( - getReasonerClass(reasonerOption), sources); - configureComponent(cm, reasoner, componentPrefixMapping, parser); - initComponent(cm, reasoner); - rs = cm.reasoningService(reasoner); - - } - - public void start() { - processOREMode(rs); - - } - - /** - * creates a mapping from components to option prefix strings - */ - 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(OWLAPIReasoner.class, "owlAPIReasoner"); - // learning problems - configured via + and - flags for examples - componentPrefixMapping.put(PosNegDefinitionLP.class, - "posNegDefinitionLP"); - // learning algorithms - componentPrefixMapping.put(ROLearner.class, "refinement"); - componentPrefixMapping.put(ExampleBasedROLComponent.class, - "refexamples"); - componentPrefixMapping.put(GP.class, "gp"); - return componentPrefixMapping; - } - - /** - * convenience method basically every prefix (e.g. "refinement" in - * "refinement.horizontalExpFactor) corresponds to a specific component - - * this way the CLI will automatically support any configuration options - * supported by the component - */ - public static void configureComponent(ComponentManager cm, - Component component, - Map<Class<? extends Component>, String> componentPrefixMapping, - ConfParser parser) { - String prefix = componentPrefixMapping.get(component.getClass()); - if (prefix != null) - configureComponent(cm, component, parser - .getConfOptionsByPrefix(prefix)); - } - - // convenience method - see above method - private static void configureComponent(ComponentManager cm, - Component component, List<ConfFileOption> options) { - if (options != null) - for (ConfFileOption option : options) - applyConfFileOption(cm, component, option); - } - - // applies an option to a component - checks whether the option and its - // value is valid - private static void applyConfFileOption(ComponentManager cm, - Component component, ConfFileOption option) { - // the name of the option is suboption-part (the first part refers - // to its component) - String optionName = option.getSubOption(); - - ConfigOption<?> configOption = cm.getConfigOption(component.getClass(), - optionName); - // check whether such an option exists - if (configOption != null) { - - // catch all invalid config options - try { - - // perform compatibility checks - if (configOption instanceof StringConfigOption - && option.isStringOption()) { - - ConfigEntry<String> entry = new ConfigEntry<String>( - (StringConfigOption) configOption, option - .getStringValue()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof IntegerConfigOption - && option.isIntegerOption()) { - - ConfigEntry<Integer> entry = new ConfigEntry<Integer>( - (IntegerConfigOption) configOption, option - .getIntValue()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof DoubleConfigOption - && (option.isIntegerOption() || option.isDoubleOption())) { - - double value; - if (option.isIntegerOption()) - value = option.getIntValue(); - else - value = option.getDoubleValue(); - - ConfigEntry<Double> entry = new ConfigEntry<Double>( - (DoubleConfigOption) configOption, value); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof BooleanConfigOption - && option.isStringOption()) { - - ConfigEntry<Boolean> entry = new ConfigEntry<Boolean>( - (BooleanConfigOption) configOption, Datastructures - .strToBool(option.getStringValue())); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof StringSetConfigOption - && option.isSetOption()) { - - ConfigEntry<Set<String>> entry = new ConfigEntry<Set<String>>( - (StringSetConfigOption) configOption, option - .getSetValues()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof StringTupleListConfigOption - && option.isListOption()) { - - ConfigEntry<List<StringTuple>> entry = new ConfigEntry<List<StringTuple>>( - (StringTupleListConfigOption) configOption, option - .getListTuples()); - cm.applyConfigEntry(component, entry); - - } else { - handleError("The type of conf file entry \"" - + option.getFullName() - + "\" is not correct: value \"" + option.getValue() - + "\" not valid for option type \"" - + configOption.getClass().getName() + "\"."); - } - - } catch (InvalidConfigOptionValueException e) { - e.printStackTrace(); - System.exit(0); - } - - } else - handleError("Unknow option " + option + "."); - } - - /** - * detects all imported files and their format - */ - public static Map<URL, Class<? extends KnowledgeSource>> getImportedFiles( - ConfParser parser, String baseDir) { - List<List<String>> imports = parser.getFunctionCalls().get("import"); - Map<URL, Class<? extends KnowledgeSource>> importedFiles = new HashMap<URL, Class<? extends KnowledgeSource>>(); - - if (imports != null) { - for (List<String> arguments : imports) { - // step 1: detect URL - URL url = null; - try { - String fileString = arguments.get(0); - if (fileString.startsWith("http:")) { - url = new URL(fileString); - } else { - File f = new File(baseDir, arguments.get(0)); - url = f.toURI().toURL(); - } - } catch (MalformedURLException e) { - e.printStackTrace(); - } - - // step 2: detect format - Class<? extends KnowledgeSource> ksClass; - if (arguments.size() == 1) { - String filename = url.getPath(); - String ending = filename.substring(filename - .lastIndexOf(".") + 1); - - if (ending.equals("rdf") || ending.equals("owl")) - ksClass = OWLFile.class; - else if (ending.equals("nt")) - ksClass = OWLFile.class; - else if (ending.equals("kb")) - ksClass = KBFile.class; - else { - System.err.println("Warning: no format given for " - + arguments.get(0) - + " and could not detect it. Chosing RDF/XML."); - ksClass = OWLFile.class; - } - - importedFiles.put(url, ksClass); - } else { - String formatString = arguments.get(1); - - if (formatString.equals("RDF/XML")) - ksClass = OWLFile.class; - else if (formatString.equals("KB")) - ksClass = KBFile.class; - else if (formatString.equals("SPARQL")) - ksClass = SparqlKnowledgeSource.class; - else if (formatString.equals("NT")) - ksClass = OWLFile.class; - else { - throw new RuntimeException( - "Unsupported knowledge source format " - + formatString + ". Exiting."); - } - - importedFiles.put(url, ksClass); - } - } - } - - return importedFiles; - } - - private static void initComponent(ComponentManager cm, Component component) - throws ComponentInitException { - String startMessage = "initialising component \"" - + cm.getComponentName(component.getClass()) + "\" ... "; - long initStartTime = System.nanoTime(); - component.init(); - // standard messsage is just "OK" but can be more detailed for certain - // components - String message = "OK"; - if (component instanceof KBFile) - message = ((KBFile) component).getURL().toString() + " read"; - else if (component instanceof DIGReasoner) { - DIGReasoner reasoner = (DIGReasoner) component; - message = "using " + reasoner.getIdentifier() - + " connected via DIG 1.1 at " - + reasoner.getReasonerURL().toString(); - } - - long initTime = System.nanoTime() - initStartTime; - logger.info(startMessage + message + " (" - + Helper.prettyPrintNanoSeconds(initTime, false, false) + ")"); - } - - private static void processOREMode(ReasoningService rs) { - System.err.println("Concepts :" + rs.getAtomicConcepts()); - - System.out.println("Individuals " + rs.getIndividuals()); - System.out - .println("Entering ORE mode. Enter a existing concept for learning(new) or q to quit"); - - String conceptStr = ""; - do { - //Step 1: choose existing concept which should be (new) learned - System.out.print("enter concept: "); - // read input string - BufferedReader input = new BufferedReader(new InputStreamReader( - System.in)); - - try { - conceptStr = input.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - - if (!conceptStr.equals("q")) { - - // parse concept - Description concept = null; - boolean parsedCorrectly = true; - - try { - concept = KBParser.parseConcept(conceptStr); - - } catch (ParseException e1) { - e1.printStackTrace(); - System.err - .println("The concept you entered could not be parsed. Please try again."); - parsedCorrectly = false; - } catch (TokenMgrError e) { - e.printStackTrace(); - System.err - .println("An error occured during parsing. Please enter a syntactically valid concept."); - parsedCorrectly = false; - } - - if (parsedCorrectly) { - - // compute atomic concepts used in concept - SortedSet<NamedClass> occurringConcepts = new TreeSet<NamedClass>( - new ConceptComparator()); - occurringConcepts.addAll(Helper.getAtomicConcepts(concept)); - - // substract existing concepts from detected - // concepts -> the resulting set should be - // empty, otherwise print a warning (the DIG reasoner - // will just treat them as concepts about which it - // has no knowledge - this makes it hard to - // detect typos - // (note that removeAll currently gives a different - // result here, because the comparator of the argument - // is used) - for (NamedClass ac : rs.getAtomicConcepts()) - occurringConcepts.remove(ac); - - boolean nonExistingConstructs = false; - if (occurringConcepts.size() != 0) { - System.out - .println("You used non-existing atomic concepts or roles. Please correct your query."); - if (occurringConcepts.size() > 0) - - System.out.println("non-existing concepts: " - + occurringConcepts); - - nonExistingConstructs = true; - } - - if (!nonExistingConstructs) { - - // Step 2_1: choose all individuals of the concept as positive examples - SortedSet<Individual> posExamples = null; - posExamples = rs.retrieval(concept); - posExamples.removeAll(posExamples); - posExamples.add(new Individual( - "http://example.com/father#stefan")); - posExamples.add(new Individual( - "http://example.com/father#markus")); - posExamples.add(new Individual( - "http://example.com/father#martin")); - - //Step 2_2: subtract positive examples from all individuals of the ontology - //->negative examples of the concepts - SortedSet<Individual> negExamples = null; - negExamples = rs.getIndividuals(); - for (Individual rem_pos : posExamples) - negExamples.remove(rem_pos); - System.out.println("+" + posExamples); - System.out.println("-" + negExamples); - - //Step 3: Start learning-algorithm - - // step 3_1: set learning problem - ComponentManager cm = ComponentManager.getInstance(); - - PosNegDefinitionLP lp = new PosNegDefinitionLP(rs, - posExamples, negExamples); - - try { - initComponent(cm, lp); - } catch (ComponentInitException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - - // step 3_2: set learning algorithm - - la = new ROLearner(lp, rs); - - try { - initComponent(cm, la); - } catch (ComponentInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - Thread laThread = new Thread() - { - @Override - public void run(){ - la.start(); - } - }; - laThread.start(); - - - System.out.println(la.getBestSolutions(5)); - - //Step 4: Knowledge Engineer chooses one of the suggestions - - //Step 5: Enrichment - - //Step 6: Repair:-check which individuals cause inconsistency - // -problem solving - - } - } - } - - } while (!conceptStr.equals("q")); - - } - - /** - * error handling over the logger - * - * @param message - * is a string and you message for problem - */ - public static void handleError(String message) { - logger.error(message); - System.exit(0); - } - - public ReasoningService getReasoningService() { - return rs; - } - - // edit by Tilo Hielscher - - /** - * Set Reasoner class. Define here all possible reasoners. - * - * @param reasonerOption - * from config file - * @return reasonerClass reasoner class - */ - public static Class<? extends ReasonerComponent> getReasonerClass( - ConfFileOption reasonerOption) { - Class<? extends ReasonerComponent> reasonerClass = null; - if (reasonerOption == null - || reasonerOption.getStringValue().equals("dig")) - reasonerClass = DIGReasoner.class; - else if (reasonerOption.getStringValue().equals("owlAPI")) - reasonerClass = OWLAPIReasoner.class; - else if (reasonerOption.getStringValue().equals("fastRetrieval")) - reasonerClass = FastRetrievalReasoner.class; - else if (reasonerOption.getStringValue().equals("fastInstanceChecker")) - reasonerClass = FastInstanceChecker.class; - else { - handleError("Unknown value " + reasonerOption.getStringValue() - + " for option \"reasoner\"."); - } - return reasonerClass; - } - - public static Class<? extends LearningAlgorithm> getLearningAlgorithm( - ConfFileOption algorithmOption) { - Class<? extends LearningAlgorithm> laClass = null; - if (algorithmOption == null - || algorithmOption.getStringValue().equals("refinement")) - laClass = ROLearner.class; - else if (algorithmOption.getStringValue().equals("refexamples")) - laClass = ExampleBasedROLComponent.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/tools/ore/Wizard.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java 2008-03-29 17:11:56 UTC (rev 734) @@ -174,9 +174,9 @@ wizardDialog.setModal(true); //wizardDialog.pack(); - - wizardDialog.show(); + wizardDialog.setVisible(true); + return returnCode; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java 2008-03-29 17:11:56 UTC (rev 734) @@ -65,10 +65,11 @@ Object nextPanelDescriptor = descriptor.getNextPanelDescriptor(); //TODO nochmal \xFCberdenken - if(nextPanelDescriptor.equals("CONCEPT_CHOOSE_PANEL")) + if(nextPanelDescriptor.equals("CONCEPT_CHOOSE_PANEL")){ + //((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelDescriptor)).panel3.getModel().clear(); new ConceptRetriever(nextPanelDescriptor).execute(); + } - if (nextPanelDescriptor instanceof WizardPanelDescriptor.FinishIdentifier) { wizard.close(Wizard.FINISH_RETURN_CODE); } else { @@ -169,22 +170,23 @@ nextPanelID = nextPanelDescriptor; } - @Override - public Set<NamedClass> doInBackground() - { - ((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelID)).panel3.getBlinkLabel().start(); - System.out.println("test1"); - wizard.getModel().getOre().detectReasoner(); - System.out.println("test2"); - Set<NamedClass> ind = wizard.getModel().getOre().getReasoningService().getAtomicConcepts(); - System.out.println("test3"); - - System.out.println("test4"); - - - return ind; - } + public Set<NamedClass> doInBackground() { + + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( + nextPanelID)).panel3.getStatusLabel().setText( + "Loading concepts"); + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( + nextPanelID)).panel3.getLoadingLabel().setBusy(true); + + wizard.getModel().getOre().detectReasoner(); + + Set<NamedClass> ind = wizard.getModel().getOre() + .getReasoningService().getAtomicConcepts(); + + return ind; + } + public void done(){ Set<NamedClass> ind = null; try { @@ -202,10 +204,13 @@ for (NamedClass cl : ind){ dm.addElement(cl); //nextPanel.panel3.getModel().addElement(cl); - System.out.println(cl.toString()); + System.out.println(cl.getName()); } nextPanel.panel3.getList().setModel(dm); - ((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelID)).panel3.getBlinkLabel().stop(); + ((ConceptPanelDescriptor) wizard.getModel().getPanelHashMap().get( + nextPanelID)).panel3.getStatusLabel().setText( + "Concepts loaded"); + ((ConceptPanelDescriptor)wizard.getModel().getPanelHashMap().get(nextPanelID)).panel3.getLoadingLabel().setBusy(false); } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardModel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardModel.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardModel.java 2008-03-29 17:11:56 UTC (rev 734) @@ -51,10 +51,10 @@ private WizardPanelDescriptor currentPanel; - private HashMap panelHashmap; + private HashMap<Object, WizardPanelDescriptor> panelHashmap; - private HashMap buttonTextHashmap; - private HashMap buttonEnabledHashmap; + private HashMap<String, Object> buttonTextHashmap; + private HashMap<String, Boolean> buttonEnabledHashmap; private PropertyChangeSupport propertyChangeSupport; @@ -65,10 +65,10 @@ */ public WizardModel() { - panelHashmap = new HashMap(); + panelHashmap = new HashMap<Object, WizardPanelDescriptor>(); - buttonTextHashmap = new HashMap(); - buttonEnabledHashmap = new HashMap(); + buttonTextHashmap = new HashMap<String, Object>(); + buttonEnabledHashmap = new HashMap<String, Boolean>(); propertyChangeSupport = new PropertyChangeSupport(this); ore = new ORE(); @@ -107,8 +107,7 @@ // First, get the hashtable reference to the panel that should // be displayed. - WizardPanelDescriptor nextPanel = - (WizardPanelDescriptor)panelHashmap.get(id); + WizardPanelDescriptor nextPanel = panelHashmap.get(id); // If we couldn't find the panel that should be displayed, return // false. @@ -168,7 +167,7 @@ Boolean getBackButtonEnabled() { - return (Boolean)buttonEnabledHashmap.get(BACK_BUTTON_ENABLED_PROPERTY); + return buttonEnabledHashmap.get(BACK_BUTTON_ENABLED_PROPERTY); } void setBackButtonEnabled(Boolean newValue) { @@ -181,7 +180,7 @@ } Boolean getNextFinishButtonEnabled() { - return (Boolean)buttonEnabledHashmap.get(NEXT_FINISH_BUTTON_ENABLED_PROPERTY); + return buttonEnabledHashmap.get(NEXT_FINISH_BUTTON_ENABLED_PROPERTY); } void setNextFinishButtonEnabled(Boolean newValue) { @@ -194,7 +193,7 @@ } Boolean getCancelButtonEnabled() { - return (Boolean)buttonEnabledHashmap.get(CANCEL_BUTTON_ENABLED_PROPERTY); + return buttonEnabledHashmap.get(CANCEL_BUTTON_ENABLED_PROPERTY); } void setCancelButtonEnabled(Boolean newValue) { @@ -228,7 +227,7 @@ this.ore = ore; } - public HashMap getPanelHashMap(){ + public HashMap<Object, WizardPanelDescriptor> getPanelHashMap(){ return panelHashmap; } Modified: trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java 2008-03-28 20:22:07 UTC (rev 733) +++ trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java 2008-03-29 17:11:56 UTC (rev 734) @@ -1,7 +1,6 @@ package org.dllearner.tools.ore; -import java.io.*; public class WizardPanelNotFoundException extends RuntimeException { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ton...@us...> - 2008-03-28 20:22:14
|
Revision: 733 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=733&view=rev Author: tonytacker Date: 2008-03-28 13:22:07 -0700 (Fri, 28 Mar 2008) Log Message: ----------- small fix Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java Modified: trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-03-27 13:26:15 UTC (rev 732) +++ trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-03-28 20:22:07 UTC (rev 733) @@ -87,7 +87,7 @@ * * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent) */ - @Override + // @Override public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException { } @@ -96,11 +96,13 @@ * * @see javax.swing.event.TreeWillExpandListener#treeWillExpand(javax.swing.event.TreeExpansionEvent) */ - @Override + // @Override public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException { - //System.out.println("getIndexOfChild: "+ ebNodeModel.getIndexOfChild(rootNode, event.getPath())); + // System.out.println("getIndexOfChild: "+ + // ebNodeModel.getIndexOfChild(rootNode, event.getPath())); - //System.out.println("row_for_path: " + this.tree.getRowForPath(event.getPath())); + // System.out.println("row_for_path: " + + // this.tree.getRowForPath(event.getPath())); int index = this.tree.getRowForPath(event.getPath()); // ebNodeModel.getChild(rootNode, 9); if (index > 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-03-27 13:26:17
|
Revision: 732 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=732&view=rev Author: sknappe Date: 2008-03-27 06:26:15 -0700 (Thu, 27 Mar 2008) Log Message: ----------- deleted variable in Description a web service method now exists to get instances to a certain concept Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/owl/Description.java trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java Modified: trunk/src/dl-learner/org/dllearner/core/owl/Description.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/Description.java 2008-03-27 08:26:58 UTC (rev 731) +++ trunk/src/dl-learner/org/dllearner/core/owl/Description.java 2008-03-27 13:26:15 UTC (rev 732) @@ -33,8 +33,7 @@ protected Description parent = null; protected List<Description> children = new LinkedList<Description>(); - protected String sparqlVar = "subject"; - + public abstract int getArity(); /** @@ -202,11 +201,4 @@ public abstract void accept(DescriptionVisitor visitor); - public String getSparqlVar() { - return sparqlVar; - } - - public void setSparqlVar(String sparqlVar) { - this.sparqlVar = sparqlVar; - } } Modified: trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-03-27 08:26:58 UTC (rev 731) +++ trunk/src/dl-learner/org/dllearner/kb/sparql/SparqlQueryDescriptionConvertVisitor.java 2008-03-27 13:26:15 UTC (rev 732) @@ -1,6 +1,8 @@ package org.dllearner.kb.sparql; +import java.util.Stack; + import org.dllearner.algorithms.gp.ADC; import org.dllearner.core.owl.DatatypeExactCardinalityRestriction; import org.dllearner.core.owl.DatatypeMaxCardinalityRestriction; @@ -32,10 +34,17 @@ */ public class SparqlQueryDescriptionConvertVisitor implements DescriptionVisitor{ + private Stack<String> stack = new Stack<String>(); + private String query=""; private int currentObject=0; + public SparqlQueryDescriptionConvertVisitor() + { + stack.push("subject"); + } + public String getSparqlQuery() { query="SELECT ?subject\nWHERE {"+query; @@ -44,6 +53,14 @@ return query; } + public static String getSparqlQuery(String description) throws ParseException + { + Description d = KBParser.parseConcept(description); + SparqlQueryDescriptionConvertVisitor visitor=new SparqlQueryDescriptionConvertVisitor(); + d.accept(visitor); + return visitor.getSparqlQuery(); + } + public static String getSparqlQuery(Description description) { SparqlQueryDescriptionConvertVisitor visitor=new SparqlQueryDescriptionConvertVisitor(); @@ -58,7 +75,7 @@ */ public static void main(String[] args) { try { - Description d = KBParser.parseConcept("EXISTS \"http://dbpedia.org/property/disambiguates\".TOP"); + String d = "EXISTS \"http://dbpedia.org/property/disambiguates\".TOP"; String query = SparqlQueryDescriptionConvertVisitor.getSparqlQuery(d); System.out.println(d); System.out.println(query); @@ -87,10 +104,11 @@ */ public void visit(ObjectSomeRestriction description) { System.out.println("ObjectSomeRestriction"); - query+="?"+description.getSparqlVar()+" <"+description.getRole()+"> ?object"+currentObject+"."; - description.getChild(0).setSparqlVar("object"+currentObject); + query+="?"+stack.peek()+" <"+description.getRole()+"> ?object"+currentObject+"."; + stack.push("object"+currentObject); currentObject++; description.getChild(0).accept(this); + stack.pop(); System.out.println(description.getRole()); System.out.println(description.getChild(0)); } @@ -173,7 +191,7 @@ */ public void visit(NamedClass description) { System.out.println("NamedClass"); - query+="?"+description.getSparqlVar()+" a <"+description.getName()+">"; + query+="?"+stack.peek()+" a <"+description.getName()+">"; } /* (non-Javadoc) Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-03-27 08:26:58 UTC (rev 731) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2008-03-27 13:26:15 UTC (rev 732) @@ -522,10 +522,10 @@ } @WebMethod - public int sparqlQueryThreaded(int sessionID, int componentID, final String query) throws ClientNotKnownException + public int sparqlQueryThreaded(int sessionID, int componentID, String query) throws ClientNotKnownException { final ClientState state = getState(sessionID); - final Component component = state.getComponent(componentID); + Component component = state.getComponent(componentID); final int id=state.addQuery(((SparqlKnowledgeSource)component).sparqlQueryThreaded(query)); Thread sparqlThread = new Thread() { @Override @@ -591,10 +591,11 @@ } @WebMethod - public String getSparqlForConcept(int id) throws ClientNotKnownException { + public void SparqlRetrievalThreaded(int id, int componentID, String conceptString) throws ClientNotKnownException, ParseException { ClientState state = getState(id); - Description solution=state.getLearningAlgorithm().getBestSolution(); - return SparqlQueryDescriptionConvertVisitor.getSparqlQuery(solution); + // call parser to parse concept + String sparqlQuery = SparqlQueryDescriptionConvertVisitor.getSparqlQuery(conceptString); + sparqlQueryThreaded(id, componentID,sparqlQuery); } @WebMethod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-27 08:27:08
|
Revision: 731 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=731&view=rev Author: lorenz_b Date: 2008-03-27 01:26:58 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java Modified: trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java 2008-03-27 06:53:43 UTC (rev 730) +++ trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java 2008-03-27 08:26:58 UTC (rev 731) @@ -17,9 +17,7 @@ private JTextArea instructionsField; private JScrollPane jScrollPane1; - - - + private JLabel welcomeTitle; private JPanel contentPanel; @@ -27,21 +25,11 @@ public IntroductionPanel() { - - - - contentPanel = getContentPanel(); - - - setLayout(new java.awt.BorderLayout()); - - - //add(leftPanel, BorderLayout.WEST); - + JPanel secondaryPanel = new JPanel(); secondaryPanel.add(contentPanel, BorderLayout.NORTH); add(contentPanel, BorderLayout.CENTER); @@ -51,8 +39,11 @@ private JPanel getContentPanel() { JPanel contentPanel1 = new JPanel(); + JPanel jPanel1 = new JPanel(); + contentPanel1.setLayout(new java.awt.BorderLayout()); + jScrollPane1 = new JScrollPane(); instructionsField = new JTextArea(); @@ -69,38 +60,24 @@ instructionsField.setFont(new Font("Serif",Font.PLAIN,14)); instructionsField.setText("This is an test of a wizard dialog, which allows a knowledge engineer to select " + "a concept of an ontology which should be (re)learned. \n\nOn " + - "the next page, choose a JAR file that contains some components. It will find any " + - "JavaBeans listed in the manifest, and also let you add classes from the JAR file. " + - "When the resulting NetBeans plug-in is installed in NetBeans, the components you " + - "selected will be on the Component Palette, and can be dragged and dropped onto Swing " + - "forms. The library display name you enter is also the name that will be used for the " + - "category in the component palette where your components will appear."); + "On the next page, choose a OWL file that contains an ontology. It will find any " + + "concepts listed in the manifest, and also the positive and negative examples of the concept. " + + "When the concept you selected is learned, you are able to add the axiom to the ontology " + + "and after all you might be able to repair if necessary. " ); instructionsField.setWrapStyleWord(true); jScrollPane1.setViewportView(instructionsField); - - - - - + welcomeTitle = new JLabel(); welcomeTitle.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(0, 0, 0))); - - - - contentPanel1.setLayout(new java.awt.BorderLayout()); - welcomeTitle.setFont(new java.awt.Font("MS Sans Serif", Font.BOLD, 14)); welcomeTitle.setText("Welcome to the DL-Learner ORE-Tool!"); contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH); - + jPanel1.setLayout(new java.awt.GridLayout(0, 1,0,0)); - - //jPanel1.add(blankSpace); - - jPanel1.add(jScrollPane1); - contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER); + + return contentPanel1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-27 06:53:49
|
Revision: 730 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=730&view=rev Author: lorenz_b Date: 2008-03-26 23:53:43 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java Added: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-27 06:53:43 UTC (rev 730) @@ -0,0 +1,183 @@ +package org.dllearner.tools.ore; + +import java.io.File; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.algorithms.RandomGuesser; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.LearningProblemUnsupportedException; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.ReasoningService; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.kb.OWLFile; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +import org.dllearner.reasoning.DIGReasoner; + +public class ORE { + + private LearningAlgorithm la; + private ReasoningService rs; + private KnowledgeSource ks; + private PosNegDefinitionLP lp; + private ComponentManager cm; + SortedSet<Individual> posExamples; + SortedSet<Individual> negExamples; + Description concept; + + public ORE(){ + + cm = ComponentManager.getInstance(); + + + } + + // step 1: detect knowledge sources + + public void setKnowledgeSource(File f){ + + Class<OWLFile> owl = OWLFile.class; + + + ks = cm.knowledgeSource(owl); + + cm.applyConfigEntry(ks, "url", f.toURI().toString()); + + try { + ks.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + } + + + + public void detectReasoner(){ + + ReasonerComponent reasoner = cm.reasoner( + DIGReasoner.class, ks); + + try { + reasoner.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + rs = cm.reasoningService(reasoner); + } + + public ReasoningService getReasoningService(){ + return rs; + } + + public SortedSet<Individual> getPosExamples(){ + return posExamples; + } + + public void setPosNegExamples(){ + posExamples = rs.retrieval(concept); + negExamples = rs.getIndividuals(); + for (Individual rem_pos : posExamples) + negExamples.remove(rem_pos); + } + + public SortedSet<Individual> getNegExamples(){ + return negExamples; + } + + public void setLearningProblem(){ + lp = new PosNegDefinitionLP(rs,posExamples, negExamples); + lp.init(); + } + + public void setLearningAlgorithm(){ + try { + la = cm.learningAlgorithm(ROLearner.class, lp, rs); + } catch (LearningProblemUnsupportedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + //la = new ROLearner(lp, rs); + + Set<String> t = new TreeSet<String>(); + t.add(concept.toString()); + //cm.applyConfigEntry(la, "ignoredConcepts", t ); + try { + la.init(); + } catch (ComponentInitException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + public void setConcept(String conceptStr){ + try { + concept = KBParser.parseConcept(conceptStr); + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + + public void startLearningThread(){ + Thread laThread = new Thread() + { + @Override + public void run(){ + la.start(); + + } + }; + laThread.start(); + } + + public void start(){ + this.setPosNegExamples(); + this.setLearningProblem(); + this.setLearningAlgorithm(); + la.start(); + this.startLearningThread(); + } + + public Description getLearningResult(){ + return la.getBestSolution(); + } + + + public static void main(String[] args){ + + ORE test = new ORE(); + //File owlFile = new File("examples/family/father.owl"); + File owlFile = new File("src/dl-learner/org/dllearner/tools/ore/father.owl"); + + test.setKnowledgeSource(owlFile); + + test.detectReasoner(); + ReasoningService rs = test.getReasoningService(); + System.err.println("Concepts :" + rs.getAtomicConcepts()); + + + + test.setConcept("http://example.com/father#father"); + test.setPosNegExamples(); + System.out.println(test.posExamples); + System.out.println(test.negExamples); + test.setLearningProblem(); + test.setLearningAlgorithm(); + test.startLearningThread(); + } + + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ton...@us...> - 2008-03-27 05:49:13
|
Revision: 729 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=729&view=rev Author: tonytacker Date: 2008-03-26 22:48:54 -0700 (Wed, 26 Mar 2008) Log Message: ----------- thats all i can test, sorry Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java Modified: trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java =================================================================== --- trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-03-26 20:11:12 UTC (rev 728) +++ trunk/src/dl-learner/org/dllearner/gui/TreeWindow.java 2008-03-27 05:48:54 UTC (rev 729) @@ -21,17 +21,19 @@ */ import javax.swing.*; + import javax.swing.event.TreeExpansionEvent; -import javax.swing.event.TreeExpansionListener; +import javax.swing.event.TreeWillExpandListener; +import javax.swing.tree.ExpandVetoException; + import org.dllearner.algorithms.refexamples.*; - /** * TreeWindow * * @author Tilo Hielscher */ -public class TreeWindow extends JFrame implements TreeExpansionListener { +public class TreeWindow extends JFrame implements TreeWillExpandListener { private static final long serialVersionUID = -5807192061389763835L; @@ -39,7 +41,8 @@ private Config config; private EBNodeTreeModel ebNodeModel; private ExampleBasedNode rootNode; - + private JTree tree; + public TreeWindow(Config config) { this.config = config; this.setTitle("DL-Learner Tree"); @@ -57,20 +60,20 @@ ExampleBasedROLComponent ebrol = (ExampleBasedROLComponent) config .getLearningAlgorithm(); this.rootNode = ebrol.getStartNode(); - + System.out.println("childs1: " + rootNode.getChildren()); - + this.ebNodeModel = new EBNodeTreeModel(rootNode); - // childrens to treeModel + // childrens to treeModel Object first = ebNodeModel.getChild(rootNode, 0); System.out.println("getIndexOfChild: " + ebNodeModel.getIndexOfChild(rootNode, first)); - //System.out.println("childs2: " + ebNodeModel.getChildren((ExampleBasedNode) first)); + // System.out.println("childs2: " + + // ebNodeModel.getChildren((ExampleBasedNode) first)); - - JTree tree = new JTree(ebNodeModel); - tree.addTreeExpansionListener(this); + tree = new JTree(ebNodeModel); + tree.addTreeWillExpandListener(this); this.add(new JScrollPane(tree)); } @@ -79,30 +82,30 @@ this.setVisible(true); } - /* (non-Javadoc) - * @see javax.swing.event.TreeExpansionListener#treeCollapsed(javax.swing.event.TreeExpansionEvent) + /* + * (non-Javadoc) + * + * @see javax.swing.event.TreeWillExpandListener#treeWillCollapse(javax.swing.event.TreeExpansionEvent) */ @Override - public void treeCollapsed(TreeExpansionEvent event) { - System.out.println("collapsed"); + public void treeWillCollapse(TreeExpansionEvent event) throws ExpandVetoException { } - /* (non-Javadoc) - * @see javax.swing.event.TreeExpansionListener#treeExpanded(javax.swing.event.TreeExpansionEvent) + /* + * (non-Javadoc) + * + * @see javax.swing.event.TreeWillExpandListener#treeWillExpand(javax.swing.event.TreeExpansionEvent) */ @Override - public void treeExpanded(TreeExpansionEvent event) { - System.out.println("expanded: " + event.getPath()); - //Object path = event.getPath(); - - //System.out.println("childcount: " + ebNodeModel.getChildCount(path)); - - - //ebNodeModel.getChild(event.getSource(), 0); - System.out.println("getIndexOfChild: " + ebNodeModel.getIndexOfChild(rootNode, event.getPath())); - - - ebNodeModel.getChild(rootNode, 9); + public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException { + //System.out.println("getIndexOfChild: "+ ebNodeModel.getIndexOfChild(rootNode, event.getPath())); + + //System.out.println("row_for_path: " + this.tree.getRowForPath(event.getPath())); + int index = this.tree.getRowForPath(event.getPath()); + // ebNodeModel.getChild(rootNode, 9); + if (index > 0) + ebNodeModel.getChild(rootNode, index); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lor...@us...> - 2008-03-26 20:11:58
|
Revision: 728 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=728&view=rev Author: lorenz_b Date: 2008-03-26 13:11:12 -0700 (Wed, 26 Mar 2008) Log Message: ----------- Wizard for ORE Added Paths: ----------- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java trunk/src/dl-learner/org/dllearner/tools/ore/Main.java trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java trunk/src/dl-learner/org/dllearner/tools/ore/Wizard.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardController.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardModel.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelDescriptor.java trunk/src/dl-learner/org/dllearner/tools/ore/WizardPanelNotFoundException.java trunk/src/dl-learner/org/dllearner/tools/ore/father.owl Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java Added: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanel.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,101 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.Color; + +import javax.swing.DefaultListModel; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.event.ListSelectionListener; + +public class ConceptPanel extends JPanel{ + + + + private javax.swing.JList conceptList; + + private JPanel contentPanel; + + private DefaultListModel model; + private BlinkLabel blink; + + public ConceptPanel() { + + super(); + model = new DefaultListModel(); + blink = new BlinkLabel(); + blink.setText("Loading Concepts"); + contentPanel = getContentPanel(); + setLayout(new java.awt.BorderLayout()); + add(contentPanel,BorderLayout.CENTER); + add(blink, BorderLayout.SOUTH); + } + + private JPanel getContentPanel() { + + JPanel contentPanel1 = new JPanel(); + JScrollPane scroll = new JScrollPane(); + + + conceptList = new JList(model); + scroll.setSize(100,100); + scroll.setViewportView(conceptList); + + contentPanel1.add(scroll); + + + + return contentPanel1; + } + + public DefaultListModel getModel(){ + return model; + } + + public void setModel(DefaultListModel dm){ + conceptList.setModel(dm); + } + + public void addSelectionListener(ListSelectionListener l){ + conceptList.addListSelectionListener(l); + } + + public JList getList(){ + return conceptList; + } + + public BlinkLabel getBlinkLabel(){ + return blink; + } + + class BlinkLabel extends JLabel implements Runnable{ + private boolean blinking = false; + + public void start(){ + blinking = true; + new Thread(this).start(); + } + public void stop(){ + blinking = false; + setText("Done! Select Concept and press 'Next'"); + } + public void run(){ + while(blinking){ + setForeground(Color.red); + try { + Thread.sleep(100); + } catch (InterruptedException e) { + return; + } + setForeground(Color.black); + } + } + } + + + + + +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ConceptPanelDescriptor.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,60 @@ +package org.dllearner.tools.ore; + +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; + + + + +public class ConceptPanelDescriptor extends WizardPanelDescriptor implements ListSelectionListener{ + + public static final String IDENTIFIER = "CONCEPT_CHOOSE_PANEL"; + + ConceptPanel panel3; + + public ConceptPanelDescriptor() { + + panel3 = new ConceptPanel(); + panel3.addSelectionListener(this); + + setPanelDescriptorIdentifier(IDENTIFIER); + setPanelComponent(panel3); + + } + + public Object getNextPanelDescriptor() { + return LearningPanelDescriptor.IDENTIFIER; + } + + public Object getBackPanelDescriptor() { + return KnowledgeSourcePanelDescriptor.IDENTIFIER; + } + + public void aboutToDisplayPanel() { + setNextButtonAccordingToConceptSelected(); + } + + + @Override + public void valueChanged(ListSelectionEvent e) { + setNextButtonAccordingToConceptSelected(); + if (!e.getValueIsAdjusting()) + getWizardModel().getOre().setConcept(panel3.getList().getSelectedValue().toString()); + + } + + private void setNextButtonAccordingToConceptSelected() { + + if (panel3.getList().getSelectedValue()!= null){ + getWizard().setNextFinishButtonEnabled(true); + }else{ + getWizard().setNextFinishButtonEnabled(false); + } + + } + + + + + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanel.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,109 @@ +package org.dllearner.tools.ore; + + +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Font; + +import javax.swing.BorderFactory; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.UIManager; + + +public class IntroductionPanel extends JPanel { + + private JTextArea instructionsField; + private JScrollPane jScrollPane1; + + + + private JLabel welcomeTitle; + private JPanel contentPanel; + + + + public IntroductionPanel() { + + + + + + contentPanel = getContentPanel(); + + + + + setLayout(new java.awt.BorderLayout()); + + + + //add(leftPanel, BorderLayout.WEST); + + JPanel secondaryPanel = new JPanel(); + secondaryPanel.add(contentPanel, BorderLayout.NORTH); + add(contentPanel, BorderLayout.CENTER); + } + + + private JPanel getContentPanel() { + + JPanel contentPanel1 = new JPanel(); + JPanel jPanel1 = new JPanel(); + + jScrollPane1 = new JScrollPane(); + instructionsField = new JTextArea(); + + + //setLayout(new GridBagLayout()); + setBorder(BorderFactory.createEmptyBorder(12, 6, 12, 12)); + jScrollPane1.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + jScrollPane1.setViewportBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); + instructionsField.setBackground(UIManager.getDefaults().getColor("control")); + instructionsField.setColumns(20); + instructionsField.setEditable(false); + instructionsField.setLineWrap(true); + instructionsField.setRows(5); + instructionsField.setFont(new Font("Serif",Font.PLAIN,14)); + instructionsField.setText("This is an test of a wizard dialog, which allows a knowledge engineer to select " + + "a concept of an ontology which should be (re)learned. \n\nOn " + + "the next page, choose a JAR file that contains some components. It will find any " + + "JavaBeans listed in the manifest, and also let you add classes from the JAR file. " + + "When the resulting NetBeans plug-in is installed in NetBeans, the components you " + + "selected will be on the Component Palette, and can be dragged and dropped onto Swing " + + "forms. The library display name you enter is also the name that will be used for the " + + "category in the component palette where your components will appear."); + instructionsField.setWrapStyleWord(true); + jScrollPane1.setViewportView(instructionsField); + + + + + + welcomeTitle = new JLabel(); + welcomeTitle.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(0, 0, 0))); + + + + contentPanel1.setLayout(new java.awt.BorderLayout()); + + welcomeTitle.setFont(new java.awt.Font("MS Sans Serif", Font.BOLD, 14)); + welcomeTitle.setText("Welcome to the DL-Learner ORE-Tool!"); + contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH); + + jPanel1.setLayout(new java.awt.GridLayout(0, 1,0,0)); + + //jPanel1.add(blankSpace); + + + jPanel1.add(jScrollPane1); + + contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER); + + return contentPanel1; + + } + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/IntroductionPanelDescriptor.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,23 @@ +package org.dllearner.tools.ore; + + + +public class IntroductionPanelDescriptor extends WizardPanelDescriptor { + + public static final String IDENTIFIER = "INTRODUCTION_PANEL"; + + public IntroductionPanelDescriptor() { + super(IDENTIFIER, new IntroductionPanel()); + } + + public Object getNextPanelDescriptor() { + return KnowledgeSourcePanelDescriptor.IDENTIFIER; + } + + public Object getBackPanelDescriptor() { + return null; + } + + + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanel.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,127 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.event.ActionListener; +import java.io.File; + +import javax.swing.JFileChooser; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.event.DocumentListener; +import javax.swing.filechooser.FileFilter; + +public class KnowledgeSourcePanel extends JPanel{ + + + private javax.swing.JTextField fileURL; + private javax.swing.JButton browseButton; + + private JPanel contentPanel; + private LeftPanel leftPanel; + private JLabel message; + + public KnowledgeSourcePanel() { + +// super(); + leftPanel = new LeftPanel(1); + contentPanel = getContentPanel(); + + setLayout(new java.awt.BorderLayout()); + + //add(leftPanel,BorderLayout.WEST); + add(contentPanel,BorderLayout.CENTER); + + } + + private JPanel getContentPanel() { + + JPanel contentPanel1 = new JPanel(); + + message = new JLabel(); + message.setText("enter or browse OWL file"); + fileURL = new javax.swing.JTextField(40); + + browseButton = new javax.swing.JButton("browse"); + + contentPanel1.setLayout(new BorderLayout()); + + JPanel panel = new JPanel(); + panel.add(fileURL); + panel.add(browseButton); + + contentPanel1.add(panel,BorderLayout.CENTER); + contentPanel1.add(message,BorderLayout.SOUTH); + + + + return contentPanel1; + } + + public void addListeners(ActionListener l, DocumentListener d) { + browseButton.addActionListener(l); + fileURL.addActionListener(l); + fileURL.getDocument().addDocumentListener(d); + } + + + + public void openFileChooser(){ + JFileChooser filechooser = new JFileChooser(); + + filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY); + String choosenPath = fileURL.getText(); + if(!choosenPath.equals("") && (new File(choosenPath)).exists()) + filechooser.setCurrentDirectory(new File(fileURL.getText())); + + filechooser.addChoosableFileFilter(new FileFilter() { + public boolean accept(File f) { + if (f.isDirectory()) return true; + return f.getName().toLowerCase().endsWith(".owl"); + } + public String getDescription () { return "OWLs"; } + }); + int status = filechooser.showOpenDialog( null ); + + if ( status == JFileChooser.APPROVE_OPTION ){ + String strURL = filechooser.getSelectedFile().getAbsolutePath(); + fileURL.setText(strURL); + + + + }else{ + System.out.println( "Auswahl abgebrochen" ); + } + } + + public boolean isExistingOWLFile(){ + if(!fileURL.getText().equals("") && !getOWLFile().exists()){ + + message.setText(fileURL.getText()+" does not exist"); + return false; + } + if(!fileURL.getText().equals("") && (getOWLFile().isDirectory() || (getOWLFile().isFile() && !getOWLFile().getPath().endsWith(".owl")))){ + System.err.println(getOWLFile().getPath()); + message.setText(fileURL.getText()+" is not a OWL file"); + return false; + } + if(fileURL.getText().equals("")){ + message.setText("enter or browse OWL file"); + return false; + } + if(getOWLFile().exists() && getOWLFile().getPath().endsWith(".owl")){ + message.setText(""); + return true; + } + return true; + + + + } + + public File getOWLFile() { + return new File(fileURL.getText()); + } + + + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/KnowledgeSourcePanelDescriptor.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,119 @@ +package org.dllearner.tools.ore; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Set; + +import javax.swing.SwingWorker; +import javax.swing.event.DocumentEvent; +import javax.swing.event.DocumentListener; + +import org.dllearner.core.owl.NamedClass; + + +public class KnowledgeSourcePanelDescriptor extends WizardPanelDescriptor implements ActionListener, DocumentListener{ + + public static final String IDENTIFIER = "KNOWLEDGESOURCE_CHOOSE_PANEL"; + + KnowledgeSourcePanel panel2; + + public KnowledgeSourcePanelDescriptor() { + + panel2 = new KnowledgeSourcePanel(); + + panel2.addListeners(this, this); + + setPanelDescriptorIdentifier(IDENTIFIER); + setPanelComponent(panel2); + + } + + public Object getNextPanelDescriptor() { + return ConceptPanelDescriptor.IDENTIFIER; + } + + public Object getBackPanelDescriptor() { + return IntroductionPanelDescriptor.IDENTIFIER; + } + + + public void aboutToDisplayPanel() { + setNextButtonAccordingToExistingOWLFile(); + } + + public void actionPerformed(ActionEvent e) { + String cmd = e.getActionCommand(); + if(cmd.equals("browse")){ + panel2.openFileChooser(); + } + + setNextButtonAccordingToExistingOWLFile(); + } + + + + + private void setNextButtonAccordingToExistingOWLFile() { + + if (panel2.isExistingOWLFile()){ + getWizardModel().getOre().setKnowledgeSource(panel2.getOWLFile()); + getWizard().setNextFinishButtonEnabled(true); +// new ConceptRetriever().execute(); +// System.err.println("test"); + } + + + + + + else + getWizard().setNextFinishButtonEnabled(false); + + } + + + @Override + public void changedUpdate(DocumentEvent e) { + setNextButtonAccordingToExistingOWLFile(); + + } + + @Override + public void insertUpdate(DocumentEvent e) { + setNextButtonAccordingToExistingOWLFile(); + + } + + @Override + public void removeUpdate(DocumentEvent e) { + setNextButtonAccordingToExistingOWLFile(); + + } + class ConceptRetriever extends SwingWorker<Set<NamedClass>, NamedClass> + { + @Override + public Set<NamedClass> doInBackground() + { + getWizardModel().getOre().detectReasoner(); + Set<NamedClass> ind = getWizardModel().getOre().getReasoningService().getAtomicConcepts(); + ConceptPanelDescriptor nextPanel = (ConceptPanelDescriptor)getWizardModel().getPanelHashMap().get(getNextPanelDescriptor()); + nextPanel.panel3.getModel().clear(); + + for (NamedClass cl : ind){ + publish(cl); + nextPanel.panel3.getModel().addElement(cl); + System.out.println(cl.toString()); + } + return ind; + } + + + + + } + + + + + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanel.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,73 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.event.ActionListener; + +import javax.swing.DefaultListModel; +import javax.swing.JButton; +import javax.swing.JLabel; +import javax.swing.JList; +import javax.swing.JPanel; +import javax.swing.JScrollPane; + +public class LearningPanel extends JPanel{ + + + + private javax.swing.JList conceptList; + + private JPanel contentPanel; + + private DefaultListModel model; + private JLabel result; + private JButton run; + + public LearningPanel() { + + super(); + model = new DefaultListModel(); + result = new JLabel(); + run = new JButton("Run"); + contentPanel = getContentPanel(); + setLayout(new java.awt.BorderLayout()); + add(run,BorderLayout.EAST); + add(contentPanel,BorderLayout.CENTER); + add(result, BorderLayout.SOUTH); + } + + private JPanel getContentPanel() { + + JPanel contentPanel1 = new JPanel(); + JScrollPane scroll = new JScrollPane(); + + + conceptList = new JList(model); + scroll.setSize(100,100); + scroll.setViewportView(conceptList); + + contentPanel1.add(scroll); + + + + return contentPanel1; + } + + public void addButtonListener(ActionListener a){ + run.addActionListener(a); + } + + public void setResult(String resultStr){ + result.setText(resultStr); + } + + + + + +} + + + + + + Added: trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LearningPanelDescriptor.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,82 @@ +package org.dllearner.tools.ore; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.concurrent.ExecutionException; + +import javax.swing.SwingWorker; + +import org.dllearner.core.owl.Description; + + + + +public class LearningPanelDescriptor extends WizardPanelDescriptor implements ActionListener{ + + public static final String IDENTIFIER = "LEARNING_PANEL"; + + LearningPanel panel4; + + public LearningPanelDescriptor() { + + panel4 = new LearningPanel(); + panel4.addButtonListener(this); + + setPanelDescriptorIdentifier(IDENTIFIER); + setPanelComponent(panel4); + + } + + public Object getNextPanelDescriptor() { + return LearningPanelDescriptor.IDENTIFIER; + } + + public Object getBackPanelDescriptor() { + return ConceptPanelDescriptor.IDENTIFIER; + } + + + public void displayingPanel(){ + + } + + class Result extends SwingWorker<Description, Void> + { + @Override + public Description doInBackground() + { + getWizardModel().getOre().start(); + Description result = getWizardModel().getOre().getLearningResult(); + + + return result; + } + + public void done(){ + Description result=null; + try { + result = get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + panel4.setResult(result.toString()); + } + + + + } + + + + + + + @Override + public void actionPerformed(ActionEvent arg0) { + new Result().execute(); + + }} Added: trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/LeftPanel.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,59 @@ +package org.dllearner.tools.ore; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GridLayout; + +import javax.swing.JLabel; +import javax.swing.JPanel; + +public class LeftPanel extends JPanel{ + + private JLabel[] jLabel; + + public LeftPanel(int i){ + + jLabel = new JLabel[5]; + setBackground(new java.awt.Color(255, 255, 255)); + JPanel panel2 = new JPanel(); + panel2.setBackground(new java.awt.Color(255, 255, 255)); + panel2.setLayout(new GridLayout(5,1,0,10)); + jLabel[0] = new JLabel("1. Introduction"); + jLabel[1] = new JLabel("2. Knowledge Source"); + jLabel[2] = new JLabel("3. Concept"); + jLabel[3] = new JLabel("4. Examples"); + jLabel[4] = new JLabel("5. Learning"); + + jLabel[i].setFont(jLabel[i].getFont().deriveFont(Font.BOLD)); + + for(JLabel current : jLabel) + panel2.add(current); + setLayout(new BorderLayout()); + setPreferredSize(new Dimension(140,500)); + add(panel2, BorderLayout.NORTH); + + } + + public void set(int i){ + removeAll(); + + setBackground(new java.awt.Color(255, 255, 255)); + JPanel panel2 = new JPanel(); + panel2.setBackground(new java.awt.Color(255, 255, 255)); + panel2.setLayout(new GridLayout(5,1,0,10)); + jLabel[0] = new JLabel("1. Introduction"); + jLabel[1] = new JLabel("2. Knowledge Source"); + jLabel[2] = new JLabel("3. Concept"); + jLabel[3] = new JLabel("4. Examples"); + jLabel[4] = new JLabel("5. Learning"); + + jLabel[i].setFont(jLabel[i].getFont().deriveFont(Font.BOLD)); + + for(JLabel current : jLabel) + panel2.add(current); + setLayout(new BorderLayout()); + add(panel2, BorderLayout.NORTH); + } + +} Added: trunk/src/dl-learner/org/dllearner/tools/ore/Main.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/Main.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/Main.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,54 @@ +package org.dllearner.tools.ore; + +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + + + +public class Main { + + public static void main(String[] args) { + try { + UIManager.setLookAndFeel( + UIManager.getSystemLookAndFeelClassName()); + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (UnsupportedLookAndFeelException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + Wizard wizard = new Wizard(); + wizard.getDialog().setTitle("DL-Learner ORE-Tool"); + wizard.getDialog().setSize(700, 400); + + WizardPanelDescriptor descriptor1 = new IntroductionPanelDescriptor(); + wizard.registerWizardPanel(IntroductionPanelDescriptor.IDENTIFIER, descriptor1); + + WizardPanelDescriptor descriptor2 = new KnowledgeSourcePanelDescriptor(); + wizard.registerWizardPanel(KnowledgeSourcePanelDescriptor.IDENTIFIER, descriptor2); + + WizardPanelDescriptor descriptor3 = new ConceptPanelDescriptor(); + wizard.registerWizardPanel(ConceptPanelDescriptor.IDENTIFIER, descriptor3); + + WizardPanelDescriptor descriptor4 = new LearningPanelDescriptor(); + wizard.registerWizardPanel(LearningPanelDescriptor.IDENTIFIER, descriptor4); + + wizard.setCurrentPanel(IntroductionPanelDescriptor.IDENTIFIER); + + int ret = wizard.showModalDialog(); + + System.out.println("Dialog return code is (0=Finish,1=Cancel,2=Error): " + ret); + + + System.exit(0); + + } + +} Deleted: trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-26 15:49:00 UTC (rev 727) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java 2008-03-26 20:11:12 UTC (rev 728) @@ -1,610 +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.ore; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.apache.log4j.ConsoleAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.dllearner.algorithms.BruteForceLearner; -import org.dllearner.algorithms.RandomGuesser; -import org.dllearner.algorithms.gp.GP; -import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.cli.ConfFileOption; -import org.dllearner.core.Component; -import org.dllearner.core.ComponentInitException; -import org.dllearner.core.ComponentManager; -import org.dllearner.core.KnowledgeSource; -import org.dllearner.core.LearningAlgorithm; -import org.dllearner.core.ReasonerComponent; -import org.dllearner.core.ReasoningService; -import org.dllearner.core.config.BooleanConfigOption; -import org.dllearner.core.config.ConfigEntry; -import org.dllearner.core.config.ConfigOption; -import org.dllearner.core.config.DoubleConfigOption; -import org.dllearner.core.config.IntegerConfigOption; -import org.dllearner.core.config.InvalidConfigOptionValueException; -import org.dllearner.core.config.StringConfigOption; -import org.dllearner.core.config.StringSetConfigOption; -import org.dllearner.core.config.StringTupleListConfigOption; -import org.dllearner.core.owl.Description; -import org.dllearner.core.owl.Individual; -import org.dllearner.core.owl.NamedClass; -import org.dllearner.kb.KBFile; -import org.dllearner.kb.OWLFile; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.learningproblems.PosNegDefinitionLP; -import org.dllearner.parser.ConfParser; -import org.dllearner.parser.KBParser; -import org.dllearner.parser.ParseException; -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.ConceptComparator; -import org.dllearner.utilities.Datastructures; -import org.dllearner.utilities.Helper; -import org.dllearner.utilities.StringTuple; - -/** - * Start class for the ontology repair and enrichment tool. - * - * @author Lorenz Buehmann. - * - */ -public class ORE { - - private static Logger logger = Logger.getRootLogger(); - - private static LearningAlgorithm la; - private ReasoningService rs; - - /** - * Entry point for CLI interface. - * - * @param args - */ - public static void main(String[] args) throws ComponentInitException { - - File file = new File(args[args.length - 1]); - - // create logger (a simple logger which outputs - // its messages to the console) - SimpleLayout layout = new SimpleLayout(); - ConsoleAppender consoleAppender = new ConsoleAppender(layout); - logger.removeAllAppenders(); - logger.addAppender(consoleAppender); - logger.setLevel(Level.DEBUG); - - ORE ore = null; - ore = new ORE(file); - ore.start(); - } - - /** - * Initialise all components based on conf file. - * - * @param file - * Conf file to read. - * @throws ComponentInitException - */ - public ORE(File file) throws ComponentInitException { - String baseDir = file.getParentFile().getPath(); - - // create component manager instance - String message = "starting component manager ... "; - long cmStartTime = System.nanoTime(); - ComponentManager cm = ComponentManager.getInstance(); - long cmTime = System.nanoTime() - cmStartTime; - message += "OK (" + Helper.prettyPrintNanoSeconds(cmTime) + ")"; - logger.info(message); - - // create a mapping between components and prefixes in the conf file - Map<Class<? extends Component>, String> componentPrefixMapping = createComponentPrefixMapping(); - - // parse conf file - ConfParser parser = ConfParser.parseFile(file); - - // step 1: detect knowledge sources - Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); - Map<URL, Class<? extends KnowledgeSource>> importedFiles = getImportedFiles( - parser, baseDir); - for (Map.Entry<URL, Class<? extends KnowledgeSource>> entry : importedFiles - .entrySet()) { - KnowledgeSource ks = cm.knowledgeSource(entry.getValue()); - // apply URL entry (this assumes that every knowledge source has a - // configuration option "url"), so this may need to be changed in - // the - // future - cm.applyConfigEntry(ks, "url", entry.getKey().toString()); - - sources.add(ks); - configureComponent(cm, ks, componentPrefixMapping, parser); - initComponent(cm, ks); - } - - // step 2: detect used reasoner - ConfFileOption reasonerOption = parser.getConfOptionsByName("reasoner"); - ReasonerComponent reasoner = cm.reasoner( - getReasonerClass(reasonerOption), sources); - configureComponent(cm, reasoner, componentPrefixMapping, parser); - initComponent(cm, reasoner); - rs = cm.reasoningService(reasoner); - - } - - public void start() { - processOREMode(rs); - - } - - /** - * creates a mapping from components to option prefix strings - */ - 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(OWLAPIReasoner.class, "owlAPIReasoner"); - // learning problems - configured via + and - flags for examples - componentPrefixMapping.put(PosNegDefinitionLP.class, - "posNegDefinitionLP"); - // learning algorithms - componentPrefixMapping.put(ROLearner.class, "refinement"); - componentPrefixMapping.put(ExampleBasedROLComponent.class, - "refexamples"); - componentPrefixMapping.put(GP.class, "gp"); - return componentPrefixMapping; - } - - /** - * convenience method basically every prefix (e.g. "refinement" in - * "refinement.horizontalExpFactor) corresponds to a specific component - - * this way the CLI will automatically support any configuration options - * supported by the component - */ - public static void configureComponent(ComponentManager cm, - Component component, - Map<Class<? extends Component>, String> componentPrefixMapping, - ConfParser parser) { - String prefix = componentPrefixMapping.get(component.getClass()); - if (prefix != null) - configureComponent(cm, component, parser - .getConfOptionsByPrefix(prefix)); - } - - // convenience method - see above method - private static void configureComponent(ComponentManager cm, - Component component, List<ConfFileOption> options) { - if (options != null) - for (ConfFileOption option : options) - applyConfFileOption(cm, component, option); - } - - // applies an option to a component - checks whether the option and its - // value is valid - private static void applyConfFileOption(ComponentManager cm, - Component component, ConfFileOption option) { - // the name of the option is suboption-part (the first part refers - // to its component) - String optionName = option.getSubOption(); - - ConfigOption<?> configOption = cm.getConfigOption(component.getClass(), - optionName); - // check whether such an option exists - if (configOption != null) { - - // catch all invalid config options - try { - - // perform compatibility checks - if (configOption instanceof StringConfigOption - && option.isStringOption()) { - - ConfigEntry<String> entry = new ConfigEntry<String>( - (StringConfigOption) configOption, option - .getStringValue()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof IntegerConfigOption - && option.isIntegerOption()) { - - ConfigEntry<Integer> entry = new ConfigEntry<Integer>( - (IntegerConfigOption) configOption, option - .getIntValue()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof DoubleConfigOption - && (option.isIntegerOption() || option.isDoubleOption())) { - - double value; - if (option.isIntegerOption()) - value = option.getIntValue(); - else - value = option.getDoubleValue(); - - ConfigEntry<Double> entry = new ConfigEntry<Double>( - (DoubleConfigOption) configOption, value); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof BooleanConfigOption - && option.isStringOption()) { - - ConfigEntry<Boolean> entry = new ConfigEntry<Boolean>( - (BooleanConfigOption) configOption, Datastructures - .strToBool(option.getStringValue())); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof StringSetConfigOption - && option.isSetOption()) { - - ConfigEntry<Set<String>> entry = new ConfigEntry<Set<String>>( - (StringSetConfigOption) configOption, option - .getSetValues()); - cm.applyConfigEntry(component, entry); - - } else if (configOption instanceof StringTupleListConfigOption - && option.isListOption()) { - - ConfigEntry<List<StringTuple>> entry = new ConfigEntry<List<StringTuple>>( - (StringTupleListConfigOption) configOption, option - .getListTuples()); - cm.applyConfigEntry(component, entry); - - } else { - handleError("The type of conf file entry \"" - + option.getFullName() - + "\" is not correct: value \"" + option.getValue() - + "\" not valid for option type \"" - + configOption.getClass().getName() + "\"."); - } - - } catch (InvalidConfigOptionValueException e) { - e.printStackTrace(); - System.exit(0); - } - - } else - handleError("Unknow option " + option + "."); - } - - /** - * detects all imported files and their format - */ - public static Map<URL, Class<? extends KnowledgeSource>> getImportedFiles( - ConfParser parser, String baseDir) { - List<List<String>> imports = parser.getFunctionCalls().get("import"); - Map<URL, Class<? extends KnowledgeSource>> importedFiles = new HashMap<URL, Class<? extends KnowledgeSource>>(); - - if (imports != null) { - for (List<String> arguments : imports) { - // step 1: detect URL - URL url = null; - try { - String fileString = arguments.get(0); - if (fileString.startsWith("http:")) { - url = new URL(fileString); - } else { - File f = new File(baseDir, arguments.get(0)); - url = f.toURI().toURL(); - } - } catch (MalformedURLException e) { - e.printStackTrace(); - } - - // step 2: detect format - Class<? extends KnowledgeSource> ksClass; - if (arguments.size() == 1) { - String filename = url.getPath(); - String ending = filename.substring(filename - .lastIndexOf(".") + 1); - - if (ending.equals("rdf") || ending.equals("owl")) - ksClass = OWLFile.class; - else if (ending.equals("nt")) - ksClass = OWLFile.class; - else if (ending.equals("kb")) - ksClass = KBFile.class; - else { - System.err.println("Warning: no format given for " - + arguments.get(0) - + " and could not detect it. Chosing RDF/XML."); - ksClass = OWLFile.class; - } - - importedFiles.put(url, ksClass); - } else { - String formatString = arguments.get(1); - - if (formatString.equals("RDF/XML")) - ksClass = OWLFile.class; - else if (formatString.equals("KB")) - ksClass = KBFile.class; - else if (formatString.equals("SPARQL")) - ksClass = SparqlKnowledgeSource.class; - else if (formatString.equals("NT")) - ksClass = OWLFile.class; - else { - throw new RuntimeException( - "Unsupported knowledge source format " - + formatString + ". Exiting."); - } - - importedFiles.put(url, ksClass); - } - } - } - - return importedFiles; - } - - private static void initComponent(ComponentManager cm, Component component) - throws ComponentInitException { - String startMessage = "initialising component \"" - + cm.getComponentName(component.getClass()) + "\" ... "; - long initStartTime = System.nanoTime(); - component.init(); - // standard messsage is just "OK" but can be more detailed for certain - // components - String message = "OK"; - if (component instanceof KBFile) - message = ((KBFile) component).getURL().toString() + " read"; - else if (component instanceof DIGReasoner) { - DIGReasoner reasoner = (DIGReasoner) component; - message = "using " + reasoner.getIdentifier() - + " connected via DIG 1.1 at " - + reasoner.getReasonerURL().toString(); - } - - long initTime = System.nanoTime() - initStartTime; - logger.info(startMessage + message + " (" - + Helper.prettyPrintNanoSeconds(initTime, false, false) + ")"); - } - - private static void processOREMode(ReasoningService rs) { - System.err.println("Concepts :" + rs.getAtomicConcepts()); - - System.out.println("Individuals " + rs.getIndividuals()); - System.out - .println("Entering ORE mode. Enter a existing concept for learning(new) or q to quit"); - - String conceptStr = ""; - do { - //Step 1: choose existing concept which should be (new) learned - System.out.print("enter concept: "); - // read input string - BufferedReader input = new BufferedReader(new InputStreamReader( - System.in)); - - try { - conceptStr = input.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - - if (!conceptStr.equals("q")) { - - // parse concept - Description concept = null; - boolean parsedCorrectly = true; - - try { - concept = KBParser.parseConcept(conceptStr); - - } catch (ParseException e1) { - e1.printStackTrace(); - System.err - .println("The concept you entered could not be parsed. Please try again."); - parsedCorrectly = false; - } catch (TokenMgrError e) { - e.printStackTrace(); - System.err - .println("An error occured during parsing. Please enter a syntactically valid concept."); - parsedCorrectly = false; - } - - if (parsedCorrectly) { - - // compute atomic concepts used in concept - SortedSet<NamedClass> occurringConcepts = new TreeSet<NamedClass>( - new ConceptComparator()); - occurringConcepts.addAll(Helper.getAtomicConcepts(concept)); - - // substract existing concepts from detected - // concepts -> the resulting set should be - // empty, otherwise print a warning (the DIG reasoner - // will just treat them as concepts about which it - // has no knowledge - this makes it hard to - // detect typos - // (note that removeAll currently gives a different - // result here, because the comparator of the argument - // is used) - for (NamedClass ac : rs.getAtomicConcepts()) - occurringConcepts.remove(ac); - - boolean nonExistingConstructs = false; - if (occurringConcepts.size() != 0) { - System.out - .println("You used non-existing atomic concepts or roles. Please correct your query."); - if (occurringConcepts.size() > 0) - - System.out.println("non-existing concepts: " - + occurringConcepts); - - nonExistingConstructs = true; - } - - if (!nonExistingConstructs) { - - // Step 2_1: choose all individuals of the concept as positive examples - SortedSet<Individual> posExamples = null; - posExamples = rs.retrieval(concept); - posExamples.removeAll(posExamples); - posExamples.add(new Individual( - "http://example.com/father#stefan")); - posExamples.add(new Individual( - "http://example.com/father#markus")); - posExamples.add(new Individual( - "http://example.com/father#martin")); - - //Step 2_2: subtract positive examples from all individuals of the ontology - //->negative examples of the concepts - SortedSet<Individual> negExamples = null; - negExamples = rs.getIndividuals(); - for (Individual rem_pos : posExamples) - negExamples.remove(rem_pos); - System.out.println("+" + posExamples); - System.out.println("-" + negExamples); - - //Step 3: Start learning-algorithm - - // step 3_1: set learning problem - ComponentManager cm = ComponentManager.getInstance(); - - PosNegDefinitionLP lp = new PosNegDefinitionLP(rs, - posExamples, negExamples); - - try { - initComponent(cm, lp); - } catch (ComponentInitException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } - - // step 3_2: set learning algorithm - - la = new ROLearner(lp, rs); - - try { - initComponent(cm, la); - } catch (ComponentInitException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - Thread laThread = new Thread() - { - @Override - public void run(){ - la.start(); - } - }; - laThread.start(); - - - System.out.println(la.getBestSolutions(5)); - - //Step 4: Knowledge Engineer chooses one of the suggestions - - //Step 5: Enrichment - - //Step 6: Repair:-check which individuals cause inconsistency - // -problem solving - - } - } - } - - } while (!conceptStr.equals("q")); - - } - - /** - * error handling over the logger - * - * @param message - * is a string and you message for problem - */ - public static void handleError(String message) { - logger.error(message); - System.exit(0); - } - - public ReasoningService getReasoningService() { - return rs; - } - - // edit by Tilo Hielscher - - /** - * Set Reasoner class. Define here all possible reasoners. - * - * @param reasonerOption - * from config file - * @return reasonerClass reasoner class - */ - public static Class<? extends ReasonerComponent> getReasonerClass( - ConfFileOption reasonerOption) { - Class<? extends ReasonerComponent> reasonerClass = null; - if (reasonerOption == null - || reasonerOption.getStringValue().equals("dig")) - reasonerClass = DIGReasoner.class; - else if (reasonerOption.getStringValue().equals("owlAPI")) - reasonerClass = OWLAPIReasoner.class; - else if (reasonerOption.getStringValue().equals("fastRetrieval")) - reasonerClass = FastRetrievalReasoner.class; - else if (reasonerOption.getStringValue().equals("fastInstanceChecker")) - reasonerClass = FastInstanceChecker.class; - else { - handleError("Unknown value " + reasonerOption.getStringValue() - + " for option \"reasoner\"."); - } - return reasonerClass; - } - - public static Class<? extends LearningAlgorithm> getLearningAlgorithm( - ConfFileOption algorithmOption) { - Class<? extends LearningAlgorithm> laClass = null; - if (algorithmOption == null - || algorithmOption.getStringValue().equals("refinement")) - laClass = ROLearner.class; - else if (algorithmOption.getStringValue().equals("refexamples")) - laClass = ExampleBasedROLComponent.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; - } - -} Copied: trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java (from rev 721, trunk/src/dl-learner/org/dllearner/tools/ore/ORE.java) =================================================================== --- trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/tools/ore/ORE_alt.java 2008-03-26 20:11:12 UTC (rev 728) @@ -0,0 +1,619 @@ +/** + * 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.ore; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.apache.log4j.ConsoleAppender; +import org.apache.log4j.Level; +import org.apache.log4j.Logger; +import org.apache.log4j.SimpleLayout; +import org.dllearner.algorithms.BruteForceLearner; +import org.dllearner.algorithms.RandomGuesser; +import org.dllearner.algorithms.gp.GP; +import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.cli.ConfFileOption; +import org.dllearner.core.Component; +import org.dllearner.core.ComponentInitException; +import org.dllearner.core.ComponentManager; +import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; +import org.dllearner.core.ReasonerComponent; +import org.dllearner.core.ReasoningService; +import org.dllearner.core.config.BooleanConfigOption; +import org.dllearner.core.config.ConfigEntry; +import org.dllearner.core.config.ConfigOption; +import org.dllearner.core.config.DoubleConfigOption; +import org.dllearner.core.config.IntegerConfigOption; +import org.dllearner.core.config.InvalidConfigOptionValueException; +import org.dllearner.core.config.StringConfigOption; +import org.dllearner.core.config.StringSetConfigOption; +import org.dllearner.core.config.StringTupleListConfigOption; +import org.dllearner.core.owl.Description; +import org.dllearner.core.owl.Individual; +import org.dllearner.core.owl.NamedClass; +import org.dllearner.kb.KBFile; +import org.dllearner.kb.OWLFile; +import org.dllearner.kb.sparql.SparqlKnowledgeSource; +import org.dllearner.learningproblems.PosNegDefinitionLP; +import org.dllearner.parser.ConfParser; +import org.dllearner.parser.KBParser; +import org.dllearner.parser.ParseException; +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.ConceptComparator; +import org.dllearner.utilities.Datastructures; +import org.dllearner.utilities.Helper; +import org.dllearner.utilities.StringTuple; + +/** + * Start class for the ontology repair and enrichment tool. + * + * @author Lorenz Buehmann. + * + */ +public class ORE_alt { + + private static Logger logger = Logger.getRootLogger(); + + private static LearningAlgorithm la; + private ReasoningService rs; + private KnowledgeSource ks; + + /** + * Entry point for CLI interface. + * + * @param args + */ + public static void main(String[] args) throws ComponentInitException { + + File file = new File(args[args.length - 1]); + + // create logger (a simple logger which outputs + // its messages to the console) + SimpleLayout layout = new SimpleLayout(); + ConsoleAppender consoleAppender = new ConsoleAppender(layout); + logger.removeAllAppenders(); + logger.addAppender(consoleAppender); + logger.setLevel(Level.DEBUG); + + ORE_alt ore = null; + ore = new ORE_alt(file); + ore.start(); + } + + public ORE_alt(){ + + } + + public void setKnowledgeSource(File file){ + + } + + /** + * Initialise all components based on conf file. + * + * @param file + * Conf file to read. + * @throws ComponentInitException + */ + public ORE_alt(File file) throws ComponentInitException { + String baseDir = file.getParentFile().getPath(); + + // create component manager instance + String message = "starting component manager ... "; + long cmStartTime = System.nanoTime(); + ComponentManager cm = ComponentManager.getInstance(); + long cmTime = System.nanoTime() - cmStartTime; + message += "OK (" + Helper.prettyPrintNanoSeconds(cmTime) + ")"; + logger.info(message); + + // create a mapping between components and prefixes in the conf file + Map<Class<? extends Component>, String> componentPrefixMapping = createComponentPrefixMapping(); + + // parse conf file + ConfParser parser = ConfParser.parseFile(file); + + // step 1: detect knowledge sources + Set<KnowledgeSource> sources = new HashSet<KnowledgeSource>(); + Map<URL, Class<? extends KnowledgeSource>> importedFiles = getImportedFiles( + parser, baseDir); + for (Map.Entry<URL, Class<? extends KnowledgeSource>> entry : importedFiles + .entrySet()) { + KnowledgeSource ks = cm.knowledgeSource(entry.getValue()); + // apply URL entry (this assumes that every knowledge source has a + // configuration option "url"), so this may need to be changed in + // the + // future + cm.applyConfigEntry(ks, "url", entry.getKey().toString()); + + sources.add(ks); + configureComponent(cm, ks, componentPrefixMapping, parser); + initComponent(cm, ks); + } + + // step 2: detect used reasoner + ConfFileOption reasonerOption = parser.getConfOptionsByName("reasoner"); + ReasonerComponent reasoner = cm.reasoner( + getReasonerClass(reasonerOption), sources); + configureComponent(cm, reasoner, componentPrefixMapping, parser); + initComponent(cm, reasoner); + rs = cm.reasoningService(reasoner); + + } + + public void start() { + processOREMode(rs); + + } + + /** + * creates a mapping from components to option prefix strings + */ + 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(OWLAPIReasoner.class, "owlAPIReasoner"); + // learning problems - configured via + and - flags for examples + componentPrefixMapping.put(PosNegDefinitionLP.class, + "posNegDefinitionLP"); + // learning algorithms + componentPrefixMapping.put(ROLearner.class, "refinement"); + componentPrefixMapping.put(ExampleBasedROLComponent.class, + "refexamples"); + componentPrefixMapping.put(GP.class, "gp"); + return componentPrefixMapping; + } + + /** + * convenience method basically every prefix (e.g. "refinement" in + * "refinement.horizontalExpFactor) corresponds to a specific component - + * this way the CLI will automatically support any configuration options + * supported by the component + */ + public static void configureComponent(ComponentManager cm, + Component component, + Map<Class<? extends Component>, String> componentPrefixMapping, + ConfParser parser) { + String prefix = componentPrefixMapping.get(component.getClass()); + if (prefix != null) + configureComponent(cm, component, parser + .getConfOptionsByPrefix(prefix)); + } + + // convenience method - see above method + private static void configureComponent(ComponentManager cm, + Component component, List<ConfFileOption> options) { + if (options != null) + for (ConfFileOption option : options) + applyConfFileOption(cm, component, option); + } + + // applies an option to a component - checks whether the option and its + // value is valid + private static void applyConfFileOption(ComponentManager cm, + Component component, ConfFileOption option) { + // the name of the option is suboption-part (the first part refers + // to its component) + String optionName = option.getSubOption(); + + ConfigOption<?> configOption = cm.getConfigOption(component.getClass(), + optionName); + // check whether such an option exists + if (configOption != null) { + + // catch all invalid config options + try { + + // perform compatibility checks + if (configOption instanceof StringConfigOption + && option.isStringOption()) { + + ConfigEntry<String> entry = new ConfigEntry<String>( + (StringConfigOption) configOption, option + .getStringValue()); + cm.applyConfigEntry(component, entry); + + } else if (configOption instanceof IntegerConfigOption + && option.isIntegerOption()) { + + ConfigEntry<Integer> entry = new ConfigEntry<Integer>( + (IntegerConfigOption) configOption, option + .getIntValue()); + cm.applyConfigEntry(component, entry); + + } else if (configOption instanceof DoubleConfigOption + && (option.isIntegerOption() || option.isDoubleOption())) { + + double value; + if (option.isIntegerOption()) + value = option.getIntValue(); + else + value = option.getDoubleValue(); + + ConfigEntry<Double> entry = new ConfigEntry<Double>( + (DoubleConfigOption) configOption, value); + cm.applyConfigEntry(component, entry); + + } else if (configOption instanceof BooleanConfigOption + && option.isStringOption()) { + + ConfigEntry<Boolean> entry = new ConfigEntry<Boolean>( + (BooleanConfigOption) configOption, Datastructures + .strToBool(option.getStringValue())); + cm.applyConfigEntry(component, entry); + + } else if (configOption instanceof StringSetConfigOption + && option.isSetOption()) { + + ConfigEntry<Set<String>> entry = new ConfigEntry<Set<String>>( + (StringSetConfigOption) configOption, option + .getSetValues()); + cm.applyConfigEntry(component, entry); + + } else if (configOption instanceof StringTupleListConfigOption + && option.isListOption()) { + + ConfigEntry<List<StringTuple>> entry = new ConfigEntry<List<StringTuple>>( + (StringTupleListConfigOption) configOption, option + .getListTuples()); + cm.applyConfigEntry(component, entry); + + } else { + handleError("The type of conf file entry \"" + + option.getFullName() + + "\" is not correct: value \"" + option.getValue() + + "\" not valid for option type \"" + + configOption.getClass().getName() + "\"."); + } + + } catch (InvalidConfigOptionValueException e) { + e.printStackTrace(); + System.exit(0); + } + + } else + handleError("Unknow option " + option + "."); + } + + /** + * detects all imported files and their format + */ + public static Map<URL, Class<? extends KnowledgeSource>> getImportedFiles( + ConfParser parser, String baseDir) { + List<List<String>> imports = parser.getFunctionCalls().get("import"); + Map<URL, Class<? extends KnowledgeSource>> importedFiles = new HashMap<URL, Class<? extends KnowledgeSource>>(); + + if (imports != null) { + for (List<String> arguments : imports) { + // step 1: detect URL + URL url = null; + try { + String fileString = arguments.get(0); + if (fileString.startsWith("http:")) { + url = new URL(fileString); + } else { + File f = new File(baseDir, arguments.get(0)); + url = f.toURI().toURL(); + } + } catch (MalformedURLException e) { + e.printStackTrace(); + } + + // step 2: detect format + Class<? extends KnowledgeSource> ksClass; + if (arguments.size() == 1) { + String filename = url.getPath(); + String ending = filename.substring(filename + .lastIndexOf(".") + 1); + + if (ending.equals("rdf") || ending.equals("owl")) + ksClass = OWLFile.class; + else if (ending.equals("nt")) + ksClass = OWLFile.class; + else if (ending.equals("kb")) + ksClass = KBFile.class; + else { + System.err.println("Warning: no format given for " + + arguments.get(0) + + " and could not detect it. Chosing RDF/XML."); + ksClass = OWLFile.class; + } + + importedFiles.put(url, ksClass); + } else { + String formatString = arguments.get(1); + + if (formatString.equals("RDF/XML")) + ksClass = OWLFile.class; + else if (formatString.equals("KB")) + ksClass = KBFile.class; + else if (formatString.equals("SPARQL")) + ksClass = SparqlKnowledgeSource.class; + else if (formatString.equals("NT")) + ksClass = OWLFile.class; + else { + throw new RuntimeException( + "Unsupported knowledge source format " + + formatString + ". Exiting."); + } + + importedFiles.put(url, ksClass); + } + } + } + + return importedFiles; + } + + private static void initComponent(ComponentManager cm, Component component) + throws ComponentInitException { + String startMessage = "initialising component \"" + + cm.getComponentName(component.getClass()) + "\" ... "; + long initStartTime = System.nanoTime(); + component.init(); + // standard messsage is just "OK" but ca... [truncated message content] |