From: <jen...@us...> - 2011-08-05 13:02:52
|
Revision: 3005 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3005&view=rev Author: jenslehmann Date: 2011-08-05 13:02:46 +0000 (Fri, 05 Aug 2011) Log Message: ----------- enrichment evaluation script automatically creates SQL table 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 2011-08-05 12:54:20 UTC (rev 3004) +++ trunk/scripts/src/main/java/org/dllearner/scripts/evaluation/EnrichmentEvaluation.java 2011-08-05 13:02:46 UTC (rev 3005) @@ -27,6 +27,7 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.SQLException; +import java.sql.Statement; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -34,8 +35,6 @@ import java.util.prefs.Preferences; import org.apache.log4j.Logger; -import org.dllearner.algorithms.properties.DisjointPropertyAxiomLearner; -import org.dllearner.algorithms.properties.EquivalentPropertyAxiomLearner; import org.dllearner.algorithms.properties.FunctionalPropertyAxiomLearner; import org.dllearner.algorithms.properties.PropertyDomainAxiomLearner; import org.dllearner.algorithms.properties.PropertyRangeAxiomLearner; @@ -46,7 +45,6 @@ import org.dllearner.core.ComponentInitException; import org.dllearner.core.ComponentManager; import org.dllearner.core.EvaluatedAxiom; -import org.dllearner.core.LearningAlgorithm; import org.dllearner.core.config.ConfigHelper; import org.dllearner.core.owl.ObjectProperty; import org.dllearner.kb.SparqlEndpointKS; @@ -119,6 +117,14 @@ String url = "jdbc:mysql://"+dbServer+"/"+dbName; Connection conn = DriverManager.getConnection(url, dbUser, dbPass); + + Statement s = conn.createStatement (); + s.executeUpdate ("DROP TABLE IF EXISTS evaluation"); + s.executeUpdate ( + "CREATE TABLE evaluation (" + + "id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY," + + "entity VARCHAR(200), algorithm VARCHAR(100), axiom VARCHAR(500), score DOUBLE)"); + s.close(); ps = conn.prepareStatement("INSERT INTO evaluation (" + "entity, algorithm, axiom, score ) " + "VALUES(?,?,?,?)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |