From: <sk...@us...> - 2008-10-01 16:31:19
|
Revision: 1336 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1336&view=rev Author: sknappe Date: 2008-10-01 16:30:50 +0000 (Wed, 01 Oct 2008) Log Message: ----------- some cahnges 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/helper_functions.php trunk/src/dbpedia-navigator/index.php trunk/src/dbpedia-navigator/js/ajax.js Added Paths: ----------- trunk/src/dbpedia-navigator/images/favicon.ico Modified: trunk/src/dbpedia-navigator/DLLearnerConnection.php =================================================================== --- trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/DLLearnerConnection.php 2008-10-01 16:30:50 UTC (rev 1336) @@ -71,6 +71,8 @@ $this->client->applyConfigEntryBoolean($this->id, $algorithmID, "forceRefinementLengthIncrease", true); $this->client->applyConfigEntryBoolean($this->id, $algorithmID, "useHasValueConstructor", true); $this->client->applyConfigEntryInt($this->id, $algorithmID, "valueFrequencyThreshold", 2); + $this->client->applyConfigEntryInt($this->id, $algorithmID, "guaranteeXgoodDescriptions", 3); + $this->client->applyConfigEntryInt($this->id, $algorithmID, "maxExecutionTimeInSeconds", 3); $this->client->applyConfigEntryBoolean($this->id, $algorithmID, "useNegation", false); $this->client->applyConfigEntryBoolean($this->id, $algorithmID, "useAllConstructor", false); $start = microtime(true); Modified: trunk/src/dbpedia-navigator/ajax_get_article.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_get_article.php 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/ajax_get_article.php 2008-10-01 16:30:50 UTC (rev 1336) @@ -108,12 +108,11 @@ $content.='</ul>'; } - // display a list of classes - $content.='<br/><hr><h4>YAGO Classes</h4><br/>'; - - - if(isset($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'])) + if(isset($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type'])){ + // display a list of classes + $content.='<br/><hr><h4>YAGO Classes</h4><br/>'; $content .= '<p>'.formatClassArray($triples['http://www.w3.org/1999/02/22-rdf-syntax-ns#type']).'</p>'; + } //skos-subjects //not used, because one class systems, YAGO, is enough Modified: trunk/src/dbpedia-navigator/ajax_learn_concepts.php =================================================================== --- trunk/src/dbpedia-navigator/ajax_learn_concepts.php 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/ajax_learn_concepts.php 2008-10-01 16:30:50 UTC (rev 1336) @@ -15,7 +15,7 @@ setRunning($id,"true"); $concept=""; $conceptinformation=""; - if (isset($positives)) + if (isset($positives)&&count($positives)>0) { $posArray=array(); foreach ($positives as $name=>$lab) @@ -107,7 +107,7 @@ foreach ($concepts as $conc){ foreach ($conc as $con){ $label=$sc->getNaturalDescription($con['descriptionKBSyntax']); - $concept.="<tr><td><a href=\"\" onclick=\"getSubjectsFromConcept('kb=".htmlentities($con['descriptionKBSyntax'])."&number=10');return false;\" />".$label."</a> (Accuracy: ".(floatVal($con['accuracy'])*100)."%)</td></tr>"; + $concept.="<tr><td><a href=\"\" onclick=\"getSubjectsFromConcept('kb=".htmlentities($con['descriptionKBSyntax'])."&number=10');return false;\" />".$label."</a> (accuracy: ".(floatVal($con['accuracy'])*100)."%)</td></tr>"; } } $concept.="</table>"; Modified: trunk/src/dbpedia-navigator/helper_functions.php =================================================================== --- trunk/src/dbpedia-navigator/helper_functions.php 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/helper_functions.php 2008-10-01 16:30:50 UTC (rev 1336) @@ -366,7 +366,12 @@ $query="SELECT label FROM categories WHERE category='".$ar[$i]['value']."' LIMIT 1"; $res=$databaseConnection->query($query); $result=$databaseConnection->nextEntry($res); - $string .= '<li>' . formatClass($ar[$i]['value'],$result['label']).'</li>'; + $label=urldecode(str_replace("_"," ",substr (strrchr ($ar[$i]['value'], "/"), 1))); + if (strlen($result['label'])>strlen($label)-3||preg_match('/[0-9]/',$label)===1){ + $label=$result['label']; + } + $label=utf8_to_html($label); + $string .= '<li>' . formatClass($ar[$i]['value'],$label).'</li>'; } return $string."</ul>"; } Property changes on: trunk/src/dbpedia-navigator/images/favicon.ico ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/index.php 2008-10-01 16:30:50 UTC (rev 1336) @@ -145,7 +145,6 @@ </div><!-- wrapper --> <div id="footer"> <div id="generatedURL"></div> - <input type="button" class="button" value="generate URL" onclick="generateURL();"/> <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"> Modified: trunk/src/dbpedia-navigator/js/ajax.js =================================================================== --- trunk/src/dbpedia-navigator/js/ajax.js 2008-10-01 13:04:47 UTC (rev 1335) +++ trunk/src/dbpedia-navigator/js/ajax.js 2008-10-01 16:30:50 UTC (rev 1336) @@ -26,6 +26,7 @@ if (XhrObj.readyState == 4){ setDatabaseRunning(false); } + generateURL(); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); @@ -64,6 +65,7 @@ learnConcept(); }else setTimeout("search_it('label='+document.getElementById('label').value+'&number=10')",2000); } + generateURL(); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); @@ -95,6 +97,7 @@ } if (XhrObj.readyState == 4) setDatabaseRunning(false); + generateURL(); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); @@ -337,6 +340,7 @@ document.getElementById('SearchResultBox').style.display='block'; } } + generateURL(); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); @@ -370,6 +374,7 @@ } if (XhrObj.readyState == 4) setDatabaseRunning(false); + generateURL(); } XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |