From: <sk...@us...> - 2007-10-19 09:52:28
|
Revision: 249 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=249&view=rev Author: sknappe Date: 2007-10-19 02:52:23 -0700 (Fri, 19 Oct 2007) Log Message: ----------- new version Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2007-10-19 09:47:16 UTC (rev 248) +++ trunk/src/dbpedia-navigator/index.php 2007-10-19 09:52:23 UTC (rev 249) @@ -7,37 +7,66 @@ ini_set('error_reporting',E_ALL); ini_set('max_execution_time',200); -$lastAction="View"; $content=""; -$possibleActions=""; -$instances=" "; -$left=""; -$right=""; -$middle=""; $search=""; -$system=""; +$examples=""; +$positiveAdd=""; +$negativeAdd=""; -$settings=new Settings(); +$settings=new Settings(); echo "<a href='index.php?clearsession=clear'>start from scratch</a>"; -if(isset($_GET['clearsession']))$_SESSION['State_ID'] =false; +if(isset($_GET['clearsession'])){ + unset($_SESSION['positive']); + unset($_SESSION['negative']); +} - - -if( (!isset($_SESSION['State_ID'] ) ) || ($_SESSION['State_ID']=="")) -{ - //get new ID - $sc=new SparqlConnection($settings->dbpediauri,$settings->wsdluri); - $_SESSION['State_ID']=$sc->getID(); - -} - -else{ - //echo "Current ID is: ".$_SESSION['Learner_ID']."<br>"; - $sc=new SparqlConnection($settings->dbpediauri,$settings->wsdluri,$_SESSION['State_ID']); -} - - +$sc=new SparqlConnection($settings->dbpediauri,$settings->wsdluri); + +//add positives or negatives to session +if (@$_GET['action']=='AddPositive'){ + $_GET=$_SESSION["lastGet"]; + if (!isset($_SESSION['positive'])){ + $array=array($_GET['subject']); + $_SESSION['positive']=$array; + } + else{ + $array=$_SESSION['positive']; + $array[]=$_GET['subject']; + $_SESSION['positive']=$array; + } +} +if (@$_GET['action']=='AddNegative'){ + $_GET=$_SESSION["lastGet"]; + if (!isset($_SESSION['negative'])){ + $array=array($_GET['subject']); + $_SESSION['negative']=$array; + } + else{ + $array=$_SESSION['negative']; + $array[]=$_GET['subject']; + $_SESSION['negative']=$array; + } +} +if (@$_GET['action']=='ClearPositive'){ + $_GET=$_SESSION["lastGet"]; + unset($_SESSION['positive']); +} +if (@$_GET['action']=='ClearNegative'){ + $_GET=$_SESSION["lastGet"]; + unset($_SESSION['negative']); +} + +//learn a concept +if (@$_GET['action']=="GetConcept") +{ + $_GET=$_SESSION["lastGet"]; + $conc=$sc->getConceptFromExamples($_SESSION['positive'],$_SESSION['negative']); + $_SESSION['learnedConcept']=$conc; +} +if (isset($_SESSION['learnedConcept'])) $learnedConcept="<br/>Last learned Concept: ".$_SESSION['learnedConcept']; +else $learnedConcept=""; + //SearchBox $search="<form action=\"index.php\" method=\"GET\">\n". "<table border=\"0\">\n". @@ -70,17 +99,51 @@ foreach ($triples as $triple){ $content.="Subject: ".urldecode($triple[0])."<br/>Predicate: ".urldecode($triple[1])."<br/>Object: ".urldecode($triple[2])."<br/><br/>\n"; } - } + $positiveAdd="<input type=\"submit\" name=\"action\" value=\"AddPositive\">"; + $negativeAdd="<input type=\"submit\" name=\"action\" value=\"AddNegative\">"; + } + +//add box for adding articles to positive or negative + $examples.="<form action=\"index.php\" method=\"GET\">\n". + "Positive:<br/>\n"; + if (!isset($_SESSION['positive'])) $examples.="No positive example picked yet.<br/>\n"; + else{ + $pos=$_SESSION['positive']; + foreach ($pos as $p) + { + $examples.=$p."<br/>\n"; + } + } + $examples.="<br/>".$positiveAdd." <input type=\"submit\" name=\"action\" value=\"ClearPositive\">\n". + "</form>\n"; + + $examples.="<form action=\"index.php\" method=\"GET\">\n". + "<br/>Negative:<br/>\n"; + if (!isset($_SESSION['negative'])) $examples.="No negative example picked yet.<br/>\n"; + else{ + $neg=$_SESSION['negative']; + foreach ($neg as $n) + { + $examples.=$n."<br/>\n"; + } + } + $examples.="<br/>".$negativeAdd." <input type=\"submit\" name=\"action\" value=\"ClearNegative\">\n". + "</form>\n"; + +//fill concept box + $concept="<form action=\"index.php\" method=\"GET\">\n". + "<input type=\"submit\" name=\"action\" value=\"GetConcept\">\n". + "</form>\n"; + $concept.=$learnedConcept; - +//include master + $_SESSION['lastGet']=$_GET; include("master.php"); echo $masterContent; - - - - - + + + //make a box function makeBox($title,$content,$toggleBoxContent=true) { if($toggleBoxContent) @@ -97,14 +160,4 @@ </div> <!-- box -->"; return $ret; } - - - function shorten($a) - { - if(($strpos=strpos($a,'#'))>=4){ - return substr($a,$strpos); - } - else {return $a;} - } - ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-02-07 20:33:53
|
Revision: 524 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=524&view=rev Author: sknappe Date: 2008-02-07 12:33:47 -0800 (Thu, 07 Feb 2008) Log Message: ----------- bugfix Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-02-07 20:08:25 UTC (rev 523) +++ trunk/src/dbpedia-navigator/index.php 2008-02-07 20:33:47 UTC (rev 524) @@ -105,13 +105,13 @@ <div id="rightSidebar"> <div class="box"> - <div class="boxtitlewithbutton" id="positivesboxtitle">search relevant <img src="images/remove.png" onclick="xajax_clearPositives()" /> </div> + <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="images/remove.png" onclick="xajax_clearNegatives()" /> </div> + <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 --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-02-13 10:36:32
|
Revision: 555 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=555&view=rev Author: sknappe Date: 2008-02-13 02:36:25 -0800 (Wed, 13 Feb 2008) Log Message: ----------- minor display changes Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-02-13 10:26:52 UTC (rev 554) +++ trunk/src/dbpedia-navigator/index.php 2008-02-13 10:36:25 UTC (rev 555) @@ -39,6 +39,8 @@ }; hideLoading = function() { xajax.$('Loading').style.display = 'none'; + xajax.$('SearchResultBox').style.display = 'block'; + xajax.$('LastArticlesBox').style.display = 'block'; }; </script> </head> @@ -65,7 +67,7 @@ </div> <!-- boxcontent --> </div> <!-- box --> - <div class="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> @@ -116,7 +118,7 @@ </div> <!-- boxcontent --> </div> <!-- box --> - <div class="box"> + <div class="box" id="LastArticlesBox" style="display:none"> <div class="boxtitle">Articles Last Viewed</div> <div class="boxcontent" id="lastarticles"> </div> <!-- boxcontent --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-02-27 12:45:06
|
Revision: 652 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=652&view=rev Author: sknappe Date: 2008-02-27 04:32:58 -0800 (Wed, 27 Feb 2008) Log Message: ----------- modified style of menu a bit Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-02-27 12:03:57 UTC (rev 651) +++ trunk/src/dbpedia-navigator/index.php 2008-02-27 12:32:58 UTC (rev 652) @@ -119,17 +119,19 @@ <div class="box" id="NavigationBox"> <div class="boxtitle">Navigate</div> <div class="boxcontent"> - <div id="treeboxbox_tree" style="width:250; height:218;background-color:#f5f5f5;border :1px solid Silver;; overflow:auto;"> - <script> + <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.setXMLAutoLoading("processTreeMenu.php"); tree.loadXML("processTreeMenu.php?id=0"); - </script> - </div> - </div> <!-- boxcontent --> - </div> <!-- box --> - + </script> + + <div class="box" id="credits"> <p>DBpedia Navigator is powered by ... <br /> <a href="http://dl-learner.org">DL-Learner</a><br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-02-29 10:56:34
|
Revision: 670 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=670&view=rev Author: sknappe Date: 2008-02-29 02:56:30 -0800 (Fri, 29 Feb 2008) Log Message: ----------- searchbox not shown Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-02-29 09:17:28 UTC (rev 669) +++ trunk/src/dbpedia-navigator/index.php 2008-02-29 10:56:30 UTC (rev 670) @@ -52,7 +52,7 @@ }; hideLoading = function() { xajax.$('Loading').style.display = 'none'; - xajax.$('SearchResultBox').style.display = 'block'; + //xajax.$('SearchResultBox').style.display = 'block'; xajax.$('LastArticlesBox').style.display = 'block'; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sk...@us...> - 2008-05-14 15:18:24
|
Revision: 844 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=844&view=rev Author: sknappe Date: 2008-05-14 08:18:05 -0700 (Wed, 14 May 2008) Log Message: ----------- Modified Paths: -------------- trunk/src/dbpedia-navigator/index.php Modified: trunk/src/dbpedia-navigator/index.php =================================================================== --- trunk/src/dbpedia-navigator/index.php 2008-05-14 15:16:41 UTC (rev 843) +++ trunk/src/dbpedia-navigator/index.php 2008-05-14 15:18:05 UTC (rev 844) @@ -241,10 +241,7 @@ <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> - <li>Handle redirect for example if you look for 'Deutschland'</li> - <li>Ich habe mir gestern deswegen mal angeschaut welche fertigen SPARQL-APIs es gibt. Eine der verbreitesten und deshalb auch aktiven Projekt ist Jena. F�r uns relevant ist das ARQ-Teilprojekt: http://jena.sourceforge.net/ARQ/. - </li> + description of an object compared to the extracted one.</li> </ul> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |