From: <sk...@us...> - 2008-06-10 16:57:05
|
Revision: 956 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=956&view=rev Author: sknappe Date: 2008-06-10 09:56:59 -0700 (Tue, 10 Jun 2008) Log Message: ----------- modified learn to use format cache is now configurable in settings Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dbpedia-navigator/Settings.php Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-06-10 16:51:06 UTC (rev 955) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-06-10 16:56:59 UTC (rev 956) @@ -42,11 +42,14 @@ function getConceptFromExamples($posExamples,$negExamples) { + require_once("Settings.php"); + $settings=new Settings(); + $this->client->applyConfigEntryInt($this->id, $this->ksID, "recursionDepth",1); $this->client->applyConfigEntryStringArray($this->id, $this->ksID, "instances", array_merge($posExamples,$negExamples)); $this->client->applyConfigEntryString($this->id, $this->ksID, "predefinedFilter", "YAGO"); $this->client->applyConfigEntryString($this->id, $this->ksID, "predefinedEndpoint", "DBPEDIA"); - + $this->client->applyConfigEntryBoolean($this->id, $this->ksID, "useCache", $settings->useCache); $this->client->setReasoner($this->id, "fastInstanceChecker"); if(empty($negExamples)) $this->client->setLearningProblem($this->id, "posOnlyDefinition"); @@ -65,7 +68,7 @@ if($threaded == false) { - $concept = $this->client->learn($this->id); + $concept = $this->client->learn($this->id,'kb'); } else { Modified: trunk/src/dbpedia-navigator/Settings.php =================================================================== --- trunk/src/dbpedia-navigator/Settings.php 2008-06-10 16:51:06 UTC (rev 955) +++ trunk/src/dbpedia-navigator/Settings.php 2008-06-10 16:56:59 UTC (rev 956) @@ -41,6 +41,8 @@ public $language="en"; public $googleMapsKey="ABQIAAAAWwHG9WuZ8hxFSPjRX2-D-hSOxlJeL3USfakgDtFzmQkGhQTW0xTFM1Yr38ho8qREnjt-6oLs37o4xg"; + + public useCache=true; } ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |