From: <ku...@us...> - 2008-08-29 19:24:19
|
Revision: 1141 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1141&view=rev Author: kurzum Date: 2008-08-29 19:24:16 +0000 (Fri, 29 Aug 2008) Log Message: ----------- servercommit Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java Modified: trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java 2008-08-29 19:14:22 UTC (rev 1140) +++ trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java 2008-08-29 19:24:16 UTC (rev 1141) @@ -19,6 +19,7 @@ */ package org.dllearner.scripts; +import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.SortedSet; @@ -42,6 +43,7 @@ import org.dllearner.kb.sparql.SparqlKnowledgeSource; import org.dllearner.kb.sparql.SparqlQuery; import org.dllearner.reasoning.FastInstanceChecker; +import org.dllearner.utilities.Files; import org.dllearner.utilities.datastructures.SetManipulation; import org.dllearner.utilities.examples.AutomaticNegativeExampleFinderOWL; import org.dllearner.utilities.examples.AutomaticNegativeExampleFinderSPARQL; @@ -65,6 +67,8 @@ // different negative Ex (randomizes) each run, if set to false private static final boolean DEVELOP = true; + private static final boolean WAITFORINPUT = false; + static File file = new File("sembib.txt"); public static String ontologyPath = "examples/semantic_bible/NTNcombined.owl"; @@ -78,9 +82,9 @@ initLogger(); logger.info("Start"); + Files.appendFile(file, ""); + - - //String fileURL = new File(ontologyFile).toURI().toString(); reasoningService = ReasoningServiceFactory.getReasoningService( @@ -121,6 +125,7 @@ if(negativeEx.size()<=3) { System.out.println(target); waitForInput(); + Files.appendFile(file, "SKIPPED "+target + "negEX "+negativeEx); continue; } // reasoningService.prepareSubsumptionHierarchy(); @@ -155,10 +160,11 @@ } la.start(); - conceptresults = la.getCurrentlyBestEvaluatedDescriptions(20); - for (EvaluatedDescription description : conceptresults) { - System.out.println(description); - } + EvaluatedDescription d = la.getCurrentlyBestEvaluatedDescription(); + //for (EvaluatedDescription description : conceptresults) { + // System.out.println(description); + //} + Files.appendFile(file, target +"\t::\t"+ d+"\n" ); } private static LearnSPARQLConfiguration getConfForSparql(NamedClass c) { @@ -374,7 +380,9 @@ public static void waitForInput(){ System.out.println("PRESS ENTER TO CONTINUE"); byte[] b = new byte[100]; - try{System.in.read(b); + try{ + if(WAITFORINPUT) + System.in.read(b); }catch (Exception e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |