From: <lor...@us...> - 2012-05-03 21:20:37
|
Revision: 3690 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3690&view=rev Author: lorenz_b Date: 2012-05-03 21:20:31 +0000 (Thu, 03 May 2012) Log Message: ----------- Fallback to SPARQL 1.0 after 2 attempts. Modified Paths: -------------- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java Modified: trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java =================================================================== --- trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2012-05-03 21:20:22 UTC (rev 3689) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2012-05-03 21:20:31 UTC (rev 3690) @@ -183,6 +183,8 @@ // max. number of attempts per algorithm and entity, because to many queries // in a short time could cause blocking by the endpoint private final int maxAttempts = 5; + //after 2 attempts we force the iterative SPARQL 1.1 mode + private final int nrOfAttemptsBeforeForceToSPARQL1_0_Mode = 2; //delay between 2 attempts private final int delayInMilliseconds = 15000; @@ -399,6 +401,7 @@ logger.info("Applying " + algName + " on " + property + " ... (Attempt " + attempt + ")"); startTime = System.currentTimeMillis(); try { + ((AbstractAxiomLearningAlgorithm)learner).setForceSPARQL_1_0_Mode(attempt > nrOfAttemptsBeforeForceToSPARQL1_0_Mode); learner.start(); timeout = false; } catch (Exception e) { @@ -486,6 +489,7 @@ logger.info("Applying " + algName + " on " + property + " ... (Attempt " + attempt + ")"); startTime = System.currentTimeMillis(); try { + ((AbstractAxiomLearningAlgorithm)learner).setForceSPARQL_1_0_Mode(attempt > nrOfAttemptsBeforeForceToSPARQL1_0_Mode); learner.start(); timeout = false; } catch (Exception e) { @@ -583,6 +587,7 @@ logger.info("Applying " + algName + " on " + cls + " ... (Attempt " + attempt + ")"); startTime = System.currentTimeMillis(); try { + ((AbstractAxiomLearningAlgorithm)learner).setForceSPARQL_1_0_Mode(attempt > nrOfAttemptsBeforeForceToSPARQL1_0_Mode); learner.start(); timeout = false; } catch (Exception e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |