From: <sk...@us...> - 2008-10-27 13:52:11
|
Revision: 1445 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1445&view=rev Author: sknappe Date: 2008-10-27 13:51:53 +0000 (Mon, 27 Oct 2008) Log Message: ----------- changes to use new ontology Modified Paths: -------------- trunk/src/dbpedia-navigator/Settings.php.dist trunk/src/dbpedia-navigator/ajax_get_article.php trunk/src/dbpedia-navigator/helper_functions.php Modified: trunk/src/dbpedia-navigator/Settings.php.dist =================================================================== --- trunk/src/dbpedia-navigator/Settings.php.dist 2008-10-27 12:36:06 UTC (rev 1444) +++ trunk/src/dbpedia-navigator/Settings.php.dist 2008-10-27 13:51:53 UTC (rev 1445) @@ -60,6 +60,10 @@ public $ignoredRoles=array(); public $classSystem="YAGO"; + //public $classSystem="DBpedia"; + //the name of the used database + public $database_name='navigator_db'; + //public $database_name='navigator_db_new'; //the type of database server public $database_type='mysql'; @@ -70,9 +74,6 @@ //the password of that user public $database_pass='dbpedia'; - //the name of the used database - if ($classSystem=="YAGO") - public $database_name='navigator_db'; } ?> \ No newline at end of file Modified: trunk/src/dbpedia-navigator/ajax_get_article.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_get_article.php 2008-10-27 12:36:06 UTC (rev 1444) +++ trunk/src/dbpedia-navigator/ajax_get_article.php 2008-10-27 13:51:53 UTC (rev 1445) @@ -127,6 +127,7 @@ if(isset($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'])){ // display a list of classes if ($settings->classSystem=="YAGO") $content.='<br/><hr><h4>YAGO Classes</h4><br/>'; + else if ($settings->classSystem=="DBpedia") $content.='<br/><hr><h4>DBpedia Classes</h4><br/>'; $content .= '<p>'.formatClassArray($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'],$classSystem).'</p>'; } Modified: trunk/src/dbpedia-navigator/helper_functions.php =================================================================== --- trunk/src/dbpedia-navigator/helper_functions.php 2008-10-27 12:36:06 UTC (rev 1444) +++ trunk/src/dbpedia-navigator/helper_functions.php 2008-10-27 13:51:53 UTC (rev 1445) @@ -397,7 +397,8 @@ $string="<ul>"; for($i=0; $i<count($ar); $i++) { - if ($settings->classSystem=="YAGO") $prefix = 'http://dbpedia.org/class/yago/'; + if ($classSystem=="YAGO") $prefix = 'http://dbpedia.org/class/yago/'; + else if ($classSystem=="DBpedia") $prefix='http://dbpedia.org/ontology/' if(substr($ar[$i]['value'],0,30)!=$prefix) continue; $query="SELECT label FROM categories WHERE category='".$ar[$i]['value']."' LIMIT 1"; $res=$databaseConnection->query($query); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |