From: <sk...@us...> - 2008-01-28 14:27:24
|
Revision: 433 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=433&view=rev Author: sknappe Date: 2008-01-28 06:27:16 -0800 (Mon, 28 Jan 2008) Log Message: ----------- fixed some bugs Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dbpedia-navigator/ajaxfunctions.php trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-01-28 14:26:54 UTC (rev 432) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-01-28 14:27:16 UTC (rev 433) @@ -40,7 +40,7 @@ return array(0 => $id, 1 => $ksID); } - function getConceptFromExamples($ttl,$posExamples,$negExamples) + function getConceptFromExamples($posExamples,$negExamples) { $this->client->applyConfigEntryInt($this->id, $this->ksID, "recursionDepth",1); $this->client->applyConfigEntryStringArray($this->id, $this->ksID, "instances", array_merge($posExamples,$negExamples)); @@ -88,7 +88,7 @@ $seconds = $i * $sleeptime; $i++; - } while($seconds<$ttl&&$running); + } while($seconds<$this->ttl&&$running); $this->client->stop($this->id); } Modified: trunk/src/dbpedia-navigator/ajaxfunctions.php =================================================================== --- trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-01-28 14:26:54 UTC (rev 432) +++ trunk/src/dbpedia-navigator/ajaxfunctions.php 2008-01-28 14:27:16 UTC (rev 433) @@ -292,21 +292,20 @@ foreach ($_SESSION['negative'] as $neg) $negArray[]=$neg; - require_once("Settings.php"); require_once("DLLearnerConnection.php"); - $settings=new Settings(); - $sc=new DLLearnerConnection($settings->dbpediauri,$settings->wsdluri,$_SESSION['id'],$_SESSION['ksID']); + $sc=new DLLearnerConnection($_SESSION['id'],$_SESSION['ksID']); - $concept=$sc->getConceptFromExamples($settings->sparqlttl,$posArray,$negArray); + $concept=$sc->getConceptFromExamples($posArray,$negArray); $_SESSION['lastLearnedConcept']=$concept; - if (strlen(substr (strrchr ($concept, "/"), 1))>0) $concept=urldecode(substr (strrchr ($concept, "/"), 1)); + if (strlen(substr (strrchr ($concept, "/"), 1))>0) $concept="<a href=\"\" onclick=\"xajax_getSubjectsFromConcept();return false;\" />".urldecode(substr (strrchr ($concept, "/"), 1))."</a>"; + else $concept="<a href=\"\" onclick=\"xajax_getSubjectsFromConcept();return false;\" />".$concept."</a>"; } else $concept="You must choose at least one<br/> positive example."; $objResponse = new xajaxResponse(); - $objResponse->assign("conceptcontent", "innerHTML", $concept); + $objResponse->assign("conceptlink", "innerHTML", $concept); return $objResponse; } Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-01-28 14:26:54 UTC (rev 432) +++ trunk/src/dbpedia-navigator/index.php 2008-01-28 14:27:16 UTC (rev 433) @@ -68,7 +68,7 @@ <body> <!-- <h1>DBpedia Navigator</h1> --> -<img src="images/dbpedia_navigator.png" alt="DBpedia Navigator" style="padding:5px" /> +<img src="images/dbpedia_navigator.png" alt="DBpedia Navigator" style="padding:5px" /> <span id="conceptlink"></span> <div id="layer" style="display:none"> <div id="layerContent" style="display:none"></div> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |