From: <ku...@us...> - 2008-08-29 20:24:38
|
Revision: 1146 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1146&view=rev Author: kurzum Date: 2008-08-29 20:24:35 +0000 (Fri, 29 Aug 2008) Log Message: ----------- server commit Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java trunk/src/dl-learner/org/dllearner/utilities/Files.java Modified: trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java 2008-08-29 20:14:57 UTC (rev 1145) +++ trunk/src/dl-learner/org/dllearner/scripts/SemanticBible.java 2008-08-29 20:24:35 UTC (rev 1146) @@ -82,7 +82,7 @@ SimpleClock sc = new SimpleClock(); initLogger(); logger.info("Start"); - + Files.clearFile(file); Files.appendFile(file, "neg Ex random: "+RANDOMNEGATIVES+"\n"); Files.appendFile(file, "negfactor : "+NEGFACTOR+"\n"); @@ -117,7 +117,7 @@ for (NamedClass target : classesToRelearn) { - System.out.println("now learning: "+target); + Files.appendFile(file,"now learning: "+target+"\n"); waitForInput(); positiveEx.clear(); @@ -141,7 +141,7 @@ if(negativeEx.size()<=3) { System.out.println(target); waitForInput(); - Files.appendFile(file, "SKIPPED "+target + "\n\t\t negEX "+negativeEx+"\n"); + Files.appendFile(file, "\tSKIPPED negEX "+negativeEx+"\n"); continue; } // reasoningService.prepareSubsumptionHierarchy(); @@ -154,7 +154,8 @@ e.printStackTrace(); } waitForInput(); - + Files.appendFile(file, "*************\n"); + } sc.printAndSet("Finished"); @@ -181,12 +182,13 @@ // TODO: handle exception } - - EvaluatedDescription d = la.getCurrentlyBestEvaluatedDescription(); - //for (EvaluatedDescription description : conceptresults) { - // System.out.println(description); - //} - Files.appendFile(file, target +"\n\t\t"+ d+"\n" ); + + conceptresults = la.getCurrentlyBestEvaluatedDescriptions(5); + for (EvaluatedDescription description : conceptresults) { + Files.appendFile(file,"\t"+ description+"\n" ); + } + + } private static LearnSPARQLConfiguration getConfForSparql(NamedClass c) { Modified: trunk/src/dl-learner/org/dllearner/utilities/Files.java =================================================================== --- trunk/src/dl-learner/org/dllearner/utilities/Files.java 2008-08-29 20:14:57 UTC (rev 1145) +++ trunk/src/dl-learner/org/dllearner/utilities/Files.java 2008-08-29 20:24:35 UTC (rev 1146) @@ -97,7 +97,11 @@ } public static void clearFile(File file) { + try{ createFile(file, ""); + }catch (Exception e) { + e.printStackTrace(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |