From: <sk...@us...> - 2008-07-21 18:07:44
|
Revision: 1014 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1014&view=rev Author: sknappe Date: 2008-07-21 18:07:39 +0000 (Mon, 21 Jul 2008) Log Message: ----------- Started to work with new ajax mechanism, at the moment only started with article search, more to come soon Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php Added Paths: ----------- trunk/src/dbpedia-navigator/ajax_get_article.php trunk/src/dbpedia-navigator/helper_functions.php trunk/src/dbpedia-navigator/index-new.php Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-07-19 13:37:47 UTC (rev 1013) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-07-21 18:07:39 UTC (rev 1014) @@ -88,7 +88,8 @@ sleep($sleeptime); // see what we have learned so far - $concepts=$this->client->getCurrentlyBestConcepts($this->id,3,"kb"); + //$concepts=$this->client->getCurrentlyBestConcepts($this->id,3,"kb"); + $concepts=$this->client->getCurrentlyBestEvaluatedDescriptions($this->id,3); $running=$this->client->isAlgorithmRunning($this->id); $seconds = $i * $sleeptime; @@ -107,7 +108,8 @@ $this->client->stop($this->id); } - return $concepts->item; + //return $concepts->item; + return $concepts; } function getConceptDepth() Added: trunk/src/dbpedia-navigator/ajax_get_article.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_get_article.php (rev 0) +++ trunk/src/dbpedia-navigator/ajax_get_article.php 2008-07-21 18:07:39 UTC (rev 1014) @@ -0,0 +1,190 @@ +<?php + include('helper_functions.php'); + + session_start(); + + $subject=$_POST['label']; + $fromCache=$_POST['cache']; + + if (isset($_SESSION['articles'])) $articles=$_SESSION['articles']; + $id=$_SESSION['id']; + $ksID=$_SESSION['ksID']; + session_write_close(); + setRunning($id,"true"); + + //get first Letter of label big + $uri=subjectToURI($subject); + + //if article is in session, get it out of the session + if (isset($articles)){ + foreach ($articles as $key => $value) + { + if ($value['subject']==$subject){ + $fromCache=$key; + break; + } + } + } + + //initialize the content variables + $content=""; + $lastArticles=""; + $artTitle=""; + + //get the article + //if $fromCache is -2, no new SearchResults should be processed + //if $fromCache is -1, everything is normal + //if $fromCache is >=0, the article is taken out of the cache + if ($fromCache<0) { + //if there are errors see catch block + try{ + require_once("DLLearnerConnection.php"); + $sc=new DLLearnerConnection($id,$ksID); + $triples=$sc->getTriples($uri); + + //BUILD ARTICLE + // goal: display the data in a nice (DBpedia specific way), maybe similar to + // dbpedia.org/search + + // display a picture if there is one + if(isset($triples['http://xmlns.com/foaf/0.1/depiction'])) + $content.='<img src="'.$triples['http://xmlns.com/foaf/0.1/depiction'][0]['value'].'" alt="Picture of '.$subject.'" style="float:right; max-width:200px;" \>'; + + //display where it was redirected from, if it was redirected + $redirect=""; + if (isset($triples['http://dbpedia.org/property/redirect'])){ + $content.="<span id=\"redirectedFrom\">redirected from '$subject'</span>"; + $redirect=$triples['http://dbpedia.org/property/redirect'][0]['value']; + } + + // add short description in english + $content.="<h4>Short Description</h4><p>".urldecode($triples['http://dbpedia.org/property/abstract'][0]['value'])."</p>"; + + // give the link to the corresponding Wikipedia article + if(isset($triples['http://xmlns.com/foaf/0.1/page'])) + $content .= '<p><img src="'.$_GET['path'].'images/wikipedia_favicon.png" alt="Wikipedia" /> <a href="'.$triples['http://xmlns.com/foaf/0.1/page'][0]['value'].'">view Wikipedia article</a>, '; + $content .= '<a href="'.$uri.'">view DBpedia resource description</a></p>'; + + // display a list of classes + if(isset($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'])) + $content .= '<p>classes: '.formatClassArray($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type']).'</p>'; + + if(isset($triples['http://dbpedia.org/property/reference'])) { + $content .= '<p>references: <ul>'; + foreach($triples['http://dbpedia.org/property/reference'] as $reference) + $content .= '<li><a href="'.$reference['value'].'">'.$reference['value'].'</a></li>'; + $content .= '</ul></p>'; + } + + //display a Google Map if Geo-koordinates are available + if (isset($triples['http://www.w3.org/2003/01/geo/wgs84_pos#long'])&&isset($triples['http://www.w3.org/2003/01/geo/wgs84_pos#lat'])){ + $content.="<br/><img src=\"".$_GET['path']."images/mobmaps_googlemapsicon.jpg\" alt=\"Google Maps\" style=\"max-width:25px;\" /> <a href=\"\" onClick=\"loadGoogleMap(".$triples['http://www.w3.org/2003/01/geo/wgs84_pos#lat'][0]['value'].",".$triples['http://www.w3.org/2003/01/geo/wgs84_pos#long'][0]['value'].",'".$triples['http://www.w3.org/2000/01/rdf-schema#label'][0]['value']."');return false;\">Toggle a map of the location</a><br/><br/><div id=\"map\" style=\"width: 500px; height: 300px;display:none;\"></div>"; + } + + //display photo collection, if there is one + if (isset($triples['http://dbpedia.org/property/hasPhotoCollection'])){ + $content.="<br/><img src=\"".$_GET['path']."images/flickr.jpg\" alt=\"Flickr\" style=\"max-width:25px;\" /> <a href=\"".$triples['http://dbpedia.org/property/hasPhotoCollection'][0]['value']."\">view a photo collection</a><br/>"; + } + + //skos-subjects + if (isset($triples['http://www.w3.org/2004/02/skos/core#subject'])){ + $content .= '<br/><p>skos subjects: <ul>'; + foreach($triples['http://www.w3.org/2004/02/skos/core#subject'] as $skos) + $content .= '<li><a href="'.$skos['value'].'">'.$skos['value'].'</a></li>'; + $content .= '</ul></p>'; + } + + //BUILD ARTICLE TITLE + $artTitle=$triples['http://www.w3.org/2000/01/rdf-schema#label'][0]['value']; + + // filter out uninteresting properties and properties which + // have already been displayed + unset($triples['http://xmlns.com/foaf/0.1/page']); + unset($triples['http://xmlns.com/foaf/0.1/depiction']); + unset($triples['http://dbpedia.org/property/abstract']); + unset($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type']); + unset($triples['http://dbpedia.org/property/redirect']); + unset($triples['http://dbpedia.org/property/reference']); + unset($triples['http://www.w3.org/2003/01/geo/wgs84_pos#long']); + unset($triples['http://www.w3.org/2003/01/geo/wgs84_pos#lat']); + unset($triples['http://dbpedia.org/property/hasPhotoCollection']); + unset($triples['http://www.w3.org/2004/02/skos/core#subject']); + unset($triples['http://www.w3.org/2000/01/rdf-schema#label']); + + // display the remaining properties as list which can be used for further navigation + $content .= '<br/><br/><br/>'.get_triple_table($triples); + + //Restart the Session + session_start(); + + //store article in session, to navigate between last 5 articles quickly + $contentArray=array('content' => $content,'subject' => $artTitle); + if (!isset($_SESSION['nextArticle'])){ + $_SESSION['nextArticle']=0; + $_SESSION['articles']=array(); + } + if ($_SESSION['nextArticle']==5) $_SESSION['nextArticle']=0; + $_SESSION['articles'][$_SESSION['nextArticle']]=$contentArray; + $_SESSION['currentArticle']=$_SESSION['nextArticle']; + $_SESSION['nextArticle']++; + + //Add Positives to Session + if (!isset($_SESSION['positive'])){ + if ($redirect!=""){ + $array=array($redirect => $redirect); + } + else $array=array("http://dbpedia.org/resource/".str_replace(" ","_",$subject) => "http://dbpedia.org/resource/".str_replace(" ","_",$subject)); + $_SESSION['positive']=$array; + } + else{ + $array=$_SESSION['positive']; + if ($redirect!="") $array[$redirect] = $redirect; + else $array["http://dbpedia.org/resource/".str_replace(" ","_",$subject)]="http://dbpedia.org/resource/".str_replace(" ","_",$subject); + $_SESSION['positive']=$array; + } + + } catch (Exception $e) + { + $content=$e->getMessage(); + $artTitle="No Result"; + //$objResponse->call('xajax_getsubjects',$subject); + } + } + else { + session_start(); + //Article is in session + $content=$_SESSION['articles'][$fromCache]['content']; + $artTitle=$_SESSION['articles'][$fromCache]['subject']; + } + + //Build lastArticles + if (isset($_SESSION['articles'])){ + foreach ($_SESSION['articles'] as $key => $value) + { + $lastArticles.="<a href=\"\" onclick=\"xajax_getarticle('',".$key.");return false;\">".$value['subject']."</a><br/>"; + } + } + + //add Positives and Negatives to Interests + $posInterests=""; + if (isset($_SESSION['positive'])) foreach($_SESSION['positive'] as $pos){ + $posInterests.=urldecode(substr (strrchr ($pos, "/"), 1))." <a href=\"\" onclick=\"xajax_toNegative('".$pos."');return false;\"><img src=\"".$_GET['path']."images/minus.jpg\" alt=\"Minus\"/></a> <a href=\"\" onclick=\"xajax_removePosInterest('".$pos."');return false;\"><img src=\"".$_GET['path']."images/remove.png\" alt=\"Delete\"/></a><br/>"; + } + $negInterests=""; + if (isset($_SESSION['negative'])) foreach($_SESSION['negative'] as $neg){ + $negInterests.=urldecode(substr (strrchr ($neg, "/"), 1))." <a href=\"\" onclick=\"xajax_toPositive('".$neg."');return false;\"><img src=\"".$_GET['path']."images/plus.jpg\" alt=\"Plus\"/></a> <a href=\"\" onclick=\"xajax_removeNegInterest('".$neg."');return false;\"><img src=\"".$_GET['path']."images/remove.png\" alt=\"Delete\"/></a><br/>"; + } + + + print $content; + print '$$'; + print $artTitle; + print '$$'; + print $lastArticles; + print '$$'; + print $posInterests; + print '$$'; + print $negInterests; + + //$objResponse->call('xajax_learnConcept'); +?> \ No newline at end of file Added: trunk/src/dbpedia-navigator/helper_functions.php =================================================================== --- trunk/src/dbpedia-navigator/helper_functions.php (rev 0) +++ trunk/src/dbpedia-navigator/helper_functions.php 2008-07-21 18:07:39 UTC (rev 1014) @@ -0,0 +1,160 @@ +<?php +function subjectToURI($subject) +{ + //if the subject is already a URI return it + if (strpos($subject,"http://dbpedia.org/resource/")===0) + return $subject; + //delete whitespaces at beginning and end + $subject=trim($subject); + //get first letters big + $subject=ucfirst($subject); + //replace spaces with _ + $subject=str_replace(' ','_',$subject); + //add the uri + $subject="http://dbpedia.org/resource/".$subject; + + return $subject; +} + +function getTagCloud($tags,$label) +{ + $max=max($tags); + $min=min($tags); + $diff=$max-$min; + $distribution=$diff/3; + + $ret="<p>"; + foreach ($tags as $tag=>$count){ + if ($count==$min) $style="font-size:xx-small;"; + else if ($count==$max) $style="font-size:xx-large;"; + else if ($count>($min+2*$distribution)) $style="font-size:large;"; + else if ($count>($min+$distribution)) $style="font-size:medium;"; + else $style="font-size:small;"; + + $tag_with_entities=htmlentities("\"".$tag."\""); + $ret.='<a style="'.$style.'" href="#" onclick="xajax_getSubjectsFromConcept(\''.$tag_with_entities.'\');">'.$label[$tag].'</a>'; + } + $ret.="</p>"; + return $ret; +} + +function getResultsTable($results) +{ + $ret="<p>Your search brought ".count($results)." results.</p><br/>"; + $i=0; + $display="block"; + while($i*30<count($results)) + { + $ret.="<div id='results".$i."' style='display:".$display."'>Seite ".($i+1)."<br/><br/>"; + for ($j=0;($j<30)&&(($i*30+$j)<count($results));$j++) + { + $result=$results[$i*30+$j]; + $ret.=" <a href=\"\" onclick=\"xajax_getarticle('".$result."',-1);return false;\">".urldecode(str_replace("_"," ",substr (strrchr ($result, "/"), 1)))."</a><br/>"; + } + $ret.="</div>"; + $i++; + $display="none"; + } + $ret.="<br/><p style='width:100%;text-align:center;'>"; + for ($k=0;$k<$i;$k++){ + $ret.="<a href=\"\" onClick=\"showdiv('results".($k)."');"; + for ($l=0;$l<$i;$l++) + { + if ($l!=$k) $ret.="hidediv('results".$l."');"; + } + $ret.="return false;\">".($k+1)."</a>"; + if ($k!=($i-1)) $ret.=" | "; + } + $ret.="</p>"; + return $ret; +} + +function setRunning($id,$running) +{ + if(!is_dir("temp")) mkdir("temp"); + $file=fopen("./temp/".$id.".temp","w"); + fwrite($file, $running); + fclose($file); +} + +function get_triple_table($triples) { + + $table = '<table border="0"><tr><td>predicate</td><td>object</td></tr>'; + $i=1; + foreach($triples as $predicate=>$object) { + if ($i>0) $backgroundcolor="eee"; + else $backgroundcolor="ffffff"; + $table .= '<tr style="background-color:#'.$backgroundcolor.';"><td><a href="'.$predicate.'">'.nicePredicate($predicate).'</a></td>'; + $table .= '<td><ul>'; + foreach($object as $element) { + if ($element['type']=="uri") $table .= '<li><a href="'.$element['value'].'">'.$element['value'].'</a></li>'; + else $table .= '<li>'.$element['value'].'</li>'; + } + $table .= '</ul></td>'; + $i*=-1; + } + $table .= '</table>'; + return $table; +} + +function nicePredicate($predicate) +{ + if (strripos ($predicate, "#")>strripos ($predicate, "/")){ + $namespace=substr ($predicate,0,strripos ($predicate, "#")); + $name=substr ($predicate,strripos ($predicate, "#")+1); + } + else{ + $namespace=substr ($predicate,0,strripos ($predicate, "/")); + $name=substr ($predicate,strripos ($predicate, "/")+1); + } + + switch ($namespace){ + case "http://www.w3.org/2000/01/rdf-schema": $namespace="rdfs"; + break; + case "http://www.w3.org/2002/07/owl": $namespace="owl"; + break; + case "http://xmlns.com/foaf/0.1": $namespace="foaf"; + break; + case "http://dbpedia.org/property": $namespace="p"; + break; + case "http://www.w3.org/2003/01/geo/wgs84_pos": $namespace="geo"; + break; + case "http://www.w3.org/2004/02/skos/core": $namespace="skos"; + break; + } + + return $namespace.':'.$name; +} + +function formatClassArray($ar) { + $string = formatClass($ar[0]['value']); + for($i=1; $i<count($ar); $i++) { + $string .= ', ' . formatClass($ar[$i]['value']); + } + return $string; +} + +// format a class nicely, i.e. link to it and possibly display +// it in a better way +function formatClass($className) { + $yagoPrefix = 'http://dbpedia.org/class/yago/'; + if(substr($className,0,30)==$yagoPrefix) { + return '<a href="'.$className.'">'.substr($className,30).'</a>'; + // DBpedia is Linked Data, so it makes always sense to link it + // ToDo: instead of linking to other pages, the resource should better + // be openened within DBpedia Navigator + } else if(substr($className,0,14)=='http://dbpedia') { + return '<a href="'.$className.'">'.$className.'</a>'; + } else { + return $className; + } +} + +function arrayToCommaSseparatedList($ar) { + $string = $ar[0]; + for($i=1; $i<count($ar); $i++) { + $string .= ', ' . $ar[$i]; + } + return $string; +} +?> \ No newline at end of file Added: trunk/src/dbpedia-navigator/index-new.php =================================================================== --- trunk/src/dbpedia-navigator/index-new.php (rev 0) +++ trunk/src/dbpedia-navigator/index-new.php 2008-07-21 18:07:39 UTC (rev 1014) @@ -0,0 +1,274 @@ +<?php + +ini_set('error_reporting',E_ALL); +ini_set('max_execution_time',200); +ini_set("soap.wsdl_cache_enabled","1"); + +session_start(); +require_once('DLLearnerConnection.php'); +$sc=new DLLearnerConnection(); +$ids=$sc->getIDs(); +$_SESSION['id']=$ids[0]; +$_SESSION['ksID']=$ids[1]; + +if (isset($_GET['path'])) $path=$_GET['path']; +else $path=""; + +require_once('Settings.php'); +$settings=new Settings(); + +/* +//what happens onLoad +$onLoad="onLoad=\""; +if (isset($_GET['resource'])){ + $onLoad.="xajax_getarticle('".$_GET['resource']."',-1);"; + unset($_GET['resource']); +} +else if (isset($_SESSION['currentArticle'])){ + $onLoad.="xajax_getarticle('',".$_SESSION['currentArticle'].");"; +} +$onLoad.="\""; +*/ + +echo '<?xml version="1.0" encoding="UTF-8"?>'; +?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <title>DBpedia Navigator</title> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> + <link rel="stylesheet" href="<?php print $path;?>default.css"/> + <link rel="stylesheet" type="text/css" href="<?php print $path;?>treemenu/dhtmlxtree.css"> + <script src="http://maps.google.com/maps?file=api&v=2&key=<?php print $settings->googleMapsKey;?>" + type="text/javascript"></script> + <script src="<?php print $path;?>treemenu/dhtmlxcommon.js"></script> + <script src="<?php print $path;?>treemenu/dhtmlxtree.js"></script> + <script type="text/javascript"> + function showdiv(id){ + document.getElementById(id).style.display='block'; + } + + function hidediv(id) { + document.getElementById(id).style.display='none'; + } + + function loadGoogleMap(Lat,Lng,Label) { + if (document.getElementById("map").style.display=="none"){ + document.getElementById("map").style.display='block'; + if (GBrowserIsCompatible()) { + // Create and Center a Map + var map = new GMap2(document.getElementById("map")); + map.setCenter(new GLatLng(Lat, Lng), 12); + map.addControl(new GLargeMapControl()); + map.addControl(new GMapTypeControl()); + var marker=new GMarker(new GLatLng(Lat, Lng)); + GEvent.addListener(marker, "click", function() { + marker.openInfoWindowHtml(Label); + }); + map.addOverlay(marker); + } + } + else { + document.getElementById("map").style.display='none'; + } + } + + function get_article(param) + { + if (document.all){ + //IE + var XhrObj = new ActiveXObject("Microsoft.XMLHTTP"); + } + else{ + //Mozilla + var XhrObj = new XMLHttpRequest(); + } + + XhrObj.open("POST",'ajax_get_article.php'); + + XhrObj.onreadystatechange = function() + { + if (XhrObj.readyState == 4 && XhrObj.status == 200){ + var response = XhrObj.responseText.split('$$'); + document.getElementById('articlecontent').innerHTML=response[0]; + document.getElementById('ArticleTitle').innerHTML=response[1]; + document.getElementById('lastarticles').innerHTML=response[2]; + document.getElementById('Positives').innerHTML=response[3]; + document.getElementById('Negatives').innerHTML=response[4]; + } + } + + XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); + XhrObj.send(param); + } + </script> + </head> + <body> + +<!-- <h1>DBpedia Navigator</h1> --> +<div><table border="0" width="100%"><tr><td width="35%"><img src="<?php print $path;?>images/dbpedia_navigator.png" alt="DBpedia Navigator" style="padding:5px" /></td><td width="50%"><span id="conceptlink"></span></td><td width="15%"><span id="Loading" style="display:none">Server Call... <img src="<?php print $path;?>images/remove.png" onclick="xajax_stopServerCall();return false;" /></span></td></tr></table></div> +<div id="layer" style="display:none"> + <div id="layerContent" style="display:none"></div> +</div> + +<div id="wrapper"> + <div id="leftSidebar"> + + <div class="box"> + <div class="boxtitle">Search DBpedia</div> + <div class="boxcontent" id="search"> + <!-- Search:<br/> --> + <form onSubmit="get_article('label='+document.getElementById('label').value+'&cache=-1');return false;"> + <input type="text" name="label" id="label" /><br/> + <input type="button" value="Article" class="button" onclick="get_article('label='+document.getElementById('label').value+'&cache=-1');return false;" /> <input type="button" value="Search" class="button" onclick="var list=tree.getAllChecked();return false;" /> + <!-- <input type="button" value="Fulltext" class="button" onclick=""/> --> + </form> + </div> <!-- boxcontent --> + </div> <!-- box --> + + <div class="box" id="SearchResultBox" style="display:none"> + <div class="boxtitle">Search Results</div> + <div class="boxcontent"> + <div id="searchcontent" style="display:block"></div> + </div> <!-- boxcontent --> + </div> <!-- box --> + + <div class="box" id="NavigationBox"> + <div class="boxtitle">Navigate</div> + <div class="boxcontent"> + <div id="treeboxbox_tree" style="height:218px;overflow:auto;"> + </div> + </div> <!-- boxcontent --> + </div> <!-- box --> + <script> + tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); + tree.setImagePath("<?php print $path;?>images/csh_bluebooks/"); + tree.enableCheckBoxes(1); + tree.setOnClickHandler(doOnClick); + function doOnClick(nodeId){ + var myUrl = tree.getUserData(nodeId,"myurl"); + xajax_getSubjectsFromConcept(myUrl); + } + tree.setXMLAutoLoading("processTreeMenu.php"); + tree.loadXML("processTreeMenu.php?id=0"); + </script> + + + <div class="box" id="credits"> + <p>DBpedia Navigator is powered by ... <br /> + <a href="http://dl-learner.org">DL-Learner</a><br /> + <a href="http//dbpedia.org">DBpedia</a><br/> + <a href="http://virtuoso.openlinksw.com/wiki/main/">OpenLink Virtuoso</a><br /> + ... and implemented by <a href="http://jens-lehmann.org">Jens Lehmann</a> and + Sebastian Knappe at the <a href="http:/aksw.org">AKSW</a> research group (University of Leipzig).</p> + + <a href="http://www.w3.org/2004/OWL/"><img src="<?php print $path;?>images/sw-owl-green.png" alt="OWL logo" /></a> + <a href="http://www.w3.org/2001/sw/DataAccess/"><img src="<?php print $path;?>images/sw-sparql-green.png" alt="SPARQL logo"/></a> + </div> + + </div><!-- END leftSidebar --> + + <div id="content"> + <div class="box"> + <div class="boxtitle" id="ArticleTitle">Welcome</div> + <div class="boxcontent" id="article"> + <div id="articlecontent" style="display:block"> + <br /><br /> + Welcome to the DBpedia Navigator interface! DBpedia Navigator allows you to search DBpedia + and uses the background knowledge in DBpedia to suggest possible interesting navigation + links. + </div> + </div> <!-- boxcontent --> + </div> <!-- box --> + </div><!-- content --> + + <div id="rightSidebar"> + + <div class="box"> + <div class="boxtitlewithbutton" id="positivesboxtitle">search relevant <img src="<?php print $path;?>images/remove.png" onclick="xajax_clearPositives()" /> </div> + <div class="boxcontent" id="Positives"> + </div> <!-- boxcontent --> + </div> <!-- box --> + + <div class="box"> + <div class="boxtitlewithbutton" id="negativesboxtitle">not relevant <img src="<?php print $path;?>images/remove.png" onclick="xajax_clearNegatives()" /> </div> + <div class="boxcontent" id="Negatives"> + </div> <!-- boxcontent --> + </div> <!-- box --> + + <div class="box" id="LastArticlesBox" style="display:none"> + <div class="boxtitle">Articles Last Viewed</div> + <div class="boxcontent" id="lastarticles"> + </div> <!-- boxcontent --> + </div> <!-- box --> + + </div><!-- rightSidebar --> + + <!-- <div id="clear"></div> --> + +</div><!-- wrapper --> +<div id="footer"> + <p>Licensed under the GNU General Public License (GPL) 3 as part of the DL-Learner open source + project.<br />Copyright © Jens Lehmann 2007-2008 </p> + <div id="validation"> + <?php + $uri = 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; + + echo '<div><a href="http://validator.w3.org/check?uri='.$uri.'"'; + echo '><img src="'.$path.'images/valid-xhtml10.png" alt="valid XHTML 1.0" /></a>'."\n"; + echo '<a href="http://jigsaw.w3.org/css-validator/validator?uri='.$uri.'"'; + echo '><img src="'.$path.'images/valid-css.png" alt="valid CSS" /></a></div>'."\n"; + ?> + </div> + <p><a href='<?php print $path;?>rebuild.php'>rebuild [restart session and redownload WSDL file (for debugging)]</a></p> +</div> + +<div id="todo"> +<b>ToDo:</b> +<ul style="float:left"> + <li>Get learning component fast.</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> + <li>Improve stability: Fix sometimes occurring PHP errors and warnings (check PHP error log).</li> + <li>For each result, display a "+" which shows more information about the concept in an overlay box, e.g. its + Description Logic or OWL syntax, its classification accuracy on the examples, and which + examples it classifies (in-)correctly.</li> + <li>Create a small number of test cases (e.g. 3), which can be used to verify that DBpedia Navigator is + working in typical scenarios (in particular cases where concepts with length greater one are learned).</li> + <li>Allow to disable caching functionality (in Settings.php).</li> + <li>Make DBpedia Navigator RESTful, e.g. URLs $base/showArticle/$URL for displaying an article; + $base/search/$phrase for searching; $base/listInstances/$complexClass for listing the instances of + a learned. Maybe session variables (in particuar the selected positive and negative examples) can + also be given, e.g. $base/search/$phrase?positives=[$URL1,$URL2,$URL3]&negatives=[$URL4]. The supported + URI design should be briefly documented (e.g. on a dbpedia.org wiki page). A good URI design allows + easier external access (just give someone a link instead of saying exactly which actions have to be done to + get to a state), simplifies debugging the application, and may be of use for creating further + features.</li> + <li>Improve search functionality [we will probably get feedback from Georgi in February].</li> + <li>[maybe] Display a tag cloud similar to <a href="http://dbpedia.org/search/">DBpedia search</a>.</li> + <li>[maybe] Instead of only allowing a search as entry point to the application, also display + a navigatable class tree.</li> + <li>[if possible] When expensive SPARQL queries or learning problems have been posed, there should be + some way to abandon these if the user has already switched to doing something else. Example: The user + has added 3 positive and 1 negative examples. This is executed as a learning problem, but has no solution (so + DL-Learner would run forever unless we pose some internal time limit). The user adds another negative example a + second later, so instead of letting the previous learning problem run for a long time (and needing much resources), + it should be stopped by DBpedia Navigator.</li> + <li>[if possible] Find an easy way to validate HTML/JS in AJAX applications.</li> + <li>[maybe] Would be interesting to somehow view the Wikipedia article (without the left navigation part, + tabs etc.) as an overlay, because the Wikipedia article will almost always be a human-friendlier + description of an object compared to the extracted one.</li> +</ul> +</div> + + <div class="box" id="ConceptBox" style="position:absolute;top:15px;right:15px;width:18%;opacity:0.90;display:none;z-index:5;"> + <div class="boxtitle">Detailed Concept Information</div> + <div class="boxcontent" id="ConceptInformation"></div> + </div> + + </body> +</html> + \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |