From: <sk...@us...> - 2008-08-21 10:48:30
|
Revision: 1117 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1117&view=rev Author: sknappe Date: 2008-08-21 10:48:27 +0000 (Thu, 21 Aug 2008) Log Message: ----------- changed learning and concept display a bit, not final yet Modified Paths: -------------- trunk/src/dbpedia-navigator/DLLearnerConnection.php trunk/src/dbpedia-navigator/ajax_get_article.php trunk/src/dbpedia-navigator/ajax_learn_concepts.php trunk/src/dbpedia-navigator/css/default.css trunk/src/dbpedia-navigator/index.php trunk/src/dbpedia-navigator/js/ajax.js Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-08-21 10:48:27 UTC (rev 1117) @@ -109,7 +109,7 @@ $this->client->stop($this->id); } //return $concepts->item; - return $concepts; + return json_decode($concepts,true); } function getConceptDepth() Modified: trunk/src/dbpedia-navigator/ajax_get_article.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_get_article.php 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/ajax_get_article.php 2008-08-21 10:48:27 UTC (rev 1117) @@ -168,6 +168,7 @@ unset($triples['http://dbpedia.org/property/lonMin']); unset($triples['http://dbpedia.org/property/latDeg']); unset($triples['http://dbpedia.org/property/lonMin']); + unset($triples['http://www.georss.org/georss/point']); if (count($triples)>0){ @@ -243,6 +244,4 @@ print $lat; print '$$'; print $long; - - //$objResponse->call('xajax_learnConcept'); ?> \ No newline at end of file Modified: trunk/src/dbpedia-navigator/ajax_learn_concepts.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_learn_concepts.php 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/ajax_learn_concepts.php 2008-08-21 10:48:27 UTC (rev 1117) @@ -25,16 +25,9 @@ $sc=new DLLearnerConnection($id, $ksID); try{ $concepts=$sc->getConceptFromExamples($posArray,$negArray); - $conceptDepth=$sc->getConceptDepth(); - $conceptArity=$sc->getConceptArity(); - $concept.="<table border=0>\n"; - $i=1; foreach ($concepts as $con){ - $concept.="<tr><td><a href=\"\" onclick=\"getSubjectsFromConcept('concept=".$con."');return false;\" onMouseOver=\"showdiv('div".$i."');showdiv('ConceptBox');\" onMouseOut=\"hidediv('div".$i."');hidediv('ConceptBox');\" />".$con."</a></td></tr>"; - //put information about concepts in divs - $conceptinformation.="<div id=\"div".$i."\" style=\"display:none\">Concept Depth: ".$conceptDepth[$i-1]."<br/>Concept Arity: ".$conceptArity[$i-1]."<br/>Concept Length: ".$sc->getConceptLength($con)."</div>"; - $i++; + $concept.="<tr><td><a href=\"\" onclick=\"getSubjectsFromConcept('concept=".$con['descriptionManchesterSyntax']."');return false;\" />".$con['descriptionManchesterSyntax']."</a> (Accuracy: ".(floatVal($con['accuracy'])*100)."%)</td></tr>"; } $concept.="</table>"; } catch(Exception $e){ @@ -44,6 +37,4 @@ else $concept="You must choose at least one positive example."; print $concept; - print '$$'; - print $conceptinformation; ?> \ No newline at end of file Modified: trunk/src/dbpedia-navigator/css/default.css =================================================================== --- trunk/src/dbpedia-navigator/css/default.css 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/css/default.css 2008-08-21 10:48:27 UTC (rev 1117) @@ -48,7 +48,7 @@ /*margin: 0 19em;*/ overflow: hidden; /*width: 10%;*/ - width: 60%; + width: 63%; float: left; margin-left: 3px; margin-right: 3px; Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/index.php 2008-08-21 10:48:27 UTC (rev 1117) @@ -109,7 +109,15 @@ <body <?php print $onLoad;?>> <!-- <h1>DBpedia Navigator</h1> --> -<div><table border="0" width="100%"><tr><td width="35%"><img src="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... <a href=""><img src="images/remove.png" onclick="stopServerCall();return false;" /></a></span></td></tr></table></div> +<div><table border="0" width="100%"><tr><td width="30%"><img src="images/dbpedia_navigator.png" alt="DBpedia Navigator" style="padding:5px" /></td> +<td width="49%"> + <div class="box" id="ConceptBox" style="display:none"> + <div class="boxtitle" style="cursor:help;" title="Browsing suggestions considering search relevant and not relevant articles.">Navigation Suggestions</div> + <div class="boxcontent"> + <div id="conceptlink" style="display:block"></div> + </div> <!-- boxcontent --> + </div> <!-- box --> +</td><td width="19%"><span id="Loading" style="display:none">Server Call... <a href=""><img src="images/remove.png" onclick="stopServerCall();return false;" /></a></span></td></tr></table></div> <div id="layer" style="display:none"> <div id="layerContent" style="display:none"></div> </div> @@ -244,11 +252,6 @@ </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 Modified: trunk/src/dbpedia-navigator/js/ajax.js =================================================================== --- trunk/src/dbpedia-navigator/js/ajax.js 2008-08-21 08:19:58 UTC (rev 1116) +++ trunk/src/dbpedia-navigator/js/ajax.js 2008-08-21 10:48:27 UTC (rev 1117) @@ -52,14 +52,15 @@ document.getElementById('Positives').innerHTML=response[3]; document.getElementById('Negatives').innerHTML=response[4]; setRunning(false); + if (response[5].length>0&&response[6].length>0) + loadGoogleMap(response[5],response[6],''+response[1]); if (response[1]=='Article not found'){ setTimeout("search_it('label='+document.getElementById('label').value+'&number=10')",2000); } else document.getElementById('LastArticlesBox').style.display='block'; + setTimeout('setRunning(true);learnConcept();',1000); } - if (response[5].length>0&&response[6].length>0) - loadGoogleMap(response[5],response[6],''+response[1]); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); @@ -264,7 +265,8 @@ if (XhrObj.readyState == 4 && XhrObj.status == 200){ var response = XhrObj.responseText.split('$$'); document.getElementById('conceptlink').innerHTML=response[0]; - document.getElementById('ConceptInformation').innerHTML=response[1]; + document.getElementById('ConceptBox').style.display='block'; + setRunning(false); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |