From: <ku...@us...> - 2008-08-30 16:43:14
|
Revision: 1155 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1155&view=rev Author: kurzum Date: 2008-08-30 16:43:11 +0000 (Sat, 30 Aug 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java trunk/src/dl-learner/org/dllearner/core/ComponentPool.java trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java Modified: trunk/src/dl-learner/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-08-30 16:09:06 UTC (rev 1154) +++ trunk/src/dl-learner/org/dllearner/core/ComponentManager.java 2008-08-30 16:43:11 UTC (rev 1155) @@ -686,5 +686,9 @@ public List<Class<? extends LearningAlgorithm>> getLearningAlgorithms() { return new LinkedList<Class<? extends LearningAlgorithm>>(learningAlgorithms); } + + public List<Component> getLiveComponents(){ + return pool.getComponents(); + } } Modified: trunk/src/dl-learner/org/dllearner/core/ComponentPool.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/ComponentPool.java 2008-08-30 16:09:06 UTC (rev 1154) +++ trunk/src/dl-learner/org/dllearner/core/ComponentPool.java 2008-08-30 16:43:11 UTC (rev 1155) @@ -113,5 +113,12 @@ lastValidConfigValue = new HashMap<Component, Map<ConfigOption<?>, Object>>(); configEntryHistory = new HashMap<Component, List<ConfigEntry<?>>>(); } + + /** + * @return + */ + public List<Component> getComponents(){ + return components; + } } Modified: trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java 2008-08-30 16:09:06 UTC (rev 1154) +++ trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java 2008-08-30 16:43:11 UTC (rev 1155) @@ -30,7 +30,10 @@ import org.apache.log4j.SimpleLayout; import org.dllearner.algorithms.refexamples.ExampleBasedROLComponent; import org.dllearner.cli.Start; +import org.dllearner.core.Component; +import org.dllearner.core.ComponentManager; import org.dllearner.core.KnowledgeSource; +import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.ReasoningService; import org.dllearner.kb.extraction.ExtractionAlgorithm; import org.dllearner.kb.extraction.Manager; @@ -60,9 +63,9 @@ public static String tmpFilename = dir + "tmp.conf"; - private static Class usedReasoner = FastInstanceChecker.class; + //private static Class usedReasoner = FastInstanceChecker.class; - private static boolean useSPARQL = false; + private static boolean useSPARQL = true; /** * @param args @@ -73,9 +76,10 @@ logger.info("Start"); File tmpFile = new File(tmpFilename); - List<File> confs = getFilesContaining(useSPARQL,"thirty","exists", "75+"); + List<File> confs = getFilesContaining(useSPARQL,"ten","all", "99+"); + System.out.println(confs); + //reasoningService = ReasoningServiceFactory.getReasoningService(ontologyPath, AvailableReasoners.OWLAPIREASONERPELLET); - //reasoningService = ReasoningServiceFactory.getReasoningService(ontologyPath, AvailableReasoners.OWLAPIREASONERPELLET); try{ for (File file : confs) { System.out.println(file.getAbsolutePath()); @@ -85,9 +89,22 @@ //System.out.println(tmpFile.getCanonicalPath()); Start.main(new String[] { tmpFilename }); + ComponentManager cm =ComponentManager.getInstance(); + List<Component> comp = cm.getLiveComponents(); + for (Component component : comp) { + System.out.println(component.getClass().getCanonicalName()); + if(component instanceof LearningAlgorithm){ + System.out.println("yyyy"); + System.exit(0); + } + + } + + Cache.getDefaultCache().clearCache(); + cm.freeAllComponents(); System.exit(0); - } + }//end for }catch (Exception e) { e.printStackTrace(); } @@ -98,9 +115,12 @@ List<File> ret = new ArrayList<File>(); try{ String actualDir = (sparql)?sparqldir:normaldir; + System.out.println(actualDir); File f = new File(actualDir); String[] files = f.list(); + for (int i = 0; i < files.length; i++) { + System.out.println(files[i]); if( files[i].contains(numExamples) && files[i].contains(allOrEx) @@ -130,9 +150,10 @@ "refexamples.useNegation = true;\n"+ "refexamples.useCardinalityRestrictions = true;\n"+ "refexamples.guaranteeXgoodDescriptions = 1;\n"+ + "refexamples.maxExecutionTimeInSeconds = 1;\n"+ "\n"+ - //"reasoner = owlAPI;\n"+ - "reasoner = fastInstanceChecker;\n"+ + "reasoner = owlAPI;\n"+ + //"reasoner = fastInstanceChecker;\n"+ //"owlAPIReasoner.reasonerType = pellet;\n\n"; ""; return s; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |