From: <ku...@us...> - 2008-05-17 04:35:26
|
Revision: 892 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=892&view=rev Author: kurzum Date: 2008-05-16 21:35:22 -0700 (Fri, 16 May 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java Modified: trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java =================================================================== --- trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-17 02:10:38 UTC (rev 891) +++ trunk/src/dl-learner/org/dllearner/scripts/SKOS7030.java 2008-05-17 04:35:22 UTC (rev 892) @@ -75,9 +75,9 @@ static boolean randomizeCache=false; static int resultsize=50; - static double noise=10; + static double noise=5; static int limit=200; - static double percentage=0.7; + static double percentage=0.3; /** * @param args @@ -109,18 +109,30 @@ // } SortedSet<String> concepts = new TreeSet<String>(); - concepts.add("http://dbpedia.org/resource/Category:Prime_Ministers_of_the_United_Kingdom"); - concepts.add("http://dbpedia.org/resource/Category:German_women_in_politics"); - concepts.add("http://dbpedia.org/resource/Category:Best_Actor_Academy_Award_winners"); + String prim="http://dbpedia.org/resource/Category:Prime_Ministers_of_the_United_Kingdom"; - DBpediaSKOS(concepts.first()); - DBpediaSKOS(concepts.first()); - concepts.remove(concepts.first()); - DBpediaSKOS(concepts.first()); - DBpediaSKOS(concepts.first()); - concepts.remove(concepts.first()); - DBpediaSKOS(concepts.first()); - DBpediaSKOS(concepts.first()); + String award=("http://dbpedia.org/resource/Category:Best_Actor_Academy_Award_winners"); + + double acc1=0.0; + for (int i = 0; i < 5; i++) { + acc1+=DBpediaSKOS(prim); + } + System.out.println("accprim"+(acc1/5)); + + double acc2=0.0; + for (int i = 0; i < 5; i++) { + acc2+=DBpediaSKOS(prim); + } + System.out.println("accprim"+(acc2/5)); + +// DBpediaSKOS(concepts.first()); +// DBpediaSKOS(concepts.first()); +// concepts.remove(concepts.first()); +// DBpediaSKOS(concepts.first()); +// DBpediaSKOS(concepts.first()); +// concepts.remove(concepts.first()); +// DBpediaSKOS(concepts.first()); +// DBpediaSKOS(concepts.first()); //algorithm="refinement"; //roles(); @@ -137,7 +149,7 @@ - static void DBpediaSKOS(String concept){ + static double DBpediaSKOS(String concept){ se = SparqlEndpoint.EndpointLOCALDBpedia(); //se = SparqlEndpoint.EndpointDBpedia(); String url = "http://dbpedia.openlinksw.com:8890/sparql"; @@ -245,9 +257,11 @@ // //double percent=0.80*(double)res.size();; - + double acc=res.first().accuracy; logger.debug(res.first().toStringFull()); res.remove(res.first()); + logger.debug(res.first().toStringFull()); + res.remove(res.first()); int i=0; while (res.size()>0){ logger.debug(res.first()); @@ -258,9 +272,9 @@ } + return acc; - //System.out.println("AAAAAAAA"); //System.exit(0); //"relearned concept: "; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |