From: <ku...@us...> - 2008-09-01 00:30:18
|
Revision: 1166 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1166&view=rev Author: kurzum Date: 2008-09-01 00:30:08 +0000 (Mon, 01 Sep 2008) Log Message: ----------- servercommit Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java Modified: trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java 2008-09-01 00:00:09 UTC (rev 1165) +++ trunk/src/dl-learner/org/dllearner/scripts/SemanticBible2.java 2008-09-01 00:30:08 UTC (rev 1166) @@ -90,8 +90,18 @@ private static int normalMaxExecution = 500; private static int sparqllMaxExecution = 250; + private static boolean fragHasNot = false; + private static boolean fragHasAll = false; + private static boolean fragHasBooleanData = false; + private static boolean fragHasNrRes = false; + private static boolean wholeHasNot = false; + private static boolean wholeHasAll = false; + private static boolean wholeHasBooleanData = false; + private static boolean wholeHasNrRes = false; + + //private static Class usedReasoner = FastInstanceChecker.class; private static boolean useSPARQL = true; @@ -101,6 +111,7 @@ */ public static void main(String[] args) { SimpleClock total = new SimpleClock(); + Files.createFile(log, ""); initLogger(); logger.warn("Start"); @@ -140,6 +151,13 @@ dDepthFragment.addNumber((double)onFragment.getDescriptionDepth()); dLengthFragment.addNumber((double)onFragment.getDescriptionLength()); + String desc = onFragment.getDescription().toKBSyntaxString(); + + fragHasNot = ( fragHasNot || desc.contains("NOT")); + fragHasAll = (fragHasAll || desc.contains("ALL")); + fragHasBooleanData = (fragHasBooleanData || desc.contains("= FALSE")|| desc.contains("= TRUE")); + fragHasNrRes = (fragHasNrRes || desc.contains("<")|| desc.contains(">")); + SortedSet<Individual> retrieved = reasoningService.retrieval(onFragment.getDescription()); EvaluatedDescription onOnto = reEvaluateDescription( onFragment.getDescription(), retrieved, posEx, negEx); @@ -186,10 +204,14 @@ dDepthWhole.addNumber((double)normalOnOnto.getDescriptionDepth()); dLengthWhole.addNumber((double)normalOnOnto.getDescriptionLength()); + fragHasNot = ( fragHasNot || desc.contains("NOT")); + fragHasAll = (fragHasAll || desc.contains("ALL")); + fragHasBooleanData = (fragHasBooleanData || desc.contains("= FALSE")|| desc.contains("= TRUE")); + fragHasNrRes = (fragHasNrRes || desc.contains("<")|| desc.contains(">")); + cm.freeAllComponents(); + writeLog(); - //writeLog(); - //System.exit(0); }//end for }catch (Exception e) { e.printStackTrace(); @@ -202,8 +224,11 @@ } public static void writeLog(){ - String l = "a"; - l += + String l = "\n\n\n*********************\n"; + l +="COUNT: "+accFragment.getCount()+"\n"; + l +="ALL: "+fragHasAll+" BOOL: "+fragHasBooleanData+" NOT: "+fragHasNot+" <>=: "+fragHasNrRes+"\n"; + l +="ALL: "+wholeHasAll+" BOOL: "+wholeHasBooleanData+" NOT: "+wholeHasNot+" <>=: "+wholeHasNrRes+"\n"; + l+="accFragment\t\t"+accFragment.getMeanAsPercentage()+" +-"+accFragment.getStandardDeviation()+"\n"; l+="accOnOnto\t\t"+accOnOnto.getMeanAsPercentage()+" +-"+accOnOnto.getStandardDeviation()+"\n"; @@ -219,7 +244,7 @@ l+="dLengthWhole\t\t"+dLengthWhole.getMean()+" +-"+dLengthWhole.getStandardDeviation()+"\n"; l+="dDepthWhole\t\t"+dDepthWhole.getMean()+" +-"+dDepthWhole.getStandardDeviation()+"\n"; - Files.createFile(log, l); + Files.appendFile(log, l); // write JaMON report in HTML file File jamonlog = new File("sembib/jamon.html"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |