From: <sk...@us...> - 2008-01-16 12:42:49
|
Revision: 380 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=380&view=rev Author: sknappe Date: 2008-01-16 04:42:45 -0800 (Wed, 16 Jan 2008) Log Message: ----------- some bugfixes and added class for finding natural terms for concepts Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dbpedia-navigator/ajaxfunctions.php trunk/src/dbpedia-navigator/index.php Added Paths: ----------- trunk/src/dbpedia-navigator/NaturalConcepts.php trunk/src/dbpedia-navigator/learningExamples.txt Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-01-16 02:39:20 UTC (rev 379) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-01-16 12:42:45 UTC (rev 380) @@ -45,7 +45,7 @@ function getConceptFromExamples($ttl,$posExamples,$negExamples) { - $this->client->applyConfigEntryInt($this->id, $this->ksID, "recursionDepth", 2); + $this->client->applyConfigEntryInt($this->id, $this->ksID, "recursionDepth",1); $this->client->applyConfigEntryStringArray($this->id, $this->ksID, "instances", array_merge($posExamples,$negExamples)); // $this->client->applyConfigEntryStringArray($this->id, $this->ksID, "predList", array()); // $this->client->applyConfigEntryStringArray($this->id, $this->ksID, "objList", array()); Added: trunk/src/dbpedia-navigator/NaturalConcepts.php =================================================================== --- trunk/src/dbpedia-navigator/NaturalConcepts.php (rev 0) +++ trunk/src/dbpedia-navigator/NaturalConcepts.php 2008-01-16 12:42:45 UTC (rev 380) @@ -0,0 +1,31 @@ +<?php + +class NaturalConcepts +{ + private $concept; + + function NaturalConcepts($conc){ + $this->concept=$conc; + } + + function getNaturalConcept(){ + $identifiedConcepts=$this->identifyConcepts(); + return $identifiedConcepts; + } + + function identifyConcepts() + { + $ret=array(); + while (true){ + $nextpos=strpos("http",$this->concept); + $nextend=strpos() + } + return $ret; + } +} + +$conc="EXISTS http://dbpedia.org/property/website AND http://dbpedia.org/resource/Berlin"; +$nc=new NaturalConcepts($conc); +$ic=$nc->getNaturalConcept(); +print_r($ic); +?> \ No newline at end of file Modified: trunk/src/dbpedia-navigator/ajaxfunctions.php =================================================================== --- trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-01-16 02:39:20 UTC (rev 379) +++ trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-01-16 12:42:45 UTC (rev 380) @@ -256,7 +256,7 @@ } $negInterests=""; if (isset($_SESSION['negative'])) foreach($_SESSION['negative'] as $neg){ - $negInterests=$negInterests.str_replace("_"," ",urldecode(substr (strrchr ($neg, "/"), 1)))." <a href=\"\" onclick=\"xajax_toPositive('".$neg."');return false;\"><img src=\"images/plus.jpg\" alt=\"Plus\"/></a> <a href=\"\" onclick=\"xajax_removeNegInterest('".$pos."');return false;\"><img src=\"images/remove.png\" alt=\"Minus\"/></a><br/>"; + $negInterests=$negInterests.str_replace("_"," ",urldecode(substr (strrchr ($neg, "/"), 1)))." <a href=\"\" onclick=\"xajax_toPositive('".$neg."');return false;\"><img src=\"images/plus.jpg\" alt=\"Plus\"/></a> <a href=\"\" onclick=\"xajax_removeNegInterest('".$neg."');return false;\"><img src=\"images/remove.png\" alt=\"Minus\"/></a><br/>"; } $objResponse=new xajaxResponse(); Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-01-16 02:39:20 UTC (rev 379) +++ trunk/src/dbpedia-navigator/index.php 2008-01-16 12:42:45 UTC (rev 380) @@ -188,7 +188,8 @@ <div id="todo"> <b>ToDo:</b> <ul style="float:left"> - <li>Get learning process working (with new SPARQL component).</li> + <li>Get learning component fast.</li> + <li>Learning as a Thread.</li> <li>Get local DBpedia SPARQL endpoint working (next DBpedia release expected at the endof January and then every two months, so it would be nice to have a script based partly automated or at least documented solution for creating a DBpedia mirror).</li> Added: trunk/src/dbpedia-navigator/learningExamples.txt =================================================================== --- trunk/src/dbpedia-navigator/learningExamples.txt (rev 0) +++ trunk/src/dbpedia-navigator/learningExamples.txt 2008-01-16 12:42:45 UTC (rev 380) @@ -0,0 +1,37 @@ ++Pythagoras +-Plato +-------- +http://dbpedia.org/class/yago/ReligiousPerson109628382 + ++Angela Merkel +-Joschka Fischer +---------------- +http://dbpedia.org/class/yago/Adult109605289 (length 1, depth 1) +http://dbpedia.org/class/yago/Communicator109610660 (length 1, depth 1) +http://dbpedia.org/class/yago/Female109619168 (length 1, depth 1) +http://dbpedia.org/class/yago/Scientist110560637 (length 1, depth 1) + ++Germany +-Russia +-Mongolia +--------------- +http://dbpedia.org/class/yago/PhysicalEntity100001930 + ++Tiger +-Elefant +--------------- +http://dbpedia.org/class/yago/CausalAgent100007347 + ++Mother ++Father +-Child +----------------- +http://dbpedia.org/class/yago/Adult109605289 + ++Leipzig ++Dresden +-Berlin +-Hamburg +---------------- +EXISTS http://dbpedia.org/property/wappen.TOP +EXISTS http://dbpedia.org/property/wordnet_type.TOP \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |