You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(120) |
Sep
(36) |
Oct
(116) |
Nov
(17) |
Dec
(44) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(143) |
Feb
(192) |
Mar
(74) |
Apr
(84) |
May
(105) |
Jun
(64) |
Jul
(49) |
Aug
(120) |
Sep
(159) |
Oct
(156) |
Nov
(51) |
Dec
(28) |
2009 |
Jan
(17) |
Feb
(55) |
Mar
(33) |
Apr
(57) |
May
(54) |
Jun
(28) |
Jul
(6) |
Aug
(16) |
Sep
(38) |
Oct
(30) |
Nov
(26) |
Dec
(52) |
2010 |
Jan
(7) |
Feb
(91) |
Mar
(65) |
Apr
(2) |
May
(14) |
Jun
(25) |
Jul
(38) |
Aug
(48) |
Sep
(80) |
Oct
(70) |
Nov
(75) |
Dec
(77) |
2011 |
Jan
(68) |
Feb
(53) |
Mar
(51) |
Apr
(35) |
May
(65) |
Jun
(101) |
Jul
(29) |
Aug
(230) |
Sep
(95) |
Oct
(49) |
Nov
(110) |
Dec
(63) |
2012 |
Jan
(41) |
Feb
(42) |
Mar
(25) |
Apr
(46) |
May
(51) |
Jun
(44) |
Jul
(45) |
Aug
(29) |
Sep
(12) |
Oct
(9) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(12) |
Feb
(14) |
Mar
(7) |
Apr
(16) |
May
(54) |
Jun
(27) |
Jul
(11) |
Aug
(5) |
Sep
(85) |
Oct
(27) |
Nov
(37) |
Dec
(32) |
2014 |
Jan
(8) |
Feb
(29) |
Mar
(5) |
Apr
(3) |
May
(22) |
Jun
(3) |
Jul
(4) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <jen...@us...> - 2007-08-22 17:53:57
|
Revision: 27 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=27&view=rev Author: jenslehmann Date: 2007-08-22 10:53:45 -0700 (Wed, 22 Aug 2007) Log Message: ----------- deleted deprecated files in org.dllearner.server Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/server/DLLearnerClientTest.java trunk/src/dl-learner/org/dllearner/server/DLLearnerServer.java Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerClientTest.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerClientTest.java 2007-08-22 17:21:46 UTC (rev 26) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerClientTest.java 2007-08-22 17:53:45 UTC (rev 27) @@ -1,45 +0,0 @@ -package org.dllearner.server; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.UnknownHostException; - -/** - * Testklasse um Ontology Class Learning Interface zu testen. - * - * @author jl - * - */ -public class DLLearnerClientTest { - - /** - * @param args - */ - public static void main(String[] args) { - Socket server = null; - - try { - server = new Socket("localhost", 3141); - InputStream in = server.getInputStream(); - OutputStream out = server.getOutputStream(); - - out.write(4); - out.write(9); - int result = in.read(); - System.out.println(result); - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (server != null) - try { - server.close(); - } catch (IOException e) { - } - } - } - -} Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerServer.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerServer.java 2007-08-22 17:21:46 UTC (rev 26) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerServer.java 2007-08-22 17:53:45 UTC (rev 27) @@ -1,46 +0,0 @@ -package org.dllearner.server; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.ServerSocket; -import java.net.Socket; - -public class DLLearnerServer { - - private static void handleConnection(Socket client) throws IOException { - InputStream in = client.getInputStream(); - OutputStream out = client.getOutputStream(); - - int factor1 = in.read(); - int factor2 = in.read(); - - out.write(factor1 * factor2); - } - - /** - * @param args - */ - public static void main(String[] args) throws IOException { - // TODO Auto-generated method stub - ServerSocket server = new ServerSocket(3141); - - while (true) { - Socket client = null; - - try { - client = server.accept(); - handleConnection(client); - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (client != null) - try { - client.close(); - } catch (IOException e) { - } - } - } - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 17:21:48
|
Revision: 26 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=26&view=rev Author: kurzum Date: 2007-08-22 10:21:46 -0700 (Wed, 22 Aug 2007) Log Message: ----------- screenshot php_client father ontology Added Paths: ----------- trunk/resources/screenshots/ trunk/resources/screenshots/php_client_beginning.jpg trunk/resources/screenshots/php_client_learned_something.jpg trunk/resources/screenshots/php_client_ontology_loaded.jpg Added: trunk/resources/screenshots/php_client_beginning.jpg =================================================================== (Binary files differ) Property changes on: trunk/resources/screenshots/php_client_beginning.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/resources/screenshots/php_client_learned_something.jpg =================================================================== (Binary files differ) Property changes on: trunk/resources/screenshots/php_client_learned_something.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/resources/screenshots/php_client_ontology_loaded.jpg =================================================================== (Binary files differ) Property changes on: trunk/resources/screenshots/php_client_ontology_loaded.jpg ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 17:10:21
|
Revision: 25 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=25&view=rev Author: kurzum Date: 2007-08-22 10:10:19 -0700 (Wed, 22 Aug 2007) Log Message: ----------- changes to ignore the .svn folder Modified Paths: -------------- trunk/src/php-client/Model.php Modified: trunk/src/php-client/Model.php =================================================================== --- trunk/src/php-client/Model.php 2007-08-22 16:57:44 UTC (rev 24) +++ trunk/src/php-client/Model.php 2007-08-22 17:10:19 UTC (rev 25) @@ -557,7 +557,7 @@ $first= readdir ($verz); $ret=array(); while ($file = readdir ($verz)) - { + { if($file==".svn")continue; $ret[]=$file; } closedir($verz); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-22 16:57:49
|
Revision: 24 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=24&view=rev Author: jenslehmann Date: 2007-08-22 09:57:44 -0700 (Wed, 22 Aug 2007) Log Message: ----------- added architecture figure Added Paths: ----------- trunk/resources/architecture.png trunk/resources/architecture.svg Added: trunk/resources/architecture.png =================================================================== (Binary files differ) Property changes on: trunk/resources/architecture.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/resources/architecture.svg =================================================================== --- trunk/resources/architecture.svg (rev 0) +++ trunk/resources/architecture.svg 2007-08-22 16:57:44 UTC (rev 24) @@ -0,0 +1,350 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://web.resource.org/cc/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg2" + sodipodi:version="0.32" + inkscape:version="0.45" + sodipodi:modified="true"> + <defs + id="defs4"> + <marker + inkscape:stockid="TriangleOutL" + orient="auto" + refY="0.0" + refX="0.0" + id="TriangleOutL" + style="overflow:visible"> + <path + id="path3302" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.8)" /> + </marker> + <marker + inkscape:stockid="TriangleOutM" + orient="auto" + refY="0.0" + refX="0.0" + id="TriangleOutM" + style="overflow:visible"> + <path + id="path3299" + d="M 5.77,0.0 L -2.88,5.0 L -2.88,-5.0 L 5.77,0.0 z " + style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt;marker-start:none" + transform="scale(0.4)" /> + </marker> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0.0" + refX="0.0" + id="Arrow2Lend" + style="overflow:visible;"> + <path + id="path3379" + style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;" + d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z " + transform="scale(1.1) rotate(180) translate(1,0)" /> + </marker> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="0.7" + inkscape:cx="375" + inkscape:cy="520" + inkscape:document-units="px" + inkscape:current-layer="layer1" + inkscape:window-width="1280" + inkscape:window-height="951" + inkscape:window-x="0" + inkscape:window-y="0" /> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.98969221;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect2160" + width="249.01031" + height="89.010307" + x="50.494846" + y="177.64302" /> + <text + xml:space="preserve" + style="font-size:12px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="64.285713" + y="206.6479" + id="text2162"><tspan + sodipodi:role="line" + id="tspan2164" + x="64.285713" + y="206.6479" + style="font-size:18">background knowledge</tspan><tspan + sodipodi:role="line" + x="64.285713" + y="229.1479" + id="tspan2166" + style="font-size:18">(OWL-DL ontology,</tspan><tspan + sodipodi:role="line" + x="64.285713" + y="251.6479" + id="tspan2168" + style="font-size:18">DL knowledge base)</tspan></text> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.06090128;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3167" + width="248.9391" + height="88.939102" + x="400.53046" + y="176.24979" /> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.07453477;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3169" + width="248.92546" + height="88.925468" + x="400.53726" + y="369.87546" /> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.97974563;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3171" + width="249.02025" + height="89.020256" + x="50.489872" + y="369.06635" /> + <rect + style="opacity:0.58500001;fill:#ffd42a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect3173" + width="304.28571" + height="97.14286" + x="191.42856" + y="555.21924" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="411.42856" + y="209.50504" + id="text3175"><tspan + sodipodi:role="line" + id="tspan3177" + x="411.42856" + y="209.50504">positive and negative</tspan><tspan + sodipodi:role="line" + x="411.42856" + y="232.00504" + id="tspan3179">examples</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="81.428574" + y="398.07648" + id="text3181"><tspan + sodipodi:role="line" + id="tspan3183" + x="81.428574" + y="398.07648">Reasoner, e.g.</tspan><tspan + sodipodi:role="line" + x="81.428574" + y="420.57648" + id="tspan3185">Pellet, FaCT, KAON2,</tspan><tspan + sodipodi:role="line" + x="81.428574" + y="443.07648" + id="tspan3423">Racer Pro</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="431.42856" + y="399.50504" + id="text3187"><tspan + sodipodi:role="line" + id="tspan3189" + x="431.42856" + y="399.50504">concept quality</tspan><tspan + sodipodi:role="line" + x="431.42856" + y="422.00504" + id="tspan3191">measure</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="222.85715" + y="585.21936" + id="text3193"><tspan + sodipodi:role="line" + id="tspan3195" + x="222.85715" + y="585.21936">concept generator, e.g.</tspan><tspan + sodipodi:role="line" + x="222.85715" + y="607.71936" + id="tspan3197">refinement operator bases,</tspan><tspan + sodipodi:role="line" + x="222.85715" + y="630.21936" + id="tspan3201">genetic programming</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="-330.92288" + y="509.11539" + id="text3413" + transform="matrix(2.633324e-3,-0.9999965,0.9999965,2.633324e-3,0,0)"><tspan + sodipodi:role="line" + id="tspan3415" + x="-330.92288" + y="509.11539">use</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.81616569;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.26466269, 3.26466269;stroke-dashoffset:0;stroke-opacity:1" + d="M 162.85714,361.19067 L 162.85714,276.53946" + id="path3419" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.97576565;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.90306258, 3.90306258;stroke-dashoffset:0;stroke-opacity:1" + d="M 395.95553,408.43421 C 365.52641,422.06523 335.22418,433.61629 307.34169,405.51055" + id="path3421" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="-329.63123" + y="152.86742" + id="text3425" + transform="matrix(2.6333242e-3,-0.9999965,0.9999965,2.6333242e-3,0,0)"><tspan + sodipodi:role="line" + id="tspan3427" + x="-329.63123" + y="152.86742">use</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.90932429;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.7279727, 2.7279727;stroke-dashoffset:0;stroke-opacity:1" + d="M 544.48318,465.45996 C 504.89558,458.38783 475.6447,491.54308 451.56873,544.83742" + id="path3451" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.98453361;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.95360103, 2.95360103;stroke-dashoffset:0;stroke-opacity:1" + d="M 475.85156,549.83705 C 521.04331,557.09936 554.43503,523.05257 581.91927,468.32516" + id="path3453" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.81616569;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.26466269, 3.26466269;stroke-dashoffset:0;stroke-opacity:1" + d="M 518.57143,360.85721 L 518.57143,276.206" + id="path3455" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="565.71429" + y="519.50507" + id="text3457"><tspan + sodipodi:role="line" + id="tspan3459" + x="565.71429" + y="519.50507">test</tspan><tspan + sodipodi:role="line" + x="565.71429" + y="542.00507" + id="tspan3461">concept</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="391.42859" + y="498.07648" + id="text3463"><tspan + sodipodi:role="line" + id="tspan3465" + x="391.42859" + y="498.07648">return</tspan><tspan + sodipodi:role="line" + x="391.42859" + y="520.57648" + id="tspan3467">quality</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.94272459;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.82817393, 2.82817393;stroke-dashoffset:0;stroke-opacity:1" + d="M 217.62905,548.94843 C 176.19401,556.21074 145.57809,522.16395 120.37857,467.43654" + id="path3469" + sodipodi:nodetypes="cc" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.91076428;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:2.73229266, 2.73229266;stroke-dashoffset:0;stroke-opacity:1" + d="M 154.30839,465.51986 C 194.02146,458.44773 223.36506,491.60298 247.51734,544.89732" + id="path3471" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="237.14285" + y="490.93359" + id="text3473"><tspan + sodipodi:role="line" + id="tspan3475" + x="237.14285" + y="490.93359">query</tspan><tspan + sodipodi:role="line" + x="237.14285" + y="513.43359" + id="tspan3477">results</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="88.571426" + y="535.21936" + id="text3479"><tspan + sodipodi:role="line" + id="tspan3481" + x="88.571426" + y="535.21936">query</tspan></text> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="314.28571" + y="439.50504" + id="text3485"><tspan + sodipodi:role="line" + id="tspan3487" + x="314.28571" + y="439.50504">instance</tspan><tspan + sodipodi:role="line" + x="314.28571" + y="462.00504" + id="tspan3489">checks</tspan></text> + <path + style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.89501047;stroke-linecap:butt;stroke-linejoin:miter;marker-end:url(#TriangleOutL);stroke-miterlimit:4;stroke-dasharray:3.5800417, 3.5800417;stroke-dashoffset:0;stroke-opacity:1" + d="M 305.42618,385.92792 C 334.98062,374.12036 364.41182,364.11452 391.49283,388.46048" + id="path3491" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-size:18px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + x="318.57144" + y="363.79077" + id="text3493"><tspan + sodipodi:role="line" + id="tspan3495" + x="318.57144" + y="363.79077">results</tspan></text> + </g> +</svg> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-22 15:53:30
|
Revision: 23 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=23&view=rev Author: jenslehmann Date: 2007-08-22 08:53:11 -0700 (Wed, 22 Aug 2007) Log Message: ----------- added resource section with some images Added Paths: ----------- trunk/resources/ trunk/resources/father_example.png trunk/resources/father_example_small.png trunk/resources/logos/ trunk/resources/logos/logo1.png Added: trunk/resources/father_example.png =================================================================== (Binary files differ) Property changes on: trunk/resources/father_example.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/resources/father_example_small.png =================================================================== (Binary files differ) Property changes on: trunk/resources/father_example_small.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/resources/logos/logo1.png =================================================================== (Binary files differ) Property changes on: trunk/resources/logos/logo1.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 10:40:33
|
Revision: 22 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=22&view=rev Author: kurzum Date: 2007-08-22 03:40:32 -0700 (Wed, 22 Aug 2007) Log Message: ----------- update Added Paths: ----------- trunk/src/dl-learner/org/dllearner/server/ClientState.java Added: trunk/src/dl-learner/org/dllearner/server/ClientState.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/ClientState.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/ClientState.java 2007-08-22 10:40:32 UTC (rev 22) @@ -0,0 +1,574 @@ +package org.dllearner.server; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Random; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.Config; +import org.dllearner.ConfigurationManager; +import org.dllearner.ConfigurationOption; +import org.dllearner.Main; +import org.dllearner.OntologyFileFormat; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.dl.AtomicConcept; +import org.dllearner.dl.AtomicRole; +import org.dllearner.dl.Individual; +import org.dllearner.dl.KB; +import org.dllearner.reasoning.Reasoner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; +import org.dllearner.reasoning.ReasoningService; +import org.dllearner.server.exceptions.NoOntologySelectedException; +import org.dllearner.server.exceptions.OntologyURLNotValid; + +import com.hp.hpl.jena.shared.DoesNotExistException; +import com.hp.hpl.jena.shared.JenaException; + +public class ClientState { + + private String reasonerURL="http://localhost:8081"; + //private String reasonerURL="http://localhost:3490"; + + private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); + public SortedSet<Individual> getPosExamples() { return this.positiveExamples;} + + private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); + public SortedSet<Individual> getNegExamples() { return this.negativeExamples;} + + private SortedSet<String> ignoredConcept = new TreeSet<String>(); + + + private Reasoner reasoner; + public Reasoner getReasoner() { return reasoner;} + + private ReasoningService rs; + public ReasoningService getRs() { return rs; } + + private String currentOntologyURL=null; + private boolean debug_flag=true; + private LearnMonitor lm=null; + + private String lastResult=""; + public String getLastResult(){ + try{ + return ROL.getBestSolution().toString(); + }catch (Exception e) {} + return this.lastResult; } + public void setLastResult(String lastResult) {this.lastResult = lastResult;} + + private String status="maiden-like"; + public void setStatus(String status) {this.status = status;} + + ConfigurationManager confMgr; + public void addOption(ConfigurationOption c){confMgr.applyConfigurationOption(c);} + ROLearner ROL; + + public ClientState() { + + + TreeSet<ConfigurationOption> s=new TreeSet<ConfigurationOption>(); + //s.add(new ConfigurationOption("refinement","quiet","true")); + /*s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption());*/ + + confMgr = new ConfigurationManager(s); + addOption(new ConfigurationOption("refinement","quiet","true")); + //confMgr.applyOptions(); + + } + + + + + public void addPositiveExample(String posExample) { + positiveExamples.add(new Individual(posExample)); + p("added pos: "+posExample); + } + + + public void addNegativeExample(String negExample) { + negativeExamples.add(new Individual(negExample)); + p("added neg: "+negExample); + } + + public void addIgnoredConcept(String concept) { + ignoredConcept.add(concept); + p("added ignoredConcepts: "+concept); + } + + public String[] selectInstancesForAConcept(String Concept)throws NoOntologySelectedException{ + if(Concept.endsWith("#Thing"))return new String[]{}; + AtomicConcept SelectedConcept=new AtomicConcept(Concept); + ArrayList<String> al=new ArrayList<String>(); + Individual indtmp=null; + Set ConceptSet=null; + AtomicConcept ac=null; + + + System.out.println("selectInstancesForAConcept: "+Concept); + // add all positives + Set positives=rs.retrieval(SelectedConcept); + Iterator i = positives.iterator(); + while(i.hasNext()){ + indtmp=(Individual)i.next(); + p("added "+indtmp.getName()+" to positives"); + al.add("added "+indtmp.getName()+" to positives"); + positiveExamples.add(indtmp); + } + + //find more general concepts + ArrayList<AtomicConcept> superConcepts=new ArrayList<AtomicConcept>(); + try{ + //ConceptSet = rs.getSubsumptionHierarchy().getMoreGeneralConcepts(new AtomicConcept(Concept)); + //System.out.println(ConceptSet); + //Concept c=new AtomicConcept(Concept); + /*Set<AtomicConcept> s=rs.getAtomicConcepts(); + Set<Concept> sc=new TreeSet<Concept>(); + Iterator a=s.iterator(); + while (a.hasNext()) { + sc.add((Concept) a.next()); + } + sc=rs.subsumes(sc,new AtomicConcept(Concept));*/ + superConcepts=subsumesAll(SelectedConcept); + + //System.out.println("sizebefore: "+"size after:"+sc); + }catch (Exception e) {e.printStackTrace();} + + +// remove top + for (int j = 0; j < superConcepts.size(); ) { + //TODO no unique name assumption? + if(superConcepts.get(j).getName().equals(SelectedConcept.getName())){ + superConcepts.remove(j); + j=0; + continue; + } + if(superConcepts.get(j).getName().equals("TOP")){ + superConcepts.remove(j); + j=0; + continue; + } + j++; + } + + System.out.println("Found all those:"+ superConcepts); + + ac=null; + + if(superConcepts.size()==0){return al2s(al); }//TODO + else + { // add all negatives of all superclasses; + + //Iterator it=ConceptSet.iterator(); + for (int jj = 0; jj < superConcepts.size(); jj++) + { + ac=superConcepts.get(jj); + p("next this: "+ac.getName()); + Set negatives=rs.retrieval(ac); + Iterator i2 = negatives.iterator(); + indtmp=null; + while(i2.hasNext()){ + + indtmp=(Individual)i2.next(); + + if(!positives.contains(indtmp)){ + + p("added "+indtmp.getName()+" to NEGATIVES"); + al.add("added "+indtmp.getName()+" to NEGATIVES"); + negativeExamples.add(indtmp); + } + else{ + p("skipped "+indtmp.getName()); + al.add("skipped "+indtmp.getName()); + } + + } + }//endfor + return al2s(al); + } + + + } + + + + public String[] selectAConcept(String Concept, int Percentage)throws NoOntologySelectedException{ + if(Concept.endsWith("#Thing"))return new String[]{}; + AtomicConcept SelectedConcept=new AtomicConcept(Concept); + ArrayList<String> ret=new ArrayList<String>(); + Individual indtmp=null; + Set ConceptSet=null; + AtomicConcept ac=null; + Random r=new Random(); + + + System.out.println("selectAConcept: "+Concept); + // add all positives + Set positives=rs.retrieval(SelectedConcept); + Iterator i = positives.iterator(); + while(i.hasNext()){ + indtmp=(Individual)i.next(); + p("added "+indtmp.getName()+" to positives"); + ret.add("added "+indtmp.getName()+" to positives"); + positiveExamples.add(indtmp); + } + + //find All other Instances concepts + Set otherInstances=rs.getIndividuals(); + Iterator it=otherInstances.iterator(); + while(it.hasNext()){ + indtmp=(Individual)it.next(); + + if(!positives.contains(indtmp) && (r.nextDouble()*100)<=Percentage){ + + p("added "+indtmp.getName()+" to NEGATIVES"); + ret.add("added "+indtmp.getName()+" to NEGATIVES"); + negativeExamples.add(indtmp); + } + }//while + + return al2s(ret); + + } + + + public ArrayList<AtomicConcept> subsumesAll(AtomicConcept c){ + Set s=rs.getAtomicConcepts(); + ArrayList<AtomicConcept> ret=new ArrayList<AtomicConcept>(); + Iterator i=s.iterator(); + while (i.hasNext()) { + AtomicConcept element = (AtomicConcept) i.next(); + if(rs.subsumes(element, c)) + { + ret.add(element); + } + + } + return ret; + } + public String[] getPositiveExamples(){ + String[] ret=new String[positiveExamples.size()]; + Iterator i=positiveExamples.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + //p("getPositiveEx"); + return ret; + } + public String[] getNegativeExamples(){ + String[] ret=new String[negativeExamples.size()]; + Iterator i=negativeExamples.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + //p("getNegativeEx"); + return ret; + } + + public String[] getIgnoredConcepts() { + String[] ret=new String[ignoredConcept.size()]; + Iterator i=ignoredConcept.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((String)i.next()); + } + //p("getNegativeEx"); + return ret; + } + + public String getSubsumptionHierarchy() throws NoOntologySelectedException { + try{ + return this.rs.getSubsumptionHierarchy().toString(); + }catch (Exception e) {throw new NoOntologySelectedException("Subsumptionhierarchy",e.getMessage());} + + } + + + + public boolean removeNegativeExample(String NegExample){ + p("removed from neg: "+NegExample); + return negativeExamples.remove(new Individual(NegExample)); + } + public boolean removePositiveExample(String PosExample){ + p("removed from pos: "+PosExample); + return positiveExamples.remove(new Individual(PosExample)); + } + + public boolean removeAllPositiveExamples(){ + positiveExamples = new TreeSet<Individual>(); + p("removing all positive examples"); + return true; + } + public boolean removeAllNegativeExamples(){ + negativeExamples = new TreeSet<Individual>(); + p("removing all negative examples"); + return true; + } + + public boolean removeAllExamples(){ + positiveExamples = new TreeSet<Individual>(); + negativeExamples = new TreeSet<Individual>(); + p("removing all examples"); + return true; + } + + public void removeIgnoredConcept(String concept) { + //ignoredConcept.add(concept); + this.ignoredConcept.remove(concept); + p("removed ignoredConcepts: "+concept); + } + + public String[] getInstances()throws NoOntologySelectedException{ + try{ + SortedSet<Individual> s=rs.getIndividuals(); + //System.out.println(s); + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + Arrays.sort(ret); + //p("getInstances"); + return ret; + }catch (Exception e) {throw new NoOntologySelectedException("Failed to get instances, no ontology selected","");} + } + + public String getCurrentOntologyURL()throws NoOntologySelectedException{ + p("getCurrentOntology: "+currentOntologyURL); + if(currentOntologyURL==null)throw new NoOntologySelectedException("Select Ontology First","quatsch"); + else return currentOntologyURL; + } + + public String getAlgorithmStatus(){ + return this.status; + } + + /** + * Specifies the URI of the ontology containing the background + * knowledge. Reads the ontology and sends it to the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + */ + // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch + /* + @WebMethod + public void readOntology(String ontologyURI) { + readOntology(ontologyURI, "RDF/XML"); + } + */ + + + public void removeOntology() { + this.currentOntologyURL=null; + this.reasoner=null; + this.rs=null; + this.positiveExamples = new TreeSet<Individual>(); + this.negativeExamples = new TreeSet<Individual>(); + this.ignoredConcept=new TreeSet<String>(); + p("removing Ontology"); + + } + + /** + * Specifies the URI of the ontology containing the background + * knowledge and its format. Reads the ontology and sends it to + * the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + * @param format "RDF/XML" or "N-TRIPLES". + */ + + + public void readOntology(String ontologyURL, String format) throws OntologyURLNotValid{ + this.currentOntologyURL=ontologyURL; + p("trying to read: "+ontologyURL+" ::"+format); + try{ + // this.ontologyURL = ontologyURL; + // this.ontologyFormat = format; + + // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien + // laden könnte (Fix: nur http:// zulassen, kein file://) + URL ontology = null; + try { + ontology = new URL(ontologyURL); + } catch (MalformedURLException e1) { + this.removeOntology(); + throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); + + } + + OntologyFileFormat ofFormat; + if (format.equals("RDF/XML")) + ofFormat = OntologyFileFormat.RDF_XML; + else + ofFormat = OntologyFileFormat.N_TRIPLES; + + Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); + m.put(ontology, ofFormat); + + // Default-URI für DIG-Reasoner setzen + + try { + Config.digReasonerURL = new URL(reasonerURL); + } catch (MalformedURLException e) { + // Exception tritt nie auf, da URL korrekt + e.printStackTrace(); + } + + reasoner = Main.createReasoner(new KB(), m); + rs = new ReasoningService(reasoner); + + Main.autoDetectConceptsAndRoles(rs); + reasoner.prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + p(rs.getSubsumptionHierarchy().toString()); + //rs.getRoleMembers(arg0) + } + catch (DoesNotExistException e) { + this.removeOntology(); + throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); + } + catch (JenaException e) { + e.printStackTrace();} + + + /*catch(Exception e2) { + + //p("exception:"+e.getMessage()); + e2.printStackTrace(); + }*/ + p("Ontology read: "+currentOntologyURL); + } + + + public void learnMonitored(){ + addOption(new ConfigurationOption("refinement","ignoredConcepts",ignoredConcept)); + this.lm=new LearnMonitor(this); + this.lm.start(); + //this.lm.learn(this); + } + + /*public void relearn(){ + //TreeSet<String> s=new TreeSet<String>(); + //new ConfigurationOption(); + this.lm=new LearnMonitor(this); + this.lm.start(); + //this.lm.learn(this); + }*/ + + + public String[] getAtomicConcepts()throws NoOntologySelectedException{ + try{ + return SortedSet2StringListConcepts( rs.getAtomicConcepts()); + }catch (Exception e) {throw new NoOntologySelectedException("Select Ontology First","ddddd");} + } + + public String[] retrieval(String Concept)throws NoOntologySelectedException{ + return SortedSet2StringListIndividuals(rs.retrieval(new AtomicConcept(Concept))); + } + + public String[] getAtomicRoles()throws NoOntologySelectedException{ + return SortedSet2StringListRoles( rs.getAtomicRoles()); + } + + public String[] getIndividualsForARole(String Role)throws NoOntologySelectedException{ + Map m=rs.getRoleMembers(new AtomicRole(Role)); + Set s=m.keySet(); + return SortedSet2StringListIndividuals(s); + } + + public synchronized void stop(){ + System.out.println("ROL"+this.ROL); + + System.out.println("lm"+lm); + System.out.println("lmstate"+lm.getState()); + System.out.println("lmalive"+lm.isAlive()); + System.out.println("lminterrupt"+lm.isInterrupted()); + this.ROL.stop(); + //lm.end(); + /*try{ + synchronized (this.lm) { + //this.lm.yield(); + } + }catch (Exception e) {e.printStackTrace();}*/ + System.out.println("lmstate"+lm.getState()); + System.out.println("lmalive"+lm.isAlive()); + System.out.println("lminterrupt"+lm.isInterrupted()); + + //this.ROL.stop(); + //this.lm.interrupt(); + + //this.lm.end(); + //this.lm.notify(); + } + + public String[] SortedSet2StringListIndividuals(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + + public String[] SortedSet2StringListConcepts(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((AtomicConcept)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + public String[] SortedSet2StringListRoles(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((AtomicRole)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + + public String[] al2s(ArrayList<String> al){ + String[] ret=new String[al.size()]; + for (int i = 0; i < al.size(); i++) { + ret[i]=al.get(i); + } + return ret; + } + public void p(String s){ + if(debug_flag){ + System.out.println("\t"+s); + } + + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 10:40:12
|
Revision: 21 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=21&view=rev Author: kurzum Date: 2007-08-22 03:40:10 -0700 (Wed, 22 Aug 2007) Log Message: ----------- update Added Paths: ----------- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2007-08-22 10:40:10 UTC (rev 21) @@ -0,0 +1,227 @@ +package org.dllearner.server; + +import java.util.HashMap; +import java.util.Random; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.server.exceptions.ClientNotKnownException; +import org.dllearner.server.exceptions.NoOntologySelectedException; +import org.dllearner.server.exceptions.OntologyURLNotValid; + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWS { + Random rand=new Random(); + private HashMap<Integer, ClientState> clients; + + // private String ontologyURL; + // private String ontologyFormat; + + + + public DLLearnerWS(){ + this.clients=new HashMap<Integer, ClientState>(); + + } + + /** + * + * + * + */ + @WebMethod + public int getID(){ + int id=rand.nextInt(); + while (id<=0){ + id=rand.nextInt(); + } + + // dont change to local function get, cause of exception + ClientState c=this.clients.get(new Long(id)); + if(c!=null){ + return getID(); + } + else { + this.clients.put(new Integer(id), new ClientState()); + System.out.println("new Client with id: "+id); + return id; + } + + } + + @WebMethod + public void addPositiveExample(int id,String posExample) throws ClientNotKnownException{ + ClientState c=getClientState(id); + c.addPositiveExample(posExample); + //positiveExamples.add(new Individual(posExample)); + } + @WebMethod + public void addNegativeExample(int id,String negExample) throws ClientNotKnownException { + ClientState c=getClientState(id); + c.addNegativeExample(negExample); + } + @WebMethod + public void addIgnoredConcept(int id,String concept)throws ClientNotKnownException { + getClientState(id).addIgnoredConcept(concept); + } + + @WebMethod + public String[] selectInstancesForAConcept(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).selectInstancesForAConcept(Concept); + } + + @WebMethod + public String[] selectAConcept(int id,String Concept,int Percentage)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).selectAConcept(Concept, Percentage); + } + + @WebMethod + public String[] getPositiveExamples(int id)throws ClientNotKnownException{ + ClientState c=getClientState(id); + return c.getPositiveExamples(); + } + @WebMethod + public String[] getNegativeExamples(int id)throws ClientNotKnownException{ + ClientState c=getClientState(id); + return c.getNegativeExamples(); + } + @WebMethod + public String[] getIgnoredConcepts(int id)throws ClientNotKnownException{ + return getClientState(id).getIgnoredConcepts(); + } + + @WebMethod + public boolean removePositiveExample(int id, String pos)throws ClientNotKnownException{ + return getClientState(id).removePositiveExample(pos); + } + + @WebMethod + public boolean removeNegativeExample(int id, String neg)throws ClientNotKnownException{ + return getClientState(id).removeNegativeExample(neg); + } + @WebMethod + public boolean removeAllExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllExamples(); + } + @WebMethod + public boolean removeAllPositiveExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllPositiveExamples(); + } + @WebMethod + public boolean removeAllNegativeExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllNegativeExamples(); + } + @WebMethod + public void removeIgnoredConcept(int id,String concept)throws ClientNotKnownException{ + getClientState(id).removeIgnoredConcept(concept); + } + + @WebMethod + public String getCurrentOntologyURL(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getCurrentOntologyURL(); + + } + + @WebMethod + public String[] getInstances(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getInstances(); + } + + @WebMethod + public String[] getAtomicConcepts(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getAtomicConcepts(); + } + + @WebMethod + public String[] getAtomicRoles(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getAtomicRoles(); + } + @WebMethod + public String[] getIndividualsForARole(int id,String Role)throws ClientNotKnownException, NoOntologySelectedException{ + return getClientState(id).getIndividualsForARole(Role); + } + @WebMethod + public String getSubsumptionHierarchy(int id)throws ClientNotKnownException, NoOntologySelectedException{ + return getClientState(id).getSubsumptionHierarchy(); + } + + @WebMethod + public String[] retrieval(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).retrieval(Concept); + } + + @WebMethod + public void readOntology(int id,String ontologyURL, String format)throws ClientNotKnownException,OntologyURLNotValid{ + getClientState(id).readOntology(ontologyURL, format); + + } + + @WebMethod + public void removeOntology(int id)throws ClientNotKnownException{ + getClientState(id).removeOntology(); + } + + @WebMethod + public String learnConcept(int id)throws ClientNotKnownException{ + return "Deprecated method"; + + } + + + @WebMethod + public String getAlgorithmStatus(int id ) throws ClientNotKnownException{ + + return getClientState(id).getAlgorithmStatus(); + } + + + @WebMethod + public void learnMonitored(int id )throws ClientNotKnownException{ + getClientState(id).learnMonitored(); + } + /*@WebMethod + public void relearn(int id,String Concept )throws ClientNotKnownException{ + getClientState(id).relearn(Concept); + }*/ + + @WebMethod + public String getLastResult(int id)throws ClientNotKnownException{ + return getClientState(id).getLastResult(); + } + + @WebMethod + public void stop(int id)throws ClientNotKnownException{ + getClientState(id).stop(); + } + + + //*************************USER MANAGEMENT + + public ClientState getClientState(int id)throws ClientNotKnownException{ + System.out.println("Request from "+id); + ClientState c=this.clients.get(new Integer(id)); + if(c==null){ + //System.out.println(clients.keySet().toString()); + throw new ClientNotKnownException("Client with id: "+id+" is not known","ClientNotKnownException");}; + return c; + + } + + + + + +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java 2007-08-22 10:40:10 UTC (rev 21) @@ -0,0 +1,68 @@ +package org.dllearner.server; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.server.exceptions.ClientNotKnownException; + + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") + +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWS2 { + + /* + // String[] funktioniert leider noch nicht + @WebMethod + public void addPositiveExamples(String[] posExamples) { + for(String example : posExamples) + positiveExamples.add(new Individual(example)); + } + + @WebMethod + public void addNegativeExamples(String[] negExamples) { + for(String example : negExamples) + negativeExamples.add(new Individual(example)); + } + */ + + @WebMethod + /** + * @param name + * + * @return The sum + * @throws AddNumbersException + * if any of the numbers to be added is negative. + * + **/ + public String hellosimple(String name) throws ClientNotKnownException{ + /*for (int i = 0; i < name.length; i++) { + name[i]=i+"nnnn<br>"; + }*/ + if(name.equals("aa"))throw new ClientNotKnownException("a","b"); + + return "bbb"; + } + + + // Testmethode + @WebMethod + public String hello(String name){ + name=null; + //name.substring(5); + //throw new NullPointerException(); + return "Hello " + name + "!"; + } + +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java 2007-08-22 10:40:10 UTC (rev 21) @@ -0,0 +1,70 @@ +package org.dllearner.server; + + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.InetSocketAddress; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import javax.xml.ws.Endpoint; + +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpServer; + + +public class DLLearnerWSStart { + + public static void main(String[] args) { + String url = "http://139.18.114.78:8181/services"; + if (args.length > 0) + url = args[0]; + try{ + + InetSocketAddress isa=new InetSocketAddress("localhost",8181); + HttpServer server = HttpServer.create(isa, 5); + ExecutorService threads = Executors.newFixedThreadPool(5); + server.setExecutor(threads); + server.start(); + + System.out.print("Starting DL-Learner web service at http://" + + isa.getHostName()+":"+isa.getPort()+ "/services ... "); + Endpoint endpoint = Endpoint.create(new DLLearnerWS()); + //Endpoint endpoint = Endpoint.create(new CustomDataClass()); + HttpContext context = server.createContext("/services"); + endpoint.publish(context); + //Endpoint endpoint = Endpoint.publish(url, new DLLearnerWS()); + + System.out.println("OK."); + + + + System.out.println("Type \"exit\" to terminate web service."); + boolean terminate = false; + String inputString = ""; + do { + BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); + + try { + inputString = input.readLine(); + } catch (IOException e) { + e.printStackTrace(); + } + + if (inputString.equals("exit")) + terminate = true; + + } while (!terminate); + + System.out.print("Stopping web service ... "); + endpoint.stop(); + + server.stop(1); + threads.shutdown(); + System.out.println("OK."); + }catch (Exception e) {e.printStackTrace();} + } + +} Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java 2007-08-22 10:40:10 UTC (rev 21) @@ -0,0 +1,166 @@ +package org.dllearner.server; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.Config; +import org.dllearner.LearningProblem; +import org.dllearner.Main; +import org.dllearner.OntologyFileFormat; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.dl.Individual; +import org.dllearner.dl.KB; +import org.dllearner.reasoning.Reasoner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; +import org.dllearner.reasoning.ReasoningService; + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWSoriginal { + + // private String ontologyURL; + // private String ontologyFormat; + private Reasoner reasoner; + private ReasoningService rs; + private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); + private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); + + /** + * Specifies the URI of the ontology containing the background + * knowledge. Reads the ontology and sends it to the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + */ + // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch + /* + @WebMethod + public void readOntology(String ontologyURI) { + readOntology(ontologyURI, "RDF/XML"); + } + */ + + /** + * Specifies the URI of the ontology containing the background + * knowledge and its format. Reads the ontology and sends it to + * the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + * @param format "RDF/XML" or "N-TRIPLES". + */ + @WebMethod + public void readOntology(String ontologyURL, String format) { + // this.ontologyURL = ontologyURL; + // this.ontologyFormat = format; + + // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien + // laden könnte (Fix: nur http:// zulassen, kein file://) + URL ontology = null; + try { + ontology = new URL(ontologyURL); + } catch (MalformedURLException e1) { + e1.printStackTrace(); + } + + OntologyFileFormat ofFormat; + if (format.equals("RDF/XML")) + ofFormat = OntologyFileFormat.RDF_XML; + else + ofFormat = OntologyFileFormat.N_TRIPLES; + + Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); + m.put(ontology, ofFormat); + + // Default-URI für DIG-Reasoner setzen + try { + Config.digReasonerURL = new URL("http://localhost:8081"); + } catch (MalformedURLException e) { + // Exception tritt nie auf, da URL korrekt + e.printStackTrace(); + } + + reasoner = Main.createReasoner(new KB(), m); + + rs = new ReasoningService(reasoner); + + } + + + @WebMethod + public String[] testString(String c) { + + return new String[]{"a","b"}; + } + + // String[] funktioniert leider noch nicht + @WebMethod + public void addPositiveExamples(String[] posExamples) { + for(String example : posExamples) + positiveExamples.add(new Individual(example)); + } + + @WebMethod + public void addNegativeExamples(String[] negExamples) { + for(String example : negExamples) + negativeExamples.add(new Individual(example)); + } + + + @WebMethod + public void addPositiveExample(String posExample) { + positiveExamples.add(new Individual(posExample)); + } + + @WebMethod + public void addNegativeExample(String negExample) { + negativeExamples.add(new Individual(negExample)); + } + + @WebMethod + public String learnConcept() { + // notwendige Vorverarbeitungsschritte für den Lernalgorithmus + // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert + // werden + // - die Subsumptionhierarchie muss erstellt werden + // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen + Main.autoDetectConceptsAndRoles(rs); + reasoner.prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + + LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); + // erstmal wird nur der Refinement-Learner als Web-Service angeboten + ROLearner learner = new ROLearner(learningProblem); + return learner.getBestSolution().toString(); + } + + // Testmethode + @WebMethod + public String hello(String name) { + return "Hello " + name + "!"; + } + +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java 2007-08-22 10:40:10 UTC (rev 21) @@ -0,0 +1,81 @@ +package org.dllearner.server; + +import org.dllearner.Config; +import org.dllearner.LearningProblem; +import org.dllearner.Main; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; + +public class LearnMonitor extends Thread { + + + private ClientState c; + private boolean active = false; + + //private ROLearner ROL; + + public LearnMonitor(ClientState c){ + this.c=c; + } + + + public void end(){ + + System.out.println("trying to end"); + System.out.println("ROL2"+c.ROL); + this.c.ROL.stop(); + c.setLastResult(c.ROL.getBestSolution().toString()); + c.setStatus("stopped"); + } + + public void learn(){ + + this.start(); + + } + + public void run(){ + try{ + c.setStatus("still running"); + active=true; + c.setStatus("running"); + + // notwendige Vorverarbeitungsschritte für den Lernalgorithmus + // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert + // werden + // - die Subsumptionhierarchie muss erstellt werden + // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen + Main.autoDetectConceptsAndRoles(c.getRs()); + c.getReasoner().prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + c.getReasoner().getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + c.p("learning started"); + LearningProblem learningProblem = new LearningProblem(c.getRs(), c.getPosExamples(), c.getNegExamples()); + // erstmal wird nur der Refinement-Learner als Web-Service angeboten + //System.out.println("aaaa"); + c.ROL = new ROLearner(learningProblem); + + c.ROL.start(); + //new ROLearner(); + //c.p(("ROL1"+ROL)); + + + + + + + //c.setLastResult(c.ROL.getBestSolution().toString()); + c.setLastResult(c.ROL.getBestSolution().toString()); + c.setStatus("finished"); + + }catch (Exception e) {e.printStackTrace();} + finally{active=false;}; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 10:39:12
|
Revision: 20 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=20&view=rev Author: kurzum Date: 2007-08-22 03:39:07 -0700 (Wed, 22 Aug 2007) Log Message: ----------- updated the web service Removed Paths: ------------- trunk/src/dl-learner/org/dllearner/server/ClientState.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java Deleted: trunk/src/dl-learner/org/dllearner/server/ClientState.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/ClientState.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/ClientState.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,532 +0,0 @@ -package org.dllearner.server; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; -import java.util.Set; -import java.util.SortedSet; -import java.util.TreeSet; - -import org.dllearner.Config; -import org.dllearner.ConfigurationManager; -import org.dllearner.ConfigurationOption; -import org.dllearner.Main; -import org.dllearner.OntologyFileFormat; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.dl.AtomicConcept; -import org.dllearner.dl.AtomicRole; -import org.dllearner.dl.Concept; -import org.dllearner.dl.Individual; -import org.dllearner.dl.KB; -import org.dllearner.reasoning.Reasoner; -import org.dllearner.reasoning.ReasoningMethodUnsupportedException; -import org.dllearner.reasoning.ReasoningService; - -import org.dllearner.server.exceptions.NoOntologySelectedException; -import org.dllearner.server.exceptions.OntologyURLNotValid; - -import com.hp.hpl.jena.shared.DoesNotExistException; -import com.hp.hpl.jena.shared.JenaException; - -public class ClientState { - - private String reasonerURL="http://localhost:8081"; - //private String reasonerURL="http://localhost:3490"; - - private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); - public SortedSet<Individual> getPosExamples() { return this.positiveExamples;} - - private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); - public SortedSet<Individual> getNegExamples() { return this.negativeExamples;} - - private SortedSet<String> ignoredConcept = new TreeSet<String>(); - - - private Reasoner reasoner; - public Reasoner getReasoner() { return reasoner;} - - private ReasoningService rs; - public ReasoningService getRs() { return rs; } - - private String currentOntologyURL=null; - private boolean debug_flag=true; - private LearnMonitor lm=null; - - private String lastResult=""; - public String getLastResult(){ - try{ - return ROL.getBestSolution().toString(); - }catch (Exception e) {} - return this.lastResult; } - public void setLastResult(String lastResult) {this.lastResult = lastResult;} - - private String status="maiden-like"; - public void setStatus(String status) {this.status = status;} - - ConfigurationManager confMgr; - public void addOption(ConfigurationOption c){confMgr.applyConfigurationOption(c);} - ROLearner ROL; - - public ClientState() { - - - TreeSet<ConfigurationOption> s=new TreeSet<ConfigurationOption>(); - //s.add(new ConfigurationOption("refinement","quiet","true")); - /*s.add(new ConfigurationOption()); - s.add(new ConfigurationOption()); - s.add(new ConfigurationOption()); - s.add(new ConfigurationOption()); - s.add(new ConfigurationOption()); - s.add(new ConfigurationOption());*/ - - confMgr = new ConfigurationManager(s); - addOption(new ConfigurationOption("refinement","quiet","true")); - //confMgr.applyOptions(); - - } - - - - - public void addPositiveExample(String posExample) { - positiveExamples.add(new Individual(posExample)); - p("added pos: "+posExample); - } - - - public void addNegativeExample(String negExample) { - negativeExamples.add(new Individual(negExample)); - p("added neg: "+negExample); - } - - public void addIgnoredConcept(String concept) { - ignoredConcept.add(concept); - p("added ignoredConcepts: "+concept); - } - - public String[] selectInstancesForAConcept(String Concept)throws NoOntologySelectedException{ - if(Concept.endsWith("#Thing"))return new String[]{}; - AtomicConcept SelectedConcept=new AtomicConcept(Concept); - ArrayList<String> al=new ArrayList<String>(); - Individual indtmp=null; - Set ConceptSet=null; - AtomicConcept ac=null; - - - System.out.println("selectInstancesForAConcept: "+Concept); - // add all positives - Set positives=rs.retrieval(SelectedConcept); - Iterator i = positives.iterator(); - while(i.hasNext()){ - indtmp=(Individual)i.next(); - p("added "+indtmp.getName()+" to positives"); - al.add("added "+indtmp.getName()+" to positives"); - positiveExamples.add(indtmp); - } - - //find more general concepts - ArrayList<AtomicConcept> superConcepts=new ArrayList<AtomicConcept>(); - try{ - //ConceptSet = rs.getSubsumptionHierarchy().getMoreGeneralConcepts(new AtomicConcept(Concept)); - //System.out.println(ConceptSet); - //Concept c=new AtomicConcept(Concept); - /*Set<AtomicConcept> s=rs.getAtomicConcepts(); - Set<Concept> sc=new TreeSet<Concept>(); - Iterator a=s.iterator(); - while (a.hasNext()) { - sc.add((Concept) a.next()); - } - sc=rs.subsumes(sc,new AtomicConcept(Concept));*/ - superConcepts=subsumesAll(SelectedConcept); - - //System.out.println("sizebefore: "+"size after:"+sc); - }catch (Exception e) {e.printStackTrace();} - - -// remove top - for (int j = 0; j < superConcepts.size(); ) { - //TODO no unique name assumption? - if(superConcepts.get(j).getName().equals(SelectedConcept.getName())){ - superConcepts.remove(j); - j=0; - continue; - } - if(superConcepts.get(j).getName().equals("TOP")){ - superConcepts.remove(j); - j=0; - continue; - } - j++; - } - - System.out.println("Found all those:"+ superConcepts); - - ac=null; - - if(superConcepts.size()==0){return al2s(al); }//TODO - else - { // add all negatives of all superclasses; - - //Iterator it=ConceptSet.iterator(); - for (int jj = 0; jj < superConcepts.size(); jj++) - { - ac=superConcepts.get(jj); - p("next this: "+ac.getName()); - Set negatives=rs.retrieval(ac); - Iterator i2 = negatives.iterator(); - indtmp=null; - while(i2.hasNext()){ - - indtmp=(Individual)i2.next(); - - if(!positives.contains(indtmp)){ - - p("added "+indtmp.getName()+" to NEGATIVES"); - al.add("added "+indtmp.getName()+" to NEGATIVES"); - negativeExamples.add(indtmp); - } - else{ - p("skipped "+indtmp.getName()); - al.add("skipped "+indtmp.getName()); - } - - } - }//endfor - return al2s(al); - } - - - } - - public ArrayList<AtomicConcept> subsumesAll(AtomicConcept c){ - Set s=rs.getAtomicConcepts(); - ArrayList<AtomicConcept> ret=new ArrayList<AtomicConcept>(); - Iterator i=s.iterator(); - while (i.hasNext()) { - AtomicConcept element = (AtomicConcept) i.next(); - if(rs.subsumes(element, c)) - { - ret.add(element); - } - - } - return ret; - } - public String[] getPositiveExamples(){ - String[] ret=new String[positiveExamples.size()]; - Iterator i=positiveExamples.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((Individual)i.next()).getName(); - } - //p("getPositiveEx"); - return ret; - } - public String[] getNegativeExamples(){ - String[] ret=new String[negativeExamples.size()]; - Iterator i=negativeExamples.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((Individual)i.next()).getName(); - } - //p("getNegativeEx"); - return ret; - } - - public String[] getIgnoredConcepts() { - String[] ret=new String[ignoredConcept.size()]; - Iterator i=ignoredConcept.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((String)i.next()); - } - //p("getNegativeEx"); - return ret; - } - - public String getSubsumptionHierarchy() throws NoOntologySelectedException { - try{ - return this.rs.getSubsumptionHierarchy().toString(); - }catch (Exception e) {throw new NoOntologySelectedException("Subsumptionhierarchy",e.getMessage());} - - } - - - - public boolean removeNegativeExample(String NegExample){ - p("removed from neg: "+NegExample); - return negativeExamples.remove(new Individual(NegExample)); - } - public boolean removePositiveExample(String PosExample){ - p("removed from pos: "+PosExample); - return positiveExamples.remove(new Individual(PosExample)); - } - - public boolean removeAllPositiveExamples(){ - positiveExamples = new TreeSet<Individual>(); - p("removing all positive examples"); - return true; - } - public boolean removeAllNegativeExamples(){ - negativeExamples = new TreeSet<Individual>(); - p("removing all negative examples"); - return true; - } - - public boolean removeAllExamples(){ - positiveExamples = new TreeSet<Individual>(); - negativeExamples = new TreeSet<Individual>(); - p("removing all examples"); - return true; - } - - public void removeIgnoredConcept(String concept) { - //ignoredConcept.add(concept); - this.ignoredConcept.remove(concept); - p("removed ignoredConcepts: "+concept); - } - - public String[] getInstances()throws NoOntologySelectedException{ - try{ - SortedSet<Individual> s=rs.getIndividuals(); - //System.out.println(s); - String[] ret=new String[s.size()]; - Iterator i=s.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((Individual)i.next()).getName(); - } - Arrays.sort(ret); - //p("getInstances"); - return ret; - }catch (Exception e) {throw new NoOntologySelectedException("Failed to get instances, no ontology selected","");} - } - - public String getCurrentOntologyURL()throws NoOntologySelectedException{ - p("getCurrentOntology: "+currentOntologyURL); - if(currentOntologyURL==null)throw new NoOntologySelectedException("Select Ontology First","quatsch"); - else return currentOntologyURL; - } - - public String getAlgorithmStatus(){ - return this.status; - } - - /** - * Specifies the URI of the ontology containing the background - * knowledge. Reads the ontology and sends it to the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - */ - // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch - /* - @WebMethod - public void readOntology(String ontologyURI) { - readOntology(ontologyURI, "RDF/XML"); - } - */ - - - public void removeOntology() { - this.currentOntologyURL=null; - this.reasoner=null; - this.rs=null; - this.positiveExamples = new TreeSet<Individual>(); - this.negativeExamples = new TreeSet<Individual>(); - this.ignoredConcept=new TreeSet<String>(); - p("removing Ontology"); - - } - - /** - * Specifies the URI of the ontology containing the background - * knowledge and its format. Reads the ontology and sends it to - * the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - * @param format "RDF/XML" or "N-TRIPLES". - */ - - - public void readOntology(String ontologyURL, String format) throws OntologyURLNotValid{ - this.currentOntologyURL=ontologyURL; - p("trying to read: "+ontologyURL+" ::"+format); - try{ - // this.ontologyURL = ontologyURL; - // this.ontologyFormat = format; - - // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien - // laden könnte (Fix: nur http:// zulassen, kein file://) - URL ontology = null; - try { - ontology = new URL(ontologyURL); - } catch (MalformedURLException e1) { - this.removeOntology(); - throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); - - } - - OntologyFileFormat ofFormat; - if (format.equals("RDF/XML")) - ofFormat = OntologyFileFormat.RDF_XML; - else - ofFormat = OntologyFileFormat.N_TRIPLES; - - Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); - m.put(ontology, ofFormat); - - // Default-URI für DIG-Reasoner setzen - - try { - Config.digReasonerURL = new URL(reasonerURL); - } catch (MalformedURLException e) { - // Exception tritt nie auf, da URL korrekt - e.printStackTrace(); - } - - reasoner = Main.createReasoner(new KB(), m); - rs = new ReasoningService(reasoner); - - Main.autoDetectConceptsAndRoles(rs); - reasoner.prepareSubsumptionHierarchy(); - if (Config.Refinement.improveSubsumptionHierarchy) { - try { - reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); - } catch (ReasoningMethodUnsupportedException e) { - // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl - e.printStackTrace(); - } - } - p(rs.getSubsumptionHierarchy().toString()); - //rs.getRoleMembers(arg0) - } - catch (DoesNotExistException e) { - this.removeOntology(); - throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); - } - catch (JenaException e) { - e.printStackTrace();} - - - /*catch(Exception e2) { - - //p("exception:"+e.getMessage()); - e2.printStackTrace(); - }*/ - p("Ontology read: "+currentOntologyURL); - } - - - public void learnMonitored(){ - addOption(new ConfigurationOption("refinement","ignoredConcepts",ignoredConcept)); - this.lm=new LearnMonitor(this); - this.lm.start(); - //this.lm.learn(this); - } - - /*public void relearn(){ - //TreeSet<String> s=new TreeSet<String>(); - //new ConfigurationOption(); - this.lm=new LearnMonitor(this); - this.lm.start(); - //this.lm.learn(this); - }*/ - - - public String[] getAtomicConcepts()throws NoOntologySelectedException{ - try{ - return SortedSet2StringListConcepts( rs.getAtomicConcepts()); - }catch (Exception e) {throw new NoOntologySelectedException("Select Ontology First","ddddd");} - } - - public String[] retrieval(String Concept)throws NoOntologySelectedException{ - return SortedSet2StringListIndividuals(rs.retrieval(new AtomicConcept(Concept))); - } - - public String[] getAtomicRoles()throws NoOntologySelectedException{ - return SortedSet2StringListRoles( rs.getAtomicRoles()); - } - - public String[] getIndividualsForARole(String Role)throws NoOntologySelectedException{ - Map m=rs.getRoleMembers(new AtomicRole(Role)); - Set s=m.keySet(); - return SortedSet2StringListIndividuals(s); - } - - public synchronized void stop(){ - System.out.println("ROL"+this.ROL); - - System.out.println("lm"+lm); - System.out.println("lmstate"+lm.getState()); - System.out.println("lmalive"+lm.isAlive()); - System.out.println("lminterrupt"+lm.isInterrupted()); - this.ROL.stop(); - /*try{ - synchronized (this.lm) { - //this.lm.yield(); - } - }catch (Exception e) {e.printStackTrace();}*/ - System.out.println("lmstate"+lm.getState()); - System.out.println("lmalive"+lm.isAlive()); - System.out.println("lminterrupt"+lm.isInterrupted()); - - //this.ROL.stop(); - //this.lm.interrupt(); - - //this.lm.end(); - //this.lm.notify(); - } - - public String[] SortedSet2StringListIndividuals(Set s){ - - String[] ret=new String[s.size()]; - Iterator i=s.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((Individual)i.next()).getName(); - } - Arrays.sort(ret); - return ret; - } - - public String[] SortedSet2StringListConcepts(Set s){ - - String[] ret=new String[s.size()]; - Iterator i=s.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((AtomicConcept)i.next()).getName(); - } - Arrays.sort(ret); - return ret; - } - public String[] SortedSet2StringListRoles(Set s){ - - String[] ret=new String[s.size()]; - Iterator i=s.iterator(); - int a=0; - while (i.hasNext()){ - ret[a++]=((AtomicRole)i.next()).getName(); - } - Arrays.sort(ret); - return ret; - } - - public String[] al2s(ArrayList<String> al){ - String[] ret=new String[al.size()]; - for (int i = 0; i < al.size(); i++) { - ret[i]=al.get(i); - } - return ret; - } - public void p(String s){ - if(debug_flag){ - System.out.println("\t"+s); - } - - } -} Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,223 +0,0 @@ -package org.dllearner.server; - -import java.util.HashMap; -import java.util.Random; - -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - -import org.dllearner.server.exceptions.ClientNotKnownException; -import org.dllearner.server.exceptions.NoOntologySelectedException; -import org.dllearner.server.exceptions.OntologyURLNotValid; - -/** - * Offene Fragen: - * - * Welche Rückgabetypen sind erlaubt? - * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie - * gelesen werden)? - * - * @author Jens Lehmann - * - */ -@WebService(name = "DLLearnerWebService") -@SOAPBinding(style = SOAPBinding.Style.RPC) -public class DLLearnerWS { - Random rand=new Random(); - private HashMap<Integer, ClientState> clients; - - // private String ontologyURL; - // private String ontologyFormat; - - - - public DLLearnerWS(){ - this.clients=new HashMap<Integer, ClientState>(); - - } - - /** - * - * - * - */ - @WebMethod - public int getID(){ - int id=rand.nextInt(); - while (id<=0){ - id=rand.nextInt(); - } - - // dont change to local function get, cause of exception - ClientState c=this.clients.get(new Long(id)); - if(c!=null){ - return getID(); - } - else { - this.clients.put(new Integer(id), new ClientState()); - System.out.println("new Client with id: "+id); - return id; - } - - } - - @WebMethod - public void addPositiveExample(int id,String posExample) throws ClientNotKnownException{ - ClientState c=getClientState(id); - c.addPositiveExample(posExample); - //positiveExamples.add(new Individual(posExample)); - } - @WebMethod - public void addNegativeExample(int id,String negExample) throws ClientNotKnownException { - ClientState c=getClientState(id); - c.addNegativeExample(negExample); - } - @WebMethod - public void addIgnoredConcept(int id,String concept)throws ClientNotKnownException { - getClientState(id).addIgnoredConcept(concept); - } - - @WebMethod - public String[] selectInstancesForAConcept(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).selectInstancesForAConcept(Concept); - } - - - @WebMethod - public String[] getPositiveExamples(int id)throws ClientNotKnownException{ - ClientState c=getClientState(id); - return c.getPositiveExamples(); - } - @WebMethod - public String[] getNegativeExamples(int id)throws ClientNotKnownException{ - ClientState c=getClientState(id); - return c.getNegativeExamples(); - } - @WebMethod - public String[] getIgnoredConcepts(int id)throws ClientNotKnownException{ - return getClientState(id).getIgnoredConcepts(); - } - - @WebMethod - public boolean removePositiveExample(int id, String pos)throws ClientNotKnownException{ - return getClientState(id).removePositiveExample(pos); - } - - @WebMethod - public boolean removeNegativeExample(int id, String neg)throws ClientNotKnownException{ - return getClientState(id).removeNegativeExample(neg); - } - @WebMethod - public boolean removeAllExamples(int id)throws ClientNotKnownException{ - return getClientState(id).removeAllExamples(); - } - @WebMethod - public boolean removeAllPositiveExamples(int id)throws ClientNotKnownException{ - return getClientState(id).removeAllPositiveExamples(); - } - @WebMethod - public boolean removeAllNegativeExamples(int id)throws ClientNotKnownException{ - return getClientState(id).removeAllNegativeExamples(); - } - @WebMethod - public void removeIgnoredConcept(int id,String concept)throws ClientNotKnownException{ - getClientState(id).removeIgnoredConcept(concept); - } - - @WebMethod - public String getCurrentOntologyURL(int id)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).getCurrentOntologyURL(); - - } - - @WebMethod - public String[] getInstances(int id)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).getInstances(); - } - - @WebMethod - public String[] getAtomicConcepts(int id)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).getAtomicConcepts(); - } - - @WebMethod - public String[] getAtomicRoles(int id)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).getAtomicRoles(); - } - @WebMethod - public String[] getIndividualsForARole(int id,String Role)throws ClientNotKnownException, NoOntologySelectedException{ - return getClientState(id).getIndividualsForARole(Role); - } - @WebMethod - public String getSubsumptionHierarchy(int id)throws ClientNotKnownException, NoOntologySelectedException{ - return getClientState(id).getSubsumptionHierarchy(); - } - - @WebMethod - public String[] retrieval(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ - return getClientState(id).retrieval(Concept); - } - - @WebMethod - public void readOntology(int id,String ontologyURL, String format)throws ClientNotKnownException,OntologyURLNotValid{ - getClientState(id).readOntology(ontologyURL, format); - - } - - @WebMethod - public void removeOntology(int id)throws ClientNotKnownException{ - getClientState(id).removeOntology(); - } - - @WebMethod - public String learnConcept(int id)throws ClientNotKnownException{ - return "Deprecated method"; - - } - - - @WebMethod - public String getAlgorithmStatus(int id ) throws ClientNotKnownException{ - - return getClientState(id).getAlgorithmStatus(); - } - - - @WebMethod - public void learnMonitored(int id )throws ClientNotKnownException{ - getClientState(id).learnMonitored(); - } - /*@WebMethod - public void relearn(int id,String Concept )throws ClientNotKnownException{ - getClientState(id).relearn(Concept); - }*/ - - @WebMethod - public String getLastResult(int id)throws ClientNotKnownException{ - return getClientState(id).getLastResult(); - } - - @WebMethod - public void stop(int id)throws ClientNotKnownException{ - getClientState(id).stop(); - } - - - //*************************USER MANAGEMENT - - public ClientState getClientState(int id)throws ClientNotKnownException{ - System.out.println("Request from "+id); - ClientState c=this.clients.get(new Integer(id)); - if(c==null){ - //System.out.println(clients.keySet().toString()); - throw new ClientNotKnownException("Client with id: "+id+" is not known","ClientNotKnownException");}; - return c; - - } - - - - - -} \ No newline at end of file Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,68 +0,0 @@ -package org.dllearner.server; - -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - -import org.dllearner.server.exceptions.ClientNotKnownException; - - -/** - * Offene Fragen: - * - * Welche Rückgabetypen sind erlaubt? - * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie - * gelesen werden)? - * - * @author Jens Lehmann - * - */ -@WebService(name = "DLLearnerWebService") - -@SOAPBinding(style = SOAPBinding.Style.RPC) -public class DLLearnerWS2 { - - /* - // String[] funktioniert leider noch nicht - @WebMethod - public void addPositiveExamples(String[] posExamples) { - for(String example : posExamples) - positiveExamples.add(new Individual(example)); - } - - @WebMethod - public void addNegativeExamples(String[] negExamples) { - for(String example : negExamples) - negativeExamples.add(new Individual(example)); - } - */ - - @WebMethod - /** - * @param name - * - * @return The sum - * @throws AddNumbersException - * if any of the numbers to be added is negative. - * - **/ - public String hellosimple(String name) throws ClientNotKnownException{ - /*for (int i = 0; i < name.length; i++) { - name[i]=i+"nnnn<br>"; - }*/ - if(name.equals("aa"))throw new ClientNotKnownException("a","b"); - - return "bbb"; - } - - - // Testmethode - @WebMethod - public String hello(String name){ - name=null; - //name.substring(5); - //throw new NullPointerException(); - return "Hello " + name + "!"; - } - -} \ No newline at end of file Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,71 +0,0 @@ -package org.dllearner.server; - - - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import javax.xml.ws.Endpoint; - -import com.sun.net.httpserver.HttpContext; -import com.sun.net.httpserver.HttpServer; - - -public class DLLearnerWSStart { - - public static void main(String[] args) { - String url = "http://139.18.114.78:8181/services"; - if (args.length > 0) - url = args[0]; - try{ - - InetSocketAddress isa=new InetSocketAddress("localhost",8181); - HttpServer server = HttpServer.create(isa, 5); - ExecutorService threads = Executors.newFixedThreadPool(5); - server.setExecutor(threads); - server.start(); - - System.out.print("Starting DL-Learner web service at http://" + - isa.getHostName()+":"+isa.getPort()+ "/services ... "); - Endpoint endpoint = Endpoint.create(new DLLearnerWS()); - //Endpoint endpoint = Endpoint.create(new CustomDataClass()); - HttpContext context = server.createContext("/services"); - endpoint.publish(context); - //Endpoint endpoint = Endpoint.publish(url, new DLLearnerWS()); - - System.out.println("OK."); - - - - System.out.println("Type \"exit\" to terminate web service."); - boolean terminate = false; - String inputString = ""; - do { - BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); - - try { - inputString = input.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - - if (inputString.equals("exit")) - terminate = true; - - } while (!terminate); - - System.out.print("Stopping web service ... "); - endpoint.stop(); - - server.stop(1); - threads.shutdown(); - System.out.println("OK."); - }catch (Exception e) {e.printStackTrace();} - } - -} Deleted: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,166 +0,0 @@ -package org.dllearner.server; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.SortedSet; -import java.util.TreeSet; - -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - -import org.dllearner.Config; -import org.dllearner.LearningProblem; -import org.dllearner.Main; -import org.dllearner.OntologyFileFormat; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.dl.Individual; -import org.dllearner.dl.KB; -import org.dllearner.reasoning.Reasoner; -import org.dllearner.reasoning.ReasoningMethodUnsupportedException; -import org.dllearner.reasoning.ReasoningService; - -/** - * Offene Fragen: - * - * Welche Rückgabetypen sind erlaubt? - * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie - * gelesen werden)? - * - * @author Jens Lehmann - * - */ -@WebService(name = "DLLearnerWebService") -@SOAPBinding(style = SOAPBinding.Style.RPC) -public class DLLearnerWSoriginal { - - // private String ontologyURL; - // private String ontologyFormat; - private Reasoner reasoner; - private ReasoningService rs; - private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); - private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); - - /** - * Specifies the URI of the ontology containing the background - * knowledge. Reads the ontology and sends it to the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - */ - // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch - /* - @WebMethod - public void readOntology(String ontologyURI) { - readOntology(ontologyURI, "RDF/XML"); - } - */ - - /** - * Specifies the URI of the ontology containing the background - * knowledge and its format. Reads the ontology and sends it to - * the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - * @param format "RDF/XML" or "N-TRIPLES". - */ - @WebMethod - public void readOntology(String ontologyURL, String format) { - // this.ontologyURL = ontologyURL; - // this.ontologyFormat = format; - - // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien - // laden könnte (Fix: nur http:// zulassen, kein file://) - URL ontology = null; - try { - ontology = new URL(ontologyURL); - } catch (MalformedURLException e1) { - e1.printStackTrace(); - } - - OntologyFileFormat ofFormat; - if (format.equals("RDF/XML")) - ofFormat = OntologyFileFormat.RDF_XML; - else - ofFormat = OntologyFileFormat.N_TRIPLES; - - Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); - m.put(ontology, ofFormat); - - // Default-URI für DIG-Reasoner setzen - try { - Config.digReasonerURL = new URL("http://localhost:8081"); - } catch (MalformedURLException e) { - // Exception tritt nie auf, da URL korrekt - e.printStackTrace(); - } - - reasoner = Main.createReasoner(new KB(), m); - - rs = new ReasoningService(reasoner); - - } - - - @WebMethod - public String[] testString(String c) { - - return new String[]{"a","b"}; - } - - // String[] funktioniert leider noch nicht - @WebMethod - public void addPositiveExamples(String[] posExamples) { - for(String example : posExamples) - positiveExamples.add(new Individual(example)); - } - - @WebMethod - public void addNegativeExamples(String[] negExamples) { - for(String example : negExamples) - negativeExamples.add(new Individual(example)); - } - - - @WebMethod - public void addPositiveExample(String posExample) { - positiveExamples.add(new Individual(posExample)); - } - - @WebMethod - public void addNegativeExample(String negExample) { - negativeExamples.add(new Individual(negExample)); - } - - @WebMethod - public String learnConcept() { - // notwendige Vorverarbeitungsschritte für den Lernalgorithmus - // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert - // werden - // - die Subsumptionhierarchie muss erstellt werden - // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen - Main.autoDetectConceptsAndRoles(rs); - reasoner.prepareSubsumptionHierarchy(); - if (Config.Refinement.improveSubsumptionHierarchy) { - try { - reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); - } catch (ReasoningMethodUnsupportedException e) { - // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl - e.printStackTrace(); - } - } - - LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); - // erstmal wird nur der Refinement-Learner als Web-Service angeboten - ROLearner learner = new ROLearner(learningProblem); - return learner.getBestSolution().toString(); - } - - // Testmethode - @WebMethod - public String hello(String name) { - return "Hello " + name + "!"; - } - -} \ No newline at end of file Deleted: trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java 2007-08-22 10:27:46 UTC (rev 19) +++ trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java 2007-08-22 10:39:07 UTC (rev 20) @@ -1,81 +0,0 @@ -package org.dllearner.server; - -import org.dllearner.Config; -import org.dllearner.LearningProblem; -import org.dllearner.Main; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.reasoning.ReasoningMethodUnsupportedException; - -public class LearnMonitor extends Thread { - - - private ClientState c; - private boolean active = false; - - //private ROLearner ROL; - - public LearnMonitor(ClientState c){ - this.c=c; - } - - - public void end(){ - - System.out.println("trying to end"); - System.out.println("ROL2"+c.ROL); - this.c.ROL.stop(); - c.setLastResult(c.ROL.getBestSolution().toString()); - c.setStatus("stopped"); - } - - public void learn(){ - - this.start(); - - } - - public void run(){ - try{ - c.setStatus("still running"); - active=true; - c.setStatus("running"); - - // notwendige Vorverarbeitungsschritte für den Lernalgorithmus - // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert - // werden - // - die Subsumptionhierarchie muss erstellt werden - // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen - Main.autoDetectConceptsAndRoles(c.getRs()); - c.getReasoner().prepareSubsumptionHierarchy(); - if (Config.Refinement.improveSubsumptionHierarchy) { - try { - c.getReasoner().getSubsumptionHierarchy().improveSubsumptionHierarchy(); - } catch (ReasoningMethodUnsupportedException e) { - // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl - e.printStackTrace(); - } - } - c.p("learning started"); - LearningProblem learningProblem = new LearningProblem(c.getRs(), c.getPosExamples(), c.getNegExamples()); - // erstmal wird nur der Refinement-Learner als Web-Service angeboten - //System.out.println("aaaa"); - c.ROL = new ROLearner(learningProblem); - - c.ROL.start(); - //new ROLearner(); - //c.p(("ROL1"+ROL)); - - - - - - - //c.setLastResult(c.ROL.getBestSolution().toString()); - c.setLastResult(c.ROL.getBestSolution().toString()); - c.setStatus("finished"); - - }catch (Exception e) {e.printStackTrace();} - finally{active=false;}; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 10:27:47
|
Revision: 19 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=19&view=rev Author: kurzum Date: 2007-08-22 03:27:46 -0700 (Wed, 22 Aug 2007) Log Message: ----------- Removed Paths: ------------- trunk/src/php-client/ontologies/arch.owl trunk/src/php-client/ontologies/father.owl trunk/src/php-client/ontologies/moral_complete.owl trunk/src/php-client/ontologies/trains.owl Deleted: trunk/src/php-client/ontologies/arch.owl =================================================================== --- trunk/src/php-client/ontologies/arch.owl 2007-08-22 10:19:42 UTC (rev 18) +++ trunk/src/php-client/ontologies/arch.owl 2007-08-22 10:27:46 UTC (rev 19) @@ -1,149 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE rdf:RDF [ - <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> -]> - -<rdf:RDF - xml:base="http://localhost/foo" - xmlns:a="http://localhost/foo#" - xmlns:owl="http://www.w3.org/2002/07/owl#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> - -<owl:Ontology rdf:about=""/> - -<owl:Class rdf:ID="freeStandingPillar"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#pillar"/> - <owl:Class> - <owl:complementOf> - <owl:Restriction> - <owl:onProperty rdf:resource="#touches"/> - <owl:someValuesFrom rdf:resource="&owl;Thing"/> - </owl:Restriction> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="parallelpipe"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#brick"/> - <owl:Class rdf:about="#wedge"/> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<a:brick rdf:ID="a"/> - -<a:brick rdf:ID="b"/> - -<a:brick rdf:ID="c"/> - -<a:construction rdf:ID="c1"> - <a:hasParallelpipe rdf:resource="#a"/> - <a:hasPillar rdf:resource="#p1"/> - <a:hasPillar rdf:resource="#p2"/> -</a:construction> - -<a:construction rdf:ID="c2"> - <a:hasParallelpipe rdf:resource="#b"/> - <a:hasPillar rdf:resource="#p3"/> - <a:hasPillar rdf:resource="#p4"/> -</a:construction> - -<a:construction rdf:ID="c3"> - <a:hasParallelpipe rdf:resource="#c"/> - <a:hasPillar rdf:resource="#p5"/> - <a:hasPillar rdf:resource="#p6"/> -</a:construction> - -<a:construction rdf:ID="c4"> - <a:hasParallelpipe rdf:resource="#d"/> - <a:hasPillar rdf:resource="#p7"/> - <a:hasPillar rdf:resource="#p8"/> -</a:construction> - -<a:construction rdf:ID="c5"> - <a:hasParallelpipe rdf:resource="#e"/> - <a:hasPillar rdf:resource="#p9"/> -</a:construction> - -<a:wedge rdf:ID="d"/> - -<a:wedge rdf:ID="e"/> - -<a:freeStandingPillar rdf:ID="p1"> - <rdf:type rdf:resource="#pillar"/> - <a:leftof rdf:resource="#p2"/> - <a:supports rdf:resource="#a"/> -</a:freeStandingPillar> - -<a:freeStandingPillar rdf:ID="p2"> - <rdf:type rdf:resource="#pillar"/> - <a:supports rdf:resource="#a"/> -</a:freeStandingPillar> - -<a:freeStandingPillar rdf:ID="p3"> - <rdf:type rdf:resource="#pillar"/> - <a:leftof rdf:resource="#p4"/> -</a:freeStandingPillar> - -<a:freeStandingPillar rdf:ID="p4"> - <rdf:type rdf:resource="#pillar"/> -</a:freeStandingPillar> - -<a:pillar rdf:ID="p5"> - <a:leftof rdf:resource="#p6"/> - <a:supports rdf:resource="#c"/> - <a:touches rdf:resource="#p6"/> -</a:pillar> - -<a:pillar rdf:ID="p6"> - <a:supports rdf:resource="#c"/> -</a:pillar> - -<a:freeStandingPillar rdf:ID="p7"> - <rdf:type rdf:resource="#pillar"/> - <a:leftof rdf:resource="#p8"/> - <a:supports rdf:resource="#d"/> -</a:freeStandingPillar> - -<a:freeStandingPillar rdf:ID="p8"> - <rdf:type rdf:resource="#pillar"/> - <a:supports rdf:resource="#d"/> -</a:freeStandingPillar> - -<a:freeStandingPillar rdf:ID="p9"> - <rdf:type rdf:resource="#pillar"/> - <a:supports rdf:resource="#e"/> -</a:freeStandingPillar> - -<owl:Class rdf:ID="brick"/> - -<owl:Class rdf:ID="construction"/> - -<owl:Class rdf:ID="pillar"/> - -<owl:Class rdf:ID="wedge"/> - -<owl:Class rdf:about="&owl;Thing"/> - -<owl:ObjectProperty rdf:ID="hasParallelpipe"/> - -<owl:ObjectProperty rdf:ID="hasPillar"/> - -<owl:ObjectProperty rdf:ID="leftof"/> - -<owl:ObjectProperty rdf:ID="supports"/> - -<owl:ObjectProperty rdf:ID="touches"/> - -</rdf:RDF> Deleted: trunk/src/php-client/ontologies/father.owl =================================================================== --- trunk/src/php-client/ontologies/father.owl 2007-08-22 10:19:42 UTC (rev 18) +++ trunk/src/php-client/ontologies/father.owl 2007-08-22 10:27:46 UTC (rev 19) @@ -1,35 +0,0 @@ -<?xml version="1.0"?> -<rdf:RDF - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:xsd="http://www.w3.org/2001/XMLSchema#" - xmlns="http://example.com/father#" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" - xmlns:owl="http://www.w3.org/2002/07/owl#" - xml:base="http://example.com/father"> - <owl:Ontology rdf:about=""/> - <owl:Class rdf:ID="female"/> - <owl:Class rdf:ID="male"> - <owl:equivalentClass> - <owl:Class> - <owl:complementOf rdf:resource="#female"/> - </owl:Class> - </owl:equivalentClass> - </owl:Class> - <owl:ObjectProperty rdf:ID="hasChild"/> - <male rdf:ID="markus"> - <hasChild> - <female rdf:ID="anna"> - <hasChild> - <male rdf:ID="heinz"/> - </hasChild> - </female> - </hasChild> - </male> - <male rdf:ID="stefan"> - <hasChild rdf:resource="#markus"/> - </male> - <female rdf:ID="michelle"/> - <male rdf:ID="martin"> - <hasChild rdf:resource="#heinz"/> - </male> -</rdf:RDF> Deleted: trunk/src/php-client/ontologies/moral_complete.owl =================================================================== --- trunk/src/php-client/ontologies/moral_complete.owl 2007-08-22 10:19:42 UTC (rev 18) +++ trunk/src/php-client/ontologies/moral_complete.owl 2007-08-22 10:27:46 UTC (rev 19) @@ -1,16978 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE rdf:RDF [ - <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> -]> - -<rdf:RDF - xml:base="http://localhost/foo" - xmlns:a="http://localhost/foo#" - xmlns:owl="http://www.w3.org/2002/07/owl#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> - -<owl:Ontology rdf:about=""/> - -<owl:Class rdf:ID="blameworthy"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#responsible"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Restriction> - <owl:onProperty rdf:resource="#severity_harm"/> - <owl:someValuesFrom> - <owl:Restriction> - <owl:onProperty rdf:resource="#greater"/> - <owl:someValuesFrom rdf:resource="&owl;Thing"/> - </owl:Restriction> - </owl:someValuesFrom> - </owl:Restriction> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Restriction> - <owl:onProperty rdf:resource="#benefit_victim"/> - <owl:someValuesFrom> - <owl:Restriction> - <owl:onProperty rdf:resource="#smaller"/> - <owl:someValuesFrom rdf:resource="&owl;Thing"/> - </owl:Restriction> - </owl:someValuesFrom> - </owl:Restriction> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#justified"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="cause"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#produce_harm"/> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#necessary_for_harm"/> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:unionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="foreseeable"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#high_foreseeability"/> - <owl:Class rdf:about="#low_foreseeability"/> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="guilty"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#blameworthy"/> - <owl:Class rdf:about="#vicarious_blame"/> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="intend_c"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#strong_intend"/> - <owl:Class rdf:about="#weak_intend"/> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="intend_mental_state"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#reckless_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#negligent_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#neither_mental_state"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="intervening_cause"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#intervening_contribution"/> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#foresee_intervention"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="justified"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#achieve_goal"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#goal_outweigh_harm"/> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="negligent_c"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#negligent_mental_state"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#strong_intend"/> - </owl:complementOf> - </owl:Class> - <owl:Class rdf:about="#low_foreseeability"/> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="negligent_mental_state"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#reckless_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intend_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#neither_mental_state"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="neither_mental_state"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#reckless_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#negligent_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intend_mental_state"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="notaccident"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#intend_c"/> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#reckless_c"/> - <owl:Class rdf:about="#negligent_c"/> - </owl:unionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="reckless_c"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#reckless_mental_state"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#high_foreseeability"/> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#strong_intend"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="reckless_mental_state"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intend_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#negligent_mental_state"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#neither_mental_state"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="responsible"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#cause"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#notaccident"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#voluntary"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#foreseeable"/> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_cause"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="strong_intend"> - <owl:equivalentClass> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#intend_mental_state"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#plan_known"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#plan_include_harm"/> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="vicarious"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#someone_else_cause_harm"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#outrank_perpetrator"/> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="vicarious_blame"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#vicarious"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Restriction> - <owl:onProperty rdf:resource="#severity_harm"/> - <owl:someValuesFrom> - <owl:Restriction> - <owl:onProperty rdf:resource="#greater"/> - <owl:someValuesFrom rdf:resource="&owl;Thing"/> - </owl:Restriction> - </owl:someValuesFrom> - </owl:Restriction> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Restriction> - <owl:onProperty rdf:resource="#benefit_victim"/> - <owl:someValuesFrom> - <owl:Restriction> - <owl:onProperty rdf:resource="#smaller"/> - <owl:someValuesFrom rdf:resource="&owl;Thing"/> - </owl:Restriction> - </owl:someValuesFrom> - </owl:Restriction> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#justified"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="voluntary"> - <owl:equivalentClass> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<owl:Class rdf:ID="weak_intend"> - <owl:equivalentClass> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:unionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#monitor"/> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class rdf:about="#benefit_protagonist"/> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:unionOf> - </owl:Class> - <owl:Class> - <owl:intersectionOf rdf:parseType="Collection"> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#negligent_c"/> - </owl:complementOf> - </owl:Class> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#reckless_c"/> - </owl:complementOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:intersectionOf> - </owl:Class> - </owl:equivalentClass> -</owl:Class> - -<a:achieve_goal rdf:ID="n0"> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#external_cause"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type rdf:resource="#reckless_mental_state"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_contribution"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v0"/> -</a:achieve_goal> - -<a:control_perpetrator rdf:ID="n1"> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#neither_mental_state"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#foresee_intervention"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_include_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v0"/> -</a:control_perpetrator> - -<a:achieve_goal rdf:ID="n10"> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#someone_else_cause_harm"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_contribution"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_include_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v0"/> -</a:achieve_goal> - -<a:benefit_protagonist rdf:ID="n11"> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#external_force"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type rdf:resource="#someone_else_cause_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_outweigh_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_contribution"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_include_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_known"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v1"/> -</a:benefit_protagonist> - -<a:external_cause rdf:ID="n12"> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_include_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v0"/> -</a:external_cause> - -<a:achieve_goal rdf:ID="n13"> - <rdf:type rdf:resource="#benefit_protagonist"/> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#external_force"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#reckless_mental_state"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_known"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v1"/> -</a:achieve_goal> - -<a:achieve_goal rdf:ID="n14"> - <rdf:type rdf:resource="#benefit_protagonist"/> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#external_cause"/> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type rdf:resource="#reckless_mental_state"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#foresee_intervention"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_contribution"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v1"/> -</a:achieve_goal> - -<a:benefit_protagonist rdf:ID="n15"> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type rdf:resource="#reckless_mental_state"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_outweigh_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#intervening_contribution"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v0"/> -</a:benefit_protagonist> - -<a:benefit_protagonist rdf:ID="n16"> - <rdf:type rdf:resource="#external_cause"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#neither_mental_state"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#someone_else_cause_harm"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#plan_known"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v0"/> -</a:benefit_protagonist> - -<a:careful rdf:ID="n17"> - <rdf:type rdf:resource="#external_cause"/> - <rdf:type rdf:resource="#external_force"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#outrank_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v0"/> - <a:severity_harm rdf:resource="#v1"/> -</a:careful> - -<a:control_perpetrator rdf:ID="n18"> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#careful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#foresee_intervention"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v1"/> -</a:control_perpetrator> - -<a:achieve_goal rdf:ID="n19"> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#control_perpetrator"/> - <rdf:type rdf:resource="#foresee_intervention"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#someone_else_cause_harm"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#benefit_protagonist"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_achieveable_less_harmful"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#goal_outweigh_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#harm_caused_as_planned"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#monitor"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#necessary_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#produce_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v0"/> -</a:achieve_goal> - -<a:benefit_protagonist rdf:ID="n2"> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#external_cause"/> - <rdf:type rdf:resource="#goal_achieveable_less_harmful"/> - <rdf:type rdf:resource="#goal_outweigh_harm"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#intervening_contribution"/> - <rdf:type rdf:resource="#low_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#neither_mental_state"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_include_harm"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#produce_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#achieve_goal"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#foresee_intervention"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#someone_else_cause_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#sufficient_for_harm"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <a:benefit_victim rdf:resource="#v1"/> - <a:severity_harm rdf:resource="#v1"/> -</a:benefit_protagonist> - -<a:achieve_goal rdf:ID="n20"> - <rdf:type rdf:resource="#benefit_protagonist"/> - <rdf:type rdf:resource="#careful"/> - <rdf:type rdf:resource="#harm_caused_as_planned"/> - <rdf:type rdf:resource="#high_foreseeability"/> - <rdf:type rdf:resource="#monitor"/> - <rdf:type rdf:resource="#necessary_for_harm"/> - <rdf:type rdf:resource="#negligent_mental_state"/> - <rdf:type rdf:resource="#outrank_perpetrator"/> - <rdf:type rdf:resource="#plan_known"/> - <rdf:type rdf:resource="#sufficient_for_harm"/> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#control_perpetrator"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_cause"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:complementOf> - <owl:Class rdf:about="#external_force"/> - </owl:complementOf> - </owl:Class> - </rdf:type> - <rdf:type> - <owl:Class> - <owl:comp... [truncated message content] |
From: <ku...@us...> - 2007-08-22 10:19:43
|
Revision: 18 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=18&view=rev Author: kurzum Date: 2007-08-22 03:19:42 -0700 (Wed, 22 Aug 2007) Log Message: ----------- added arch.owl Added Paths: ----------- trunk/src/php-client/ontologies/arch.owl Added: trunk/src/php-client/ontologies/arch.owl =================================================================== --- trunk/src/php-client/ontologies/arch.owl (rev 0) +++ trunk/src/php-client/ontologies/arch.owl 2007-08-22 10:19:42 UTC (rev 18) @@ -0,0 +1,149 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE rdf:RDF [ + <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> +]> + +<rdf:RDF + xml:base="http://localhost/foo" + xmlns:a="http://localhost/foo#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> + +<owl:Ontology rdf:about=""/> + +<owl:Class rdf:ID="freeStandingPillar"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#pillar"/> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#touches"/> + <owl:someValuesFrom rdf:resource="&owl;Thing"/> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:Class rdf:ID="parallelpipe"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#brick"/> + <owl:Class rdf:about="#wedge"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<a:brick rdf:ID="a"/> + +<a:brick rdf:ID="b"/> + +<a:brick rdf:ID="c"/> + +<a:construction rdf:ID="c1"> + <a:hasParallelpipe rdf:resource="#a"/> + <a:hasPillar rdf:resource="#p1"/> + <a:hasPillar rdf:resource="#p2"/> +</a:construction> + +<a:construction rdf:ID="c2"> + <a:hasParallelpipe rdf:resource="#b"/> + <a:hasPillar rdf:resource="#p3"/> + <a:hasPillar rdf:resource="#p4"/> +</a:construction> + +<a:construction rdf:ID="c3"> + <a:hasParallelpipe rdf:resource="#c"/> + <a:hasPillar rdf:resource="#p5"/> + <a:hasPillar rdf:resource="#p6"/> +</a:construction> + +<a:construction rdf:ID="c4"> + <a:hasParallelpipe rdf:resource="#d"/> + <a:hasPillar rdf:resource="#p7"/> + <a:hasPillar rdf:resource="#p8"/> +</a:construction> + +<a:construction rdf:ID="c5"> + <a:hasParallelpipe rdf:resource="#e"/> + <a:hasPillar rdf:resource="#p9"/> +</a:construction> + +<a:wedge rdf:ID="d"/> + +<a:wedge rdf:ID="e"/> + +<a:freeStandingPillar rdf:ID="p1"> + <rdf:type rdf:resource="#pillar"/> + <a:leftof rdf:resource="#p2"/> + <a:supports rdf:resource="#a"/> +</a:freeStandingPillar> + +<a:freeStandingPillar rdf:ID="p2"> + <rdf:type rdf:resource="#pillar"/> + <a:supports rdf:resource="#a"/> +</a:freeStandingPillar> + +<a:freeStandingPillar rdf:ID="p3"> + <rdf:type rdf:resource="#pillar"/> + <a:leftof rdf:resource="#p4"/> +</a:freeStandingPillar> + +<a:freeStandingPillar rdf:ID="p4"> + <rdf:type rdf:resource="#pillar"/> +</a:freeStandingPillar> + +<a:pillar rdf:ID="p5"> + <a:leftof rdf:resource="#p6"/> + <a:supports rdf:resource="#c"/> + <a:touches rdf:resource="#p6"/> +</a:pillar> + +<a:pillar rdf:ID="p6"> + <a:supports rdf:resource="#c"/> +</a:pillar> + +<a:freeStandingPillar rdf:ID="p7"> + <rdf:type rdf:resource="#pillar"/> + <a:leftof rdf:resource="#p8"/> + <a:supports rdf:resource="#d"/> +</a:freeStandingPillar> + +<a:freeStandingPillar rdf:ID="p8"> + <rdf:type rdf:resource="#pillar"/> + <a:supports rdf:resource="#d"/> +</a:freeStandingPillar> + +<a:freeStandingPillar rdf:ID="p9"> + <rdf:type rdf:resource="#pillar"/> + <a:supports rdf:resource="#e"/> +</a:freeStandingPillar> + +<owl:Class rdf:ID="brick"/> + +<owl:Class rdf:ID="construction"/> + +<owl:Class rdf:ID="pillar"/> + +<owl:Class rdf:ID="wedge"/> + +<owl:Class rdf:about="&owl;Thing"/> + +<owl:ObjectProperty rdf:ID="hasParallelpipe"/> + +<owl:ObjectProperty rdf:ID="hasPillar"/> + +<owl:ObjectProperty rdf:ID="leftof"/> + +<owl:ObjectProperty rdf:ID="supports"/> + +<owl:ObjectProperty rdf:ID="touches"/> + +</rdf:RDF> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ku...@us...> - 2007-08-22 10:18:10
|
Revision: 17 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=17&view=rev Author: kurzum Date: 2007-08-22 03:18:08 -0700 (Wed, 22 Aug 2007) Log Message: ----------- added php lcient Added Paths: ----------- trunk/src/php-client/LearnerClient.php trunk/src/php-client/Model.php trunk/src/php-client/Settings.php trunk/src/php-client/default.css trunk/src/php-client/index.php trunk/src/php-client/jscript/ trunk/src/php-client/jscript/script.js trunk/src/php-client/jscript/tip_centerwindow.js trunk/src/php-client/jscript/tip_followscroll.js trunk/src/php-client/jscript/wz_tooltip.js trunk/src/php-client/master.php trunk/src/php-client/ontologies/ trunk/src/php-client/ontologies/father.owl trunk/src/php-client/ontologies/moral_complete.owl trunk/src/php-client/ontologies/trains.owl trunk/src/php-client/pear/ trunk/src/php-client/pear/HTTP_Request.php trunk/src/php-client/pear/PEAR.php trunk/src/php-client/pear/Socket.php trunk/src/php-client/pear/URL.php trunk/src/php-client/save/ trunk/src/php-client/save/arch_working trunk/src/php-client/save/father_working trunk/src/php-client/save/not_working_for_testing trunk/src/php-client/save/train_working Property Changed: ---------------- trunk/src/php-client/ Property changes on: trunk/src/php-client ___________________________________________________________________ Name: svn:ignore + main.wsdl def0.xsd def1.xsd java_server.zip php_client.zip Added: trunk/src/php-client/LearnerClient.php =================================================================== --- trunk/src/php-client/LearnerClient.php (rev 0) +++ trunk/src/php-client/LearnerClient.php 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,299 @@ +<?php +require_once 'pear/HTTP_Request.php'; + + + class LearnerClient{ + private $soapclient; + private $id; + + + public function __construct($wsdluri,$getID=0){ + + $this->loadWSDLfiles($wsdluri); + $this->soapclient = new SoapClient("main.wsdl"); + if($getID==0) + { + $this->id=$this->soapclient->getID(); + } + else + { + $this->id=$getID; + } + + + } + + /*public function __construct($wsdluri,$id){ + + $this->loadWSDLfiles($wsdluri); + $this->soapclient = new SoapClient("main.wsdl"); + $this->id=$id; + + }*/ + + public function getID(){ + return $this->id; + } + + + // this could maybe be a + //nice function which encapsulates everything + public function getClientState($id){ + + + } + + public function getInstances($id){ + $obj= $this->soapclient->getInstances($id); + return $this->parseStringlist($obj); + + } + + public function getAtomicConcepts($id) + { $obj= $this->soapclient->getAtomicConcepts($id); + return $this->parseStringlist($obj); + } + + public function retrieval($id,$concept){ + $obj= $this->soapclient->retrieval($id,$concept); + return $this->parseStringlist($obj); + } + + public function getAtomicRoles($id){ + $obj= $this->soapclient->getAtomicRoles($id); + return $this->parseStringlist($obj); + } + public function getIndividualsForARole($id,$Role){ + $obj= $this->soapclient->getIndividualsForARole($id,$Role); + return $this->parseStringlist($obj); + } + + public function getPositiveExamples($id){ + $obj= $this->soapclient->getPositiveExamples($id); + return $this->parseStringlist($obj); + + } + + public function getNegativeExamples($id){ + $obj= $this->soapclient->getNegativeExamples($id); + return $this->parseStringlist($obj); + + + } + public function getIgnoredConcepts($id){ + $obj= $this->soapclient->getIgnoredConcepts($id); + return $this->parseStringlist($obj); + } + public function getSubsumptionHierarchy($id){ + return $this->soapclient->getSubsumptionHierarchy($id); + } + + public function addPositiveExample($id,$name){ + return $this->soapclient->addPositiveExample($id,$name); + + } + + + + public function addNegativeExample($id,$name){ + return $this->soapclient->addNegativeExample($id,$name); + + } + public function addIgnoredConcept($id,$name){ + return $this->soapclient->addIgnoredConcept($id,$name); + + } + + public function selectInstancesForAConcept($id,$Concept){ + $obj=$this->soapclient->selectInstancesForAConcept($id,$Concept); + return $this->parseStringlist($obj); + } + public function selectAConcept($id,$Concept,$Percentage=100){ + $obj=$this->soapclient->selectAConcept($id,$Concept,$Percentage); + return $this->parseStringlist($obj); + } + + public function removePositiveExample($id,$name){ + return $this->soapclient->removePositiveExample($id,$name); + } + + public function removeNegativeExample($id,$name){ + return $this->soapclient->removeNegativeExample($id,$name); + } + public function removeAllPositiveExamples($id){ + return $this->soapclient->removeAllPositiveExamples($id); + } + public function removeAllNegativeExamples($id){ + return $this->soapclient->removeAllNegativeExamples($id); + } + public function removeAllExamples($id){ + return $this->soapclient->removeAllExamples($id); + } + public function removeIgnoredConcept($id,$name){ + return $this->soapclient->removeIgnoredConcept($id,$name); + } + + public function getCurrentOntologyURL($id){ + return $this->soapclient->getCurrentOntologyURL($id); + } + + public function removeOntology($id){ + $this->soapclient->removeOntology($id); + } + + public function readOntology($id,$ontologyURI,$format='RDF/XML'){ + $this->soapclient->readOntology($id,$ontologyURI,$format); + } + + public function getAlgorithmStatus($id){ + + return $this->soapclient->getAlgorithmStatus($id); + + } + + /*public function hello($arr){ + + return $this->soapclient->hello($arr); + + }*/ + + public function learnConcept($id){ + + + $concept = $this->soapclient->learnConcept($id); + return $concept; + } + + public function learnMonitored($id){ + $this->soapclient->learnMonitored($id); + } + + /*public function relearn($id,$concept){ + $this->soapclient->relearn($id,$concept); + }*/ + + + public function getLastResult($id){ + + + return $this->soapclient->getLastResult($id); + + } + + public function stop($id){ + try{ + $this->soapclient->stop($id); + }catch (Exception $e){echo "<xmp>"; print_r($e);} + } + + + + /**WSDL MANAGEMENT******/ + + + public function getInfo(){ + + $functions = $this->soapclient->__getFunctions(); + echo '<b>Verf\xFCgbare Methoden:</b>'; + echo '<pre>'; + print_r($functions); + echo '</pre>'; + + + } + + + public function loadWSDLfiles($wsdluri){ + $main=$this->getwsdl($wsdluri); + $other=$this->getOtherWSDL($main); + $newMain=$this->changeWSDL($main); + $this->writeToFile("main.wsdl",$newMain); + $x=0; + foreach ($other as $o){ + $this->writeToFile("def".($x++).".xsd",$this->getwsdl($o)); + } + + } + + public function changeWSDL($wsdl){ + $before="<xsd:import schemaLocation=\""; + $after="\" namespace=\""; + $newWSDL=""; + $desca="def"; + $descb=".xsd"; + $x=0; + while($posstart= strpos ( $wsdl, $before )){ + + $posstart+=strlen($before); + $newWSDL.=substr($wsdl,0,$posstart); + $wsdl=substr($wsdl,$posstart); + $newWSDL.=$desca.($x++).$descb; + $posend= strpos ( $wsdl, $after ); + $wsdl=substr($wsdl,$posend); + + } + return $newWSDL.$wsdl; + + } + + public function getOtherWSDL($wsdl){ + $before="<xsd:import schemaLocation=\""; + $after="\" namespace=\""; + $ret=array(); + while($posstart= strpos ( $wsdl, $before )){ + $posstart+=strlen($before); + $wsdl=substr($wsdl,$posstart); + $posend= strpos ( $wsdl, $after ); + $tmp=substr($wsdl,0,$posend); + $ret[]=$tmp; + $wsdl=substr($wsdl,$posend+strlen($after)); + } + return $ret; + } + + + + + public function getwsdl($wsdluri){ + // this is copied from the Pear example + // please don't ask me how it works + $req = &new HTTP_Request($wsdluri); + $message=""; + $req->setMethod(HTTP_REQUEST_METHOD_GET); + $req->sendRequest(); + $ret=$req->getResponseBody(); + return $ret; + } + + + + public function writeToFile($filename,$content){ + + $fp=fopen($filename,"w"); + fwrite($fp,$content); + fclose($fp); + + } + + public function parseStringlist($a) + { + ini_set('error_reporting',E_ALL & ~E_NOTICE); + $list=$a->item; + ini_set('error_reporting',E_ALL & ~E_NOTICE); + if(sizeof($list)==0) + { + + return array(); + } + else if(sizeof($list)==1) + { + $tmp=array(); + $tmp[]=$list; + return $tmp; + } + + return $list; + } +} + +?> \ No newline at end of file Added: trunk/src/php-client/Model.php =================================================================== --- trunk/src/php-client/Model.php (rev 0) +++ trunk/src/php-client/Model.php 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,575 @@ +<?php + + +include_once("Settings.php"); +include_once("LearnerClient.php"); +require_once 'pear/HTTP_Request.php'; + + +class Model{ + + public $lc; + public $id; + + + + + public $lastResult; + public $currentOntology; + public $ontologySelected; + public $positives; + public $negatives; + public $instances; + public $error=""; + public $errorOccurred; + public $algorithmStatus; + public $message=""; + public $instancesOfConcepts; + public $conceptsOfinstances; + public $concepts; + public $rolesOfInstances; + public $roles; + public $retrievalActive; + public $ignoredClasses; + public $subsumptionHierarchy; + + + public function __construct($id,$learnerclient,$retrievalActive="active"){ + + $this->lc=$learnerclient; + $this->ontologySelected=false; + $this->id=$id; + $this->errorOccurred=false; + $this->algorithmStatus=""; + $this->conceptsOfinstances=array(); + $this->rolesOfInstances=array(); + $this->roles=array(); + $this->instancesOfConcepts=array(); + $this->ignoredConcepts=array(); + $this->retrievalActive=($retrievalActive=='active')?true:false; + + + + } + + + public function make(){ + + $this->lastResult=$this->lc->getLastResult($this->id); + + + try{ + + $this->currentOntology=$this->lc->getCurrentOntologyURL($this->id); + //exception is thrown above, if no ontology is selected + $this->ontologySelected=true; + $this->concepts=$this->lc->getAtomicConcepts($this->id); + $this->roles=$this->lc->getAtomicRoles($this->id); + $this->instances=$this->lc->getInstances($this->id); + //print_r($this->instances); + $this->positives=$this->lc->getPositiveExamples($this->id); + $this->negatives=$this->lc->getNegativeExamples($this->id); + $this->instances=array_diff($this->instances,$this->positives,$this->negatives); + $this->ignoredConcepts=$this->lc->getIgnoredConcepts($this->id); + $this->algorithmStatus=$this->lc->getAlgorithmStatus($this->id); + $this->subsumptionHierarchy=$this->lc->getSubsumptionHierarchy($this->id); + + if($this->retrievalActive) + { + foreach ($this->concepts as $one) + { + $instanceList=$this->lc->retrieval($this->id,$one); + $this->instancesOfConcepts["$one"]=$instanceList; + foreach ($instanceList as $inner) + { + $this->conceptsOfinstances["$inner"] []=$one; + } + } + foreach ($this->roles as $one) + { + $instanceList=$this->lc->getIndividualsForARole($this->id,$one); + foreach ($instanceList as $inner) + { + $this->rolesOfInstances["$inner"] []=$one; + } + } + + + } + + //echo "<xmp>"; + //print_r($this->instancesOfConcepts); + //print_r($this->conceptsOfinstances); + + + + + + + }catch(Exception $e){ + ini_set('error_reporting',E_ALL ); + $this->errorOccurred=true; + $this->error.="-".$e->getMessage()."<br>"; + if($this->error=="Select Ontology First"){ + $this->ontologySelected=false; + } + + + } + } + + + + public function getError(){ + return $this->error; + } + public function getMessage(){ + return $this->message; + } + + + public function getOntologySelect(){ + if($this->ontologySelected){ + + $ret= "Currently selected ontology: <br>".$this->currentOntology." + <a href='index.php?selectOntology='>choose other ontology</a>"; + return $ret; + } + + else { + + $ret= "Choose or type in Ontology:<br><br>"; + $settings=new Settings(); + $ontos=$this->listAvailableOntologies($settings->baseuri, $settings->ontodir); + //print_r( $ontos); + foreach (array_keys($ontos) as $ont){ + $ret.= "<a href=\"index.php?selectOntology=".$ontos["$ont"]." \">".$ont."</a><br>"; + } + $ret.= " <form action='index.php' method='get'> + <input type='text' name='selectOntology'> + <input type='submit' value='submit'> + </form>"; + return $ret; + } + } + + public function getInstanceView(){ + + if(sizeof($this->instances )==0){return "None";} + + $ret="Press 'pos' to add instance to positive examples, 'neg' for negative<br><br>"; + //$arr=array_diff($instances,$positives,$negatives); + + foreach ($this->instances as $a) + { + $b=$this->shorten($a); + //unable to use \n in tooltip, html only + $tooltip=$this->getTooltipForInstance($a); + $ret.= "<dummy ".$tooltip.">"; + $ret.=$b ."</dummy> + <a href='index.php?action=add&where=pos&subject=".urlencode($a)."'>pos</a>| + <a href='index.php?action=add&where=neg&subject=".urlencode($a)."'>neg</a> + <br>"; + } + + return $ret; + + } + + public function getExamples() + { + $ret= "<font color='#00AAAA'> + <b>Positive Examples</b> + (<a href='index.php?action=remove&where=examples&subject=pos'>clear</a>):<br>"; + if(sizeof($this->positives)==0) + { + $this->positives=array(); + $ret.= "None selected<br>"; + } + + foreach ($this->positives as $p) + { + $b=$this->shorten($p); + //unable to use \n in tooltip, html only + $tooltip=$this->getTooltipForInstance($p); + $ret.= "<dummy ".$tooltip.">"; + $ret.=$b ."</dummy> + <a href='index.php?action=remove&where=pos&subject=".urlencode($p)."'>remove</a><br>"; + } + + $ret.= "</font><br><font color='#FF0000'> + <b>Negative Examples</b> + (<a href='index.php?action=remove&where=examples&subject=neg'>clear</a>):<br>"; + if(sizeof($this->negatives)==0) + { + $this->negatives=array(); + $ret.= "None selected<br>"; + } + foreach ($this->negatives as $n) + { + $b=$this->shorten($n); + //unable to use \n in tooltip, html only + $tooltip=$this->getTooltipForInstance($n); + $ret.= "<dummy ".$tooltip." >"; + $ret.=$b ."</dummy> + <a href='index.php?action=remove&where=neg&subject=".urlencode($n)."'>remove</a><br>"; + } + $ret.="</font><br>"; + + + + $test=array_intersect($this->positives,$this->negatives); + + $tmp=""; + foreach ($test as $one) + { + $b=$this->shorten($one); + //unable to use \n in tooltip, html only + $tooltip=$this->getTooltipForInstance($one); + $tmp.= "<dummy ".$tooltip." >"; + $tmp.=$b ."</dummy> + <a href='index.php?action=remove&where=neg&subject=".urlencode($one)."'><font color='#00AAAA'>pos</font></a>| + <a href='index.php?action=remove&where=pos&subject=".urlencode($one)."'><font color='#FF0000'>neg</font></a> <br>"; + } + if(sizeof($test)>=1){ + $t=$this->getTooltip("Inconsistent examples means, that there instances<br> beloning at the same time to the positive and<br> negative example set<br>Choose in which set they should belong"); + $ret.="<font color='#FFAA00' ".$t."><b><blink>Inconsistencies:</blink></b><br>".$tmp."</font><br>"; + } + + if(sizeof($this->positives)>=1||sizeof($this->negatives)>=1) + { + $ret.=" + <br>save your example set here: + <br> + <form action='index.php' method='get'> + <input type='text' name='filename' value='filename'> + <input type='submit' name='savedset' value='save'> + </form><br> + <a href='index.php?action=remove&where=examples&subject=all' >clear all examples</a>"; + } + + + + return $ret; + } + + public function getConcepts() + { + if(sizeof( $this->concepts)==0){return "";} + else + { $ret=""; + $uri="index.php?"; + + $tt1=$this->getTooltip("Choose to automatically add instances of this class to positives examples<br>and try to estimate negative examples"); + $tt2=$this->getTooltip("Choose to ignore a class when learning, can be used to relearn a concept definition"); + + $ret.="Ignored Classes:<br>".((sizeof($this->ignoredConcepts)==0)?"None<br>":""); + + foreach ($this->ignoredConcepts as $one) + { + + $tooltip=$this->getTooltipForConcepts($one); + $ret.="<i ".$tooltip." >". + shorten($one)." (".sizeof($this->instancesOfConcepts["$one"]).") + </i>". + " <a href='".$uri."action=select&class=".urlencode($one)."' ".($tt1).">select</a> | + <a href='".$uri."action=aknowledge&class=".urlencode($one)."' ".($tt2).">aknowledge</a><br>"; + } + + $ret.="<br>Classes:<br>"; + foreach ($this->concepts as $one) + { + if(in_array($one,$this->ignoredConcepts))continue; + $tooltip=$this->getTooltipForConcepts($one); + $ret.="<dummy ".$tooltip." >". + shorten($one)." (".sizeof($this->instancesOfConcepts["$one"]).") + </dummy>". + " <a href='".$uri."action=select&class=".urlencode($one)."' ".($tt1).">select</a> | + <a href='".$uri."action=ignore&class=".urlencode($one)."' ".($tt2).">ignore</a><br>"; + } + return $ret; + } + + } + + public function getRoles() + { + if(sizeof( $this->roles)==0){return "";} + else + { $ret=""; + //$ret.="Ignored Classes:<br>".((sizeof($this->ignoredConcepts)==0)?"None<br>":""); + + foreach ($this->roles as $one) + { + $tooltip=$this->getTooltip($one); + $ret.="<li ".$tooltip." >". + shorten($one)." </li>"; + } + + + return $ret; + } + + } + + + + public function getPossibleActions() + { + $ret="Start learning: <br>"; + + if(!$this->ontologySelected) + { + $ret.="Select ontology first"; + } + + else if($this->algorithmStatus=="running") + { + $ret.="Algorithm is running, <br>try to refresh using the buttons"; + } + else if(sizeof(array_intersect($this->positives,$this->negatives))>=1) + { $t=$this->getTooltip("Inconsistent examples means, that there instances<br> beloning at the same time to the positive and<br> negative example set<br>Choose in which set they should belong"); + $ret.="<font color='#FFAA00' ".$t."><b>There are inconsistencies</b></font>"; + } + else if(sizeof($this->positives)*sizeof($this->negatives)>=1) + { + $ret.=" + <form action=index.php method=get> + <input type='submit' name='start' value='start'> + </form>"; + } + else + { + $ret.="<b>Select at least one positive and one negative instance first</b>"; + + } + + $tooltip="Retrieval means the extra tooltip information,<br> if you hover over the instances<br> greatly improves performance"; + if($this->retrievalActive){ + $ret.="<br><a href='index.php?retrieval=inactive' ".$this->getTooltip($tooltip).">stop retrieval</a>"; + } + else{ + $ret.="<br><a href='index.php?retrieval=active' ".$this->getTooltip($tooltip).">start retrieval</a>"; + } + + return $ret; + + + } + + public function getView(){ + + + + } + + public function shorten($a) + { + if(($strpos=strpos($a,'#'))>=4){ + return substr($a,$strpos); + } + else {return $a;} + } + + + + + public function getSavedSets($savedset=false,$filename=false,$desc=false){ + $ret=""; + $settings=new Settings(); + + switch ($savedset){ + case "delete": + if(is_file($settings->savedir.$filename)) + unlink($settings->savedir.$filename); + break; + case "restore": + $this->restoreSavedSet($filename); + break; + case "save": + $this->saveSets($filename,$desc); + break; + + } + + + $saves=$this->listdir($settings->savedir); + + foreach ($saves as $one){ + $xml=simplexml_load_file(($settings->savedir).$one); + if($xml->ontologyURI==$this->currentOntology) + { + $ret.="<li><dummy onmouseover=\"Tip('".$xml->description."')\" >" + .$one. + "</dummy> + <a href='index.php?savedset=restore&filename=".$one."'>restore</a> + <a href='index.php?savedset=delete&filename=".$one."'>delete</a></li> + <br>"; + } + + }//foreach + + if ($ret!=""){ + $ret="Hover over the names to get a description<br>".$ret; + } + return $ret; + // echo "<xmp>"; + // print_r($xml); + // echo "</xmp>"; + + } + public function saveSets($filename,$description){ + $filename=str_replace( " ","_",$filename); + + $xmlstr="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><root></root>"; + $xml = new SimpleXMLElement($xmlstr); + $xml->addChild('ontologyURI',$this->currentOntology); + + $xml->addChild('positives'); + $xml->addChild('negatives'); + $description="".$this->currentOntology; + $description.="<br><br>positives:<br>"; + foreach ($this->positives as $one){ + $xml->positives->addChild('positive',$one); + $description.=$one."<br>"; + } + $description.="<br>negatives:<br>"; + foreach ($this->negatives as $one){ + $xml->negatives->addChild('negative',$one); + $description.=$one."<br>"; + } + + //$description=sizeof($this->positives)""; + $xml->addChild('description',$description); + $settings=new Settings(); + if(file_exists(urlencode($settings->savedir.$filename))) + $message.="Warning: file already existed and was overwritten<br>"; + $xml->asXML(urlencode($settings->savedir.$filename)); + + } + + public function restoreSavedSet($filename){ + + $settings=new Settings(); + $uri=($settings->uri)."index.php?plain=plain&id=".$this->id; + $xml=simplexml_load_file(($settings->savedir).$filename); + + $orders=array(); + //$orders[]=$uri."&selectOntology="; + //$orders[]=$uri."&selectOntology=".urlencode($xml->ontologyURI); + + foreach ($xml->positives[0] as $one) + { + $orders[]=$uri."&action=add&where=pos&subject=".urlencode($one); + + } + foreach ($xml->negatives[0] as $one) + { + $orders[]=$uri."&action=add&where=neg&subject=".urlencode($one); + + } + + foreach ($orders as $one) + { + //echo $one."<br>"; + $this->sendandreceive($one)."<br>"; + + + } + $this->message.= + "Refresh needed, hit the button: + <form action=index.php method=get> + <input type='submit' name='refresh' value='refresh'> + </form><br>"; + + + } + + public function getTooltip($tooltip){ + + return " onmouseover=\"Tip('".$tooltip."')\" "; + } + + public function getTooltipForInstance($inst){ + if(!$this->retrievalActive) return $this->getTooltip("deactivated for performance reasons,<br> see Possible Actions"); + $tooltip=$inst."<br>"; + $tooltip.="Instance of:<br>"; + //echo "<xmp>"; + //echo $inst; + + if(sizeof($this->conceptsOfinstances["$inst"])==0) + { $this->conceptsOfinstances["$inst"]=array(); + $tooltip.="<li>Thing</li><br>"; + } + foreach($this->conceptsOfinstances["$inst"] as $concept) + { + $tooltip.="<li>".shorten($concept)."</li>"; + } + $tooltip.="Properties:<br>"; + + if(sizeof($this->rolesOfInstances["$inst"])==0) + { $this->rolesOfInstances["$inst"]=array(); + $tooltip.="<li>None</li><br>"; + } + foreach($this->rolesOfInstances["$inst"] as $role) + { + $tooltip.="<li>".shorten($role)."</li>"; + } + return $this->getTooltip($tooltip); + + } + + public function getTooltipForConcepts($concept){ + if(!$this->retrievalActive) return $this->getTooltip("deactivated for performance reasons,<br> see Possible Actions"); + $tooltip="Class: ".$concept."<br>"; + $tooltip.="Instances:<br>"; + //print_r($this->instancesOfConcepts["$concept"]); + $x=0; + if(sizeof($this->instancesOfConcepts["$concept"] )==0) + { $this->instancesOfConcepts["$concept"] =array(); + $tooltip.="<li>None</li><br>"; + } + foreach($this->instancesOfConcepts["$concept"] as $one) + { $x++; + $tooltip.="".shorten($one)." | ".(($x%6==0)?"<br>":""); + //echo "<li>".shorten($one)."</li>"; + } + + //print_r($this->instancesOfConcepts); + $tooltip.="<br>"; + return $this->getTooltip($tooltip); + + } + + public function listAvailableOntologies($baseuri, $ontodir){ + $ontos=$this->listdir($ontodir); + $ret=array(); + foreach($ontos as $ont) + { + $ret[substr($ont,0,-4)]=$baseuri.$ont; + } + return $ret; + } + + public function listdir($dirname){ + $verz=opendir ($dirname); + $first= readdir ($verz); + $first= readdir ($verz); + $ret=array(); + while ($file = readdir ($verz)) + { + $ret[]=$file; + } + closedir($verz); + return $ret; + } + + public function sendandreceive($uri){ + $req = &new HTTP_Request($uri); + $message=""; + $req->setMethod(HTTP_REQUEST_METHOD_GET); + $req->sendRequest(); + $ret=$req->getResponseBody(); + } +} +?> \ No newline at end of file Added: trunk/src/php-client/Settings.php =================================================================== --- trunk/src/php-client/Settings.php (rev 0) +++ trunk/src/php-client/Settings.php 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,19 @@ +<?php + +class Settings{ + + +public $wsdluri="http://localhost:8181/services?wsdl"; + + +public $uri="http://localhost/dllearner/"; +public $baseuri="http://localhost/dllearner/ontologies/"; +public $ontodir="ontologies/"; + +public $savedir="save/"; + + + + +} +?> \ No newline at end of file Added: trunk/src/php-client/default.css =================================================================== --- trunk/src/php-client/default.css (rev 0) +++ trunk/src/php-client/default.css 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,453 @@ +/** + * default.css + * main Ontowiki style sheet + * @author: Norman Heino + * @version: $Id: default.css 751 2007-02-14 19:20:17Z nheino $ + */ + +/* remove browser specific margins */ +* { + margin: 0; + padding: 0; +} + +html { + font: 80%/1.2 "Lucida Grande", Helvetica, Arial, sans-serif; +} + +p { + margin: 8px 0; +} + +h2 { + margin: 0.5em 0 0.1em 0; +/* background-color: #eee;*/ + font-size: 110%; +} + + +/* + * Main site structure + */ + +#wrapper { + position: relative; + max-width: 100%; + padding: 15px; +/* margin: 15px;*/ +} + +#content { + margin: 0 19em; + overflow: hidden; +/* border-left: 1px solid #bbb; + border-right: 1px solid #bbb; + padding: 0 5px;*/ +} + +/* + * Side bars are positioned absolutely due to several reasons: + * (1)Internet Explorer has problems displaying float elements, + * (2) the content's position in html is irrelevant, + * (3) positioning the content div is more straightforward. + */ +#leftSidebar { + position: absolute; + width: 18em; +} + +#rightSidebar { + position: absolute; + width: 18em; + top: 15px; + right: 15px; +} + +#clear { + clear: both; +} + + +/* + * sidebar content (boxes) + */ + +.box { + color: #666; + margin-bottom: 20px; + border: 1px solid #bbb; + font-size: 85%; +} + +/*.box td { + font-size: 100%; +}*/ + +.box .boxtitle { + color: #666; + background-color: #eee; + padding: 3px 0.4em; + font-weight: bold; + white-space: nowrap; +} + +.box .boxtitle .boxtitle_string { + width: 80%; + overflow: hidden; +/* display: none;*/ +} + +.box .boxcontent { + padding: 0.6em; + border-top: 1px solid #bbb; +} + +/* restrict content of certain boxes */ +.box#predicates .boxcontent, +.box#classes .boxcontent { + overflow: hidden; +} + +.box p { + margin: 0 2px 4px 0; +} + +.box ul, .box ol { + margin: 0px; +/* padding-left: 15px;*/ + list-style-position: inside; +} + +.box ul.no_bullet, .box ul.no_bullet { + list-style-type: none; +} + +.box ul li.horizontal, .box ol li.horizontal, +.box ul.horizontal, .box ol.horizontal { + display: inline; +} + +.box a.title_switch { + position: absolute; + right: 0.5em; + margin: auto 0; + color: #666; + border: 1px solid #bbb; + width: 1em; + height: 1em; + background-color: #fff; + text-align: center; +} + +.box a.title_switch:hover { + color: #02a; + text-decoration: none; + background-color: #eee; +} + +.box hr { + margin: 0.5em 0; + border: none; + border-top: 1px dotted #bbb; + height: 0; +} + +.box#classes .boxcontent a { + display: block; +} + +/*.box select { + width: 250px; /* TODO remove absolute size */ +}*/ + +.box input { + width: auto; +} + +.box td input { + width: 100%; +} + +.box img.rating { + position: relative; + top: 1px; +} + +.hidden { + display: none; +} + + +/* + * Links + */ + +a, a:link, a:visited { + color: #02a; + text-decoration: none; + cursor: pointer; +} + +a:hover { + text-decoration: underline; +} + + +/* + * Tabs + */ + +/* all the tabs */ +.tabs { + float: left; + width: 100%; + background: #fff url("../images/tabs_back.png") repeat-x bottom; +} + +.tabs ul { + list-style: none; +} + +.tabs li { + float: left; + margin-right: 1px; +} + +.tabs a { + display: block; + margin-top: 1px; + padding: 0.35em 1.35em; + background-image: url("../images/tab_back.png"); + background-repeat: repeat-x; + background-color: #cbcbcb; + border: 1px solid #bbb; +} + +.tabs a:hover { + background: #fff; + text-decoration: none; +} + +.tabs a.current { + background: #fff; + border-bottom: 1px solid #fff; +} + +/* horizontal line underneath the tabs */ +#tab-line { + height: 1em; + clear: both; +} + +#instances { + float: right; +} + +.selected { + background-color: #bde; /*#b4d5fe;*/ +} + +.button { + border: solid black 1px; + padding: 0px 1px; + background-color: #eee; +} + +/* + * Tables + */ + +tr.odd { + background-color: #ccc; +} + +tr.even { + background-color: #eee; +} + +table.instanceTable th { + text-align: left; +/* background-color: #eee;*/ +} + +table.instanceTable > tbody > tr > td { + padding-top: 0.5em; +} + +table.instanceTable td.property { + text-align: right; + font-style: italic; + padding-right: 5px; +} + +table.instanceTable ul { + margin: 0px; + padding-left: 20px; +} + +table.instanceTable { + width: 100%; +} + +.searchHighlight { + background-color: orange; +} + +table.tripletable { + width: 100%; + font-size: 90%; +} + +.tripletable td { + padding: 0.4em; +} + +table.blind tr td { + padding-top: 0.4em; +} + +/* + * Instances + */ + +.instance .instance { + margin-left: 13px; + background-color: #ddd; +} +.instance .instance td { + font-size: 90%; +} +.instance .instance .instance { + background-color: #eee; +} + +.instance .instance .instance .instance { + background-color: #fff; +} + +#instanceEdit { + border-spacing: 0px; + width: 100%; +} + +#instanceEdit input, #instanceEdit textarea { +/* width: 250px;*/ + background-color: #fff; + font-size: 95%; + font-family: "Lucida Grande", Helvetica, Arial, sans-serif; + padding: 0.1em 0; +} + +#instanceEdit > tbody > tr > td, #instanceEdit > tr > td { + background-color: #eee; + padding: 5px; + border-bottom: 2px solid #fdfdfd; +} + +/* + * Calendar + */ + +table.calendar { + margin-top: 1em; + width: 100%; + height: 730px; + table-layout: fixed; + font-size: 90%; +} + +.calendar .weekday0 { + background-color: #eee; + padding: 0.4em; +} +.calendar .weekday1 { + background-color: #f5f5f5; + padding: 0.4em; +} +.calendar .weekend0 { + background-color: #ddd; + padding: 0.4em; +} +.calendar .weekend1 { + background-color: #eaeaea; + padding: 0.4em; +} + +#map { + margin-top: 0.5em; + width: 100%; + height: 750px; + font-size: 90%; +} + +#map .instance td { + font-size: 80%; + padding: 0 3px; + border-bottom: 5px solid white; +} + +#superClassPath { + margin-bottom: 0.5em; +} + +img { + border: none; +} + +span.submit { + float: right; + padding-right: 100px; +} + +/* + * Autosuggest box + */ +div.autosuggest { + font-size: 85%; + position: absolute; + background-color: #fff; + border: 1px solid #bbb; +} + +div.autosuggest ul { + list-style-type: none; + list-style-position: inside; + padding-left: 0px; +} + +div.autosuggest ul li.selected { + background-color: #bde; +} + +div.autosuggest ul li { + display: block; + padding: 0.2em; +/* height: 22px;*/ + cursor: pointer; +} + +span.formal { + display: none; +} + +/* + * Layer + */ +#layer { + width: 100%; + height: 100%; + position: absolute; + background-image: url("../images/black_50.png"); + background-repeat: repeat; + z-index: 98; +} + +#layerContent { + margin-top: 100px; + margin: auto; + width: 500px; + height: 300px; + background-color: #ffb; + border: 2px solid #bbb; + z-index: 99; +} Added: trunk/src/php-client/index.php =================================================================== --- trunk/src/php-client/index.php (rev 0) +++ trunk/src/php-client/index.php 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,315 @@ +<?php + +@session_start(); +include_once("Settings.php"); +include_once("LearnerClient.php"); +include_once("Model.php"); + + ini_set("soap.wsdl_cache_enabled","0"); + ini_set('error_reporting',E_ALL); + ini_set('max_execution_time',200); + +$lastAction="View"; +$message=""; +$possibleActions=""; +$instances=" "; +$left=""; +$right=""; +$middle=""; + +$settings=new Settings(); + +echo "<a href='index.php?clearsession=clear'>start from scratch</a>"; +if(isset($_GET['clearsession']))$_SESSION['Learner_ID'] =false; + + + +if( (!isset($_SESSION['Learner_ID'] ) ) || ($_SESSION['Learner_ID']=="")) + { + //get new ID + $lc=new LearnerClient($settings->wsdluri); + $_SESSION['Learner_ID']=$lc->getID(); + //echo "New ID is: ".$_SESSION['Learner_ID']."<br>"; + } + +else{ + //echo "Current ID is: ".$_SESSION['Learner_ID']."<br>"; + $lc=new LearnerClient($settings->wsdluri,$_SESSION['Learner_ID']); + } + + + if(isset($_GET['id']) && $_GET['id']>=0) + { + $lc=new LearnerClient($settings->wsdluri,$_GET['id']); + $id=$_GET['id']; + } + else + { + $id=$_SESSION['Learner_ID']; + } + + +if( (!isset($_SESSION['retrieval'] ) ) || ($_SESSION['retrieval']==""))$_SESSION['retrieval']="inactive"; +if(isset($_GET['retrieval'])){ + $_SESSION['retrieval'] =($_GET['retrieval']=="active")?"active":"inactive"; + + } + + $system="Current id is ".$id; + $model=new Model($id,$lc,$_SESSION['retrieval']); +// Connection to the SOAP SERVER is established + +// for Information about methods +//$lc->getInfo(); + + +// ANALYSE THE GET VARIABLES + + if(isset($_GET['selectOntology'])) + { + if($_GET['selectOntology']=="") + { //remove Ontology + $lc->removeOntology($id); + $lastAction="removed ontology <br>"; + } + else + { //selectOntology + + try{ + $lc->readOntology($id,$_GET['selectOntology']); + $lastAction="read Ontology <br>".$_GET['selectOntology']; + }catch(Exception $e) + {$model->error.="-".$e->getMessage()."<br>"; + + $model->errorOccurred=true;} + } + } + +// ADD REMOVE/CLASS + if(isset($_GET['class'])) + { $class=$_GET['class']; + switch($_GET['action']){ + case "select": + $tmp=$lc->selectAConcept($id,$class,100); + //print_r( $tmp); + $lastAction="selected ".$class; + foreach ($tmp as $one){ + $model->message.="<br>".$one.""; + } + break; + case "ignore": + + $lc->addIgnoredConcept($id,$class); + $lastAction="ignored ".$class; + break; + + case "aknowledge": + $lc->removeIgnoredConcept($id,$class); + $lastAction="aknowledged ".$class; + break; + } + + } + + +// ADD REMOVE/INSTANCE + + if(isset($_GET['action'])) + { + switch ($_GET['action']) + { + + case "add": + + $inst=$_GET['subject']; + + if ($_GET['where']=='pos') + { + //$_SESSION['pos'][]=$inst; + $lc->addPositiveExample($id,$inst); + $lastAction="added: <br>".shorten($inst)." <br>to positive examples<br>"; + } + else if($_GET['where']=="neg") + { + //$_SESSION['neg'][]=$inst; + $lc->addNegativeExample($id,$inst); + $lastAction="added: <br>".shorten($inst)."<br>to negative examples<br>"; + } + + break; + + case "remove": + $inst=$_GET['subject']; + + if($_GET['where']=='examples') + { + if($inst=='all') + {$lc->removeAllExamples($id); + }else if($inst=='neg') + {$lc->removeAllNegativeExamples($id); + }else if($inst=='pos') + {$lc->removeAllPositiveExamples($id); + } + } + else if ($_GET['where']=="pos") + { + + $lc->removePositiveExample($id,$inst); + $lastAction="removed positive example:<br> ".shorten($inst)."<br>"; + + } + else if($_GET['where']=="neg") + { + $lc->removeNegativeExample($id,$inst); + $lastAction="removed negative example:<br> ".shorten($inst)."<br>"; + } + + + break; + + } + + } + + // START LEARNING + + + + + + if(isset($_GET['start']) && $_GET['start']=="start") + { + + $_SESSION['retrieval'] = "inactive"; + $lc->learnMonitored($id); + + $model->message.="<br> - retrieval has been automatically deactivated, switch on manually after learning"; + + } + + if(isset($_GET['stop']) && $_GET['stop']=="stop") + { + echo "stopped <br>"; + echo $lc->stop($id); + + } + + + + if(isset($_GET['plain']) && $_GET['plain']=="plain") + { + die; + + } + + + // only non saveable processes beyond this point + + + //$model=new Model($id,$lc); + $model->make(); + $system.="<br>Algorithm status: ".$model->algorithmStatus; + $system.="<br>Last action:<br>-".$lastAction; + + + if($model->algorithmStatus=="running") + { + $ret= "algorithm is running<br> + Currently best solution is:<br>" + .$lc->getLastResult($id)."<br><br>". + + "hit refresh or stop<br> + <form action=index.php method=get> + <input type='submit' name='refresh' value='refresh'> + <input type='submit' name='stop' value='stop'> + </form>"; + $middle.=makeBox("Result",$ret,false); + } + else if ($model->algorithmStatus=="finished") + { + $ret="Last result:<br>".$lc->getLastResult($id)."<br>"; + $middle.= makeBox("Result",$ret,false); + } + + + $left.=makeBox("Instances",$model->getInstanceView()); + $right.=makeBox("Examples",$model->getExamples()); + + if(($concepts=$model->getConcepts())!="") + { + $left.=makeBox("Classes",$concepts); + } + + + if(($subHier=$model->subsumptionHierarchy)!="") + { + $left.=makeBox("Class Tree","<h3><xmp>".$subHier."</xmp></h3>"); + } + if(($roles=$model->getRoles())!="") + { + $left.=makeBox("Properties",$roles); + } + + $possibleActions=$model->getPossibleActions(); + $ontology=$model->getOntologySelect(); + + ini_set('error_reporting',E_ALL & ~E_NOTICE); + $saved=$model->getSavedSets($_GET['savedset'],$_GET['filename'],$_GET['description']); + ini_set('error_reporting',E_ALL ); + + + //echo $saved; + if ($saved!=""){ + $right.=makebox("Saved Sets",$saved); + } + + if($model->errorOccurred) + { + $message="The following error(s) occured: <br>".$model->getError()."<br>"; + $message.=" + <form action=index.php method=get> + <input type='submit' name='refresh' value='refresh'> + </form>"; + } + + $message.=$model->getMessage(); + if($message=="")$message="None"; + + + + + include("master.php"); + + echo $masterContent; + + + + + + function makeBox($title,$content,$toggleBoxContent=true) + { + if($toggleBoxContent) + { + $click="<a class=\"title_switch\" onclick=\"toggleBoxContent(this);\">\x96</a>"; + } + else{$click="";} + $ret=" + <div class=\"box\" id=\"ontology\"> + <div class=\"boxtitle\">".$title.$click."</div> + <div class=\"boxcontent\"> + ".$content." + </div> <!-- boxcontent --> + </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 Added: trunk/src/php-client/jscript/script.js =================================================================== --- trunk/src/php-client/jscript/script.js (rev 0) +++ trunk/src/php-client/jscript/script.js 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,281 @@ +/* + * The only ow object in use + */ +var ow = {}; + +var ajaxOptions = { + onFailure: function(resp) { + alert('Ajax Error!'); + }, + onException: function(resp, exception) { + alert('Ajax Exception: ' + exception); + } +}; + +ow.openLayer = function(url) { + $('layer').toggle(); + new Ajax.Updater('layerContent', ow.uribase + 'rest/' + url, {asynchronous: false}); + Effect.Appear('layerContent', {duration: 0.3}); +} + +ow.closeLayer = function() { + $('layer').toggle(); +} + +ow.deleteStatement = function(id) { + new Ajax.Request(ow.uribase + 'rest/deleteStatement/?stId=' + id); + // ow.AjaxRequest(false, 'deleteStatement', id); + powl.remove($('stmId' + id).parentNode.parentNode); +} + +ow.tblEdit = function(img, prop, col) { + // imgsrc = img.src; + // img.src = ow.themebase + 'images/Throbber.gif'; + rows = powl.getAncestor(img, 'table').tBodies[0].rows; + for (var i = 1; i < rows.length; ++i) { + new Ajax.Updater(rows[i].cells[col+1], ow.uribase + 'rest/editInstance/' + rows[i].cells[0].getAttribute('name') + '/?property=' + prop); + // ow.AjaxRequest(rows[i].cells[col+1], 'editInstance', rows[i].cells[0].getAttribute('name'), prop); + } + // img.insertAdjacentHTML('afterEnd','<input type="submit" value="save" style="font-size:x-small;" />'); + powl.remove(img); +} + +ow.uriEscape = function(string) { +/* string=string.replace(/Ä/g,'Ae'); + string=string.replace(/Ö/g,'Oe'); + string=string.replace(/Ü/g,'Ue'); + string=string.replace(/ä/g,'ae'); + string=string.replace(/\ö/g,'oe'); + string=string.replace(/ü/g,'ue'); + string=string.replace(/ß/g,'sz');*/ + return string.replace(/[^A-Za-z0-9]/g, ''); +} + +ow.optionalToggle = function(name, nr) { + powl.setState('ow.optionalToggle', name, nr); + e = document.getElementsByName(name); + var a = 0, d = 0; + + for (var i = 0; i < e.length; i++) { + if (e[i].nodeName == 'A') { + e[i].setAttribute('class', a == nr ? 'selected' : ''); + a++; + } else if (e[i].nodeName == 'DIV') { + powl.setVisibility(e[i], d == nr ? '' : 'none'); + d++; + } + } +} + +ow.expand = function(img, instance) { + if (img.src.search(/plus/) != -1) { + if (img.nextSibling.nextSibling.innerHTML != '') { + powl.setVisibility(img.nextSibling.nextSibling, 'block'); + } else { + var uri = ow.uribase + 'rest/getInstance/?r=' + instance + '&allowEdit=false&maxLength=100'; + new Ajax.Updater(img.nextSibling.nextSibling, uri); + // ow.AjaxRequest(img.nextSibling.nextSibling, 'ontowiki::renderInstance', instance, 0, 100); + } + } else { + powl.setVisibility(img.nextSibling.nextSibling, 'none'); + } + powl.togglePlusMinus(img); +} + +ow.updateTable = function(el, id) { + if ($('autosuggest_choices' + id).getStyle('display') != 'block') { + new Ajax.Updater(el.parentNode.parentNode.getElementsByTagName('td')[1], ow.uribase + 'rest/editValues/?property=' + el.value, {evalScripts: true}); + } +} + +/////////////////////////////////////////////////////////////////////////////// + +/* + * Editing and tag visibility + */ +function toggleTagVisibility(name) { + tie = document.getElementById('toggleTagVisibility' + name); + e = document.getElementsByName(name); + + for (var i = 0; i < e.length; i++) { + powl.toggleVisibility(e[i]); + } + + if (tie.getAttribute('class') == 'selected') { + /* powl.setStyleClass(tie, '');*/ + tie.setAttribute('class', ''); + } else { + /* powl.setStyleClass(tie, 'selected');*/ + tie.setAttribute('class', 'selected'); + } + + powl.setCookie('toggleTagVisibility' + name, tie.getAttribute('class')); +} + +/* + * deactivate tag visibility + */ +function deactivateTagVisibility(name) { + tie = document.getElementById('toggleTagVisibility' + name); + e = document.getElementsByName(name); + + if (tie.getAttribute('class') == 'selected') { + for (var i = 0; i < e.length; i++) { + powl.toggleVisibility(e[i]); + } + /* powl.setStyleClass(tie, '');*/ + tie.setAttribute('class', ''); + powl.setCookie('toggleTagVisibility' + name, tie.getAttribute('class')); + } + + +} + + +function toggleTagVisibilityEdit() { + toggleTagVisibility('edit'); +} + +function toggleTagVisibilityComment() { + toggleTagVisibility('comment'); +} + +if (powl.getCookie('toggleTagVisibilityedit') == 'selected') { + powl.SafeAddOnload(toggleTagVisibilityEdit); +} + +if (powl.getCookie('toggleTagVisibilitycomment') == 'selected') { + powl.SafeAddOnload(toggleTagVisibilityComment); +} + +/* + * Image resizing + */ +function resizeContentIMG() { + imgs = document.getElementsByName('contentIMG'); + for (i = 0; i < imgs.length; i++) { + resizeIMG(imgs[i]); + } +} + +function resizeIMG(img) { + maxWidth = 150; + maxHeight = 0; + if (maxWidth && img.width > maxWidth) { + img.height = img.height / (img.width / maxWidth); + img.width = maxWidth; + } + if (maxHeight && img.height > maxHeight) { + img.width = img.width / (img.height / maxHeight); + img.height = maxHeight; + } +} + +powl.SafeAddOnload(resizeContentIMG); + +/* + * Box helpers + */ +function toggleBoxContent(el) { + // get the second div child of the surrounding box + var boxContent = el.parentNode.parentNode.getElementsByTagName('div')[1]; + + if (boxContent.style.display == 'none') { + // open the box + // using scriptaculous + Effect.BlindDown(boxContent, {duration: 0.5}); + // old version + // boxContent.style.display = ''; + el.innerHTML = '–'; + new Ajax.Request(ow.uribase + '/rest/sessionStore?name=' + el.parentNode.parentNode.id + '_box&value=open'); + } + else { + // close the box + // using scriptaculous + Effect.BlindUp(boxContent, {duration: 0.5}); + // old version + // boxContent.style.display = 'none'; + el.innerHTML = ''; + new Ajax.Request(ow.uribase + '/rest/sessionStore?name=' + el.parentNode.parentNode.id + '_box&value=closed'); + } +} + +/* + * Javascript form submit + */ +function subm(form, elem) { + if (!form.combine || !form.combine.checked) { + for (i = 0; i < form.elements.length; ++i) { + if (elem != form.elements[i]) { + if (form.elements[i].type != 'hidden') { + form.elements[i].value = ''; + } /*else { + if (form.elements[i] != 'hidden') + form.elements[i].selectedIndex = 0; + }*/ + } + } + } + form.submit(); +} + +/* + * Rating support functions + */ +function ratingHighlight(img, num) { + // get all images named img.name + imgs = document.getElementsByName(img.name); + // array of ratings + var ratings = new Array('Awful', 'Poor', 'Average', 'Good', 'Excellent'); + // for any rating > 0 we need hover pictures + var name; + if (num == 0) { + name = 'white'; + } else { + name = 'hover'; + } + var name = (num == 0 ? 'white' : 'hover'); + for (var i = 0; i < imgs.length; i++) { + imgs[i].src = ow.themebase + 'images/stars/yri_star_' + name + '.png'; + if (((typeof num) == 'undefined' && img == imgs[i]) || i+1 == num) { + document.getElementById('ratingSpan').innerHTML = ratings[i]; + name = 'white'; + } + } +} + +function ratingReset(img, userRating) { + if (typeof ow.userRating != 'undefined') { + ratingHighlight(img, ow.userRating); + } else { + ratingHighlight(img, userRating); + } + document.getElementById('ratingSpan').innerHTML = ''; +} + +function ratingSet(instance, rating) { + // TODO: merge into one request + new Ajax.Request(ow.uribase + 'rest/setRating/' + instance + '/?rating=' + rating, {asynchronous: false}); + new Ajax.Updater($('ratingContainer'), ow.uribase + 'rest/getRating/' + instance); + ow.userRating = rating; +} + +/* + * Value editing helper + */ +function editValues(element, property, value) { + value = value ? value : ''; + new Ajax.Updater(element, ow.uribase + 'rest/editValues/?property=' + property + '&value=' + value); + // var ret = ow.AjaxRequest(false, 'editValues', cls, property, value); +} + +function addProperty(id, property, value) { + var table = document.getElementById('instanceEdit'); + row = table.insertRow(table.rows.length); + c1 = row.insertCell(0); + c2 = row.insertCell(1); + c1.setAttribute('style', 'vertical-align:top;'); + new Ajax.Updater(c1, ow.uribase + 'rest/getPropertySelector/?property=' + property, {evalScripts: true}); + // c1.insertAdjacentHTML('beforeEnd', getPropertySelector(property)); + // c2.insertAdjacentHTML('beforeEnd', (typeof value == 'string' ? editValues(property, value) : '')); +} Added: trunk/src/php-client/jscript/tip_centerwindow.js =================================================================== --- trunk/src/php-client/jscript/tip_centerwindow.js (rev 0) +++ trunk/src/php-client/jscript/tip_centerwindow.js 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,100 @@ +/* +tip_centerwindow.js v. 1.2 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Initial author: Walter Zorn +Last modified: 23.6.2007 + +Extension for the tooltip library wz_tooltip.js. +Centers a sticky tooltip in the window's visible clientarea, +optionally even if the window is being scrolled or resized. +*/ + +// Here we define new global configuration variable(s) (as members of the +// predefined "config." class). +// From each of these config variables, wz_tooltip.js will automatically derive +// a command which can be passed to Tip() or TagToTip() in order to customize +// tooltips individually. These command names are just the config variable +// name(s) translated to uppercase, +// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be +// created. + +//=================== GLOBAL TOOPTIP CONFIGURATION =========================// +config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour +config. CenterAlways = false // true or false - recenter if window is resized or scrolled +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + +// Create a new tt_Extension object (make sure that the name of that object, +// here ctrwnd, is unique amongst the extensions available for +// wz_tooltips.js): +var ctrwnd = new tt_Extension(); + +// Implement extension eventhandlers on which our extension should react +ctrwnd.OnLoadConfig = function() +{ + if(tt_aV[CENTERWINDOW]) + { + // Permit CENTERWINDOW only if the tooltip is sticky + if(tt_aV[STICKY]) + { + if(tt_aV[CENTERALWAYS]) + { + // IE doesn't support style.position "fixed" + if(tt_ie) + tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter); + else + tt_aElt[0].style.position = "fixed"; + tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter); + } + return true; + } + tt_aV[CENTERWINDOW] = false; + } + return false; +}; +// We react on the first OnMouseMove event to center the tip on that occasion +ctrwnd.OnMoveBefore = Ctrwnd_DoCenter; +ctrwnd.OnKill = function() +{ + if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS]) + { + tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter); + if(tt_ie) + tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter); + else + tt_aElt[0].style.position = "absolute"; + } + return false; +}; +// Helper function +function Ctrwnd_DoCenter() +{ + if(tt_aV[CENTERWINDOW]) + { + var x, y, dx, dy; + + // Here we use some functions and variables (tt_w, tt_h) which the + // extension API of wz_tooltip.js provides for us + if(tt_ie || !tt_aV[CENTERALWAYS]) + { + dx = tt_GetScrollX(); + dy = tt_GetScrollY(); + } + else + { + dx = 0; + dy = 0; + } + // Position the tip, offset from the center by OFFSETX and OFFSETY + x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX]; + y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY]; + tt_SetTipPos(x, y); + return true; + } + return false; +} Added: trunk/src/php-client/jscript/tip_followscroll.js =================================================================== --- trunk/src/php-client/jscript/tip_followscroll.js (rev 0) +++ trunk/src/php-client/jscript/tip_followscroll.js 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,84 @@ +/* +tip_followscroll.js v. 1.1 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Initial author: Walter Zorn +Last modified: 21.6.2007 + +Extension for the tooltip library wz_tooltip.js. +Lets a "sticky" tooltip keep its position inside the clientarea if the window +is scrolled. +*/ + +// Here we define new global configuration variable(s) (as members of the +// predefined "config." class). +// From each of these config variables, wz_tooltip.js will automatically derive +// a command which can be passed to Tip() or TagToTip() in order to customize +// tooltips individually. These command names are just the config variable +// name(s) translated to uppercase, +// e.g. from config. FollowScroll a command FOLLOWSCROLL will automatically be +// created. + +//=================== GLOBAL TOOPTIP CONFIGURATION ======================// +config. FollowScroll = false // true or false - set to true if you want this to be the default behaviour +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + +// Create a new tt_Extension object (make sure that the name of that object, +// here fscrl, is unique amongst the extensions available for +// wz_tooltips.js): +var fscrl = new tt_Extension(); + +// Implement extension eventhandlers on which our extension should react +fscrl.OnShow = function() +{ + if(tt_aV[FOLLOWSCROLL]) + { + // Permit FOLLOWSCROLL only if the tooltip is sticky + if(tt_aV[STICKY]) + { + var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY(); + + if(tt_ie) + { + fscrl.MoveOnScrl.offX = x; + fscrl.MoveOnScrl.offY = y; + fscrl.AddRemEvtFncs(tt_AddEvtFnc); + } + else + { + tt_SetTipPos(x, y); + tt_aElt[0].style.position = "fixed"; + } + return true; + } + tt_aV[FOLLOWSCROLL] = false; + } + return false; +}; +fscrl.OnHide = function() +{ + if(tt_aV[FOLLOWSCROLL]) + { + if(tt_ie) + fscrl.AddRemEvtFncs(tt_RemEvtFnc); + else + tt_aElt[0].style.position = "absolute"; + } +}; +// Helper functions (encapsulate in the class to avoid conflicts with other +// extensions) +fscrl.MoveOnScrl = function() +{ + tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY()); +}; +fscrl.AddRemEvtFncs = function(PAddRem) +{ + PAddRem(window, "resize", fscrl.MoveOnScrl); + PAddRem(window, "scroll", fscrl.MoveOnScrl); +}; + Added: trunk/src/php-client/jscript/wz_tooltip.js =================================================================== --- trunk/src/php-client/jscript/wz_tooltip.js (rev 0) +++ trunk/src/php-client/jscript/wz_tooltip.js 2007-08-22 10:18:08 UTC (rev 17) @@ -0,0 +1,1149 @@ +/* This notice must be untouched at all times. + +wz_tooltip.js v. 4.12 + +The latest version is available at +http://www.walterzorn.com +or http://www.devira.com +or http://www.walterzorn.de + +Copyright (c) 2002-2007 Walter Zorn. All rights reserved. +Created 1.12.2002 by Walter Zorn (Web: http://www.walterzorn.com ) +Last modified: 13.7.2007 + +Easy-to-use cross-browser tooltips. +Just include the script at the beginning of the <body> section, and invoke +Tip('Tooltip text') from within the desired HTML onmouseover eventhandlers. +No container DIV, no onmouseouts required. +By default, width of tooltips is automatically adapted to content. +Is even capable of dynamically converting arbitrary HTML elements to tooltips +by calling TagToTip('ID_of_HTML_element_to_be_converted') instead of Tip(), +which means you can put important, search-engine-relevant stuff into tooltips. +Appearance of tooltips can be individually configured +via commands passed to Tip() or TagToTip(). + +Tab Width: 4 +LICENSE: LGPL + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License (LGPL) as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +For more details on the GNU Lesser General Public License, +see http://www.gnu.org/copyleft/lesser.html +*/ + +var config = new Object(); + + +//=================== GLOBAL TOOPTIP CONFIGURATION =========================// +var tt_Debug = true // false or true - recommended: false once you release your page to the public +var tt_Enabled = true // Allows to (temporarily) suppress tooltips, e.g. by providing the user with a button that sets this global variable to false +var TagsToTip = true // false or true - if true, the script is capable of converting HTML elements to tooltips + +// For each of the following config variables there exists a command, which is +// just the variablename in uppercase, to be passed to Tip() or TagToTip() to +// configure tooltips individually. Individual commands override global +// configuration. Order of commands is arbitrary. +// Example: onmouseover="Tip('Tooltip text', LEFT, true, BGCOLOR, '#FF9900', FADEIN, 400)" + +config. Above = false // false or true - tooltip above mousepointer? +config. BgColor = '#E4E7FF' // Background color +config. BgImg = '' // Path to background image, none if empty string '' +config. BorderColor = '#002299' +config. BorderStyle = 'solid' // Any permitted CSS value, but I recommend 'solid', 'dotted' or 'dashed' +config. BorderWidth = 1 +config. CenterMouse = false // false or true - center the tip horizontally below (or above) the mousepointer +config. ClickClose = false // false or true - close tooltip if the user clicks somewhere +config. CloseBtn = false // false or true - closebutton in titlebar +config. CloseBtnColors = ['#990000', '#FFFFFF', '#DD3333', '#FFFFFF'] // [Background, text, hovered background, hovered text] - use empty strings '' to inherit title colors +config. CloseBtnText = ' X ' // Close button text (may also be an image tag) +config. CopyContent = true // When converting a HTML element to a tooltip, copy only the element's content, rather than converting the element by its own +config. Delay = 400 // Time span in ms until tooltip shows up +config. Duration = 0 // Time span in ms after which the tooltip disappears; 0 for infinite duration +config. FadeIn = 0 // Fade-in duration in ms, e.g. 400; 0 for no animation +config. FadeOut = 0 +config. FadeInterval = 30 // Duration of each fade step in ms (recommended: 30) - shorter is smoother but causes more CPU-load +config. Fix = null // Fixated position - x- an y-oordinates in brackets, e.g. [210, 480], or null for no fixation +config. FollowMouse = true // false or true - tooltip follows the mouse +config. FontColor = '#000044' +config. FontFace = 'Verdana,Geneva,sans-serif' +config. FontSize = '8pt' // E.g. '9pt' or '12px' - unit is mandatory +config. FontWeight = 'normal' // 'normal' or 'bold'; +config. Left = false // false or true - tooltip on the left of the mouse +config. OffsetX = 14 // Horizontal offset of left-top corner from mousepointer +config. OffsetY = 8 // Vertical offset +config. Opacity = 100 // Integer between 0 and 100 - opacity of tooltip in percent +config. Padding = 3 // Spacing between border and content +config. Shadow = false // false or true +config. ShadowColor = '#C0C0C0' +config. ShadowWidth = 5 +config. Sticky = false // Do NOT hide tooltip on mouseout? false or true +config. TextAlign = 'left' // 'left', 'right' or 'justify' +config. Title = '' // Default title text applied to all tips (no default title: empty string '') +config. TitleAlign = 'left' // 'left' or 'right' - text alignment inside the title bar +config. TitleBgColor = '' // If empty string '', BorderColor will be used +config. TitleFontColor = '#ffffff' // Color of title text - if '', BgColor (of tooltip body) will be used +config. TitleFontFace = '' // If '' use FontFace (boldified) +config. TitleFontSize = '' // If '' use FontSize +config. Width = 0 // Tooltip width; 0 for automatic adaption to tooltip content +//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============// + + + + +//====================== PUBLIC ============================================// +function Tip() +{ + tt_Tip(arguments, null); +} +function TagToTip() +{ + if(TagsToTip) + { + var t2t = tt_GetElt(arguments[0]); + if(t2t) + tt_Tip(arguments, t2t); + } +} + +//================== PUBLIC EXTENSION API ==================================// +// Extension eventhandlers currently supported: +// OnLoadConfig, OnCreateContentString, OnSubDivsCreated, OnShow, OnMoveBefore, +// OnMoveA... [truncated message content] |
From: <ku...@us...> - 2007-08-22 10:08:17
|
Revision: 16 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=16&view=rev Author: kurzum Date: 2007-08-22 03:08:15 -0700 (Wed, 22 Aug 2007) Log Message: ----------- changed folder name Added Paths: ----------- trunk/src/php-client/ Removed Paths: ------------- trunk/src/php-client-library/ Copied: trunk/src/php-client (from rev 14, trunk/src/php-client-library) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-22 10:03:47
|
Revision: 15 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=15&view=rev Author: jenslehmann Date: 2007-08-22 03:03:45 -0700 (Wed, 22 Aug 2007) Log Message: ----------- added Eclipse generated Ant script for creating DL-Learner Javadoc Added Paths: ----------- trunk/javadoc.xml Added: trunk/javadoc.xml =================================================================== --- trunk/javadoc.xml (rev 0) +++ trunk/javadoc.xml 2007-08-22 10:03:45 UTC (rev 15) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<project default="javadoc"> + <target name="javadoc"> + <javadoc access="public" author="true" classpath="library/owlapi/antlr-runtime-3.0.jar:library/owlapi/owlapi-rdfxmlparser.jar:library/owlapi/owlapi-owlxmlrenderer.jar:library/owlapi/owlapi-mansyntaxrenderer.jar:library/owlapi/owlapi-metrics.jar:library/owlapi/owlapi-owlxmlparser.jar:library/owlapi/owlapi-change.jar:library/owlapi/owlapi-rdfxmlrenderer.jar:library/owlapi/owlapi-apibinding.jar:library/xbean.jar:library/owlapi/owlapi-oboparser.jar:library/jena/jena.jar:library/owlapi/commons-lang-2.2.jar:library/jena/commons-logging.jar:library/owlapi/owlapi-dig1_1.jar:library/owlapi/owlapi-api.jar:library/owlapi/owlapi-debugging.jar:library/jena/iri.jar:library/kaon2.jar:library/jena/xercesImpl.jar:library/owlapi/owlapi-krssparser.jar:library/jena/antlr-2.7.5.jar:library/owlapi/owlapi-functionalrenderer.jar:library/modules/sparqlModule.jar:library/owlapi/owlapi-mansyntaxparser.jar:library/jena/icu4j_3_4.jar:library/owlapi/owlapi-util.jar:library/dig1.1-xmlbeans.jar:library/jena/concurrent.jar:library/owlapi/owlapi-functionalparser.jar:library/owlapi/owlapi-impl.jar:library/owlapi/owlapi-rdfapi.jar" destdir="doc/javadoc" doctitle="DL-Learner Javadoc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" packagenames="org.dllearner.reasoning,org.dllearner.dl,org.dllearner.server,org.dllearner,org.dllearner.server.exceptions,org.dllearner.server.jaxws,org.dllearner.algorithms.gp,org.dllearner.parser,org.dllearner.modules,org.dllearner.algorithms,org.dllearner.examples,org.dllearner.utilities,org.dllearner.algorithms.hybridgp,org.dllearner.algorithms.refinement" source="1.5" sourcepath="src/dl-learner" splitindex="true" use="true" version="true"/> + </target> +</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-21 15:16:27
|
Revision: 14 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=14&view=rev Author: jenslehmann Date: 2007-08-21 08:16:04 -0700 (Tue, 21 Aug 2007) Log Message: ----------- enable faster stopping of refinement operator based algorithm Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java Modified: trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java =================================================================== --- trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2007-08-21 13:41:49 UTC (rev 13) +++ trunk/src/dl-learner/org/dllearner/algorithms/refinement/ROLearner.java 2007-08-21 15:16:04 UTC (rev 14) @@ -433,6 +433,11 @@ // recDepth dient nur zur Protokollierung private void extendNodeProper(Node node, Concept concept, int maxLength, int recDepth) { + // führe Methode nicht aus, wenn Algorithmus gestoppt wurde (alle rekursiven Funktionsaufrufe + // werden nacheinander abgebrochen, so dass ohne weitere Reasoninganfragen relativ schnell beendet wird) + if(stop) + return; + if(recDepth > maxRecDepth) maxRecDepth = recDepth; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-21 13:42:04
|
Revision: 13 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=13&view=rev Author: jenslehmann Date: 2007-08-21 06:41:49 -0700 (Tue, 21 Aug 2007) Log Message: ----------- updated classpath entries Modified Paths: -------------- trunk/.classpath Modified: trunk/.classpath =================================================================== --- trunk/.classpath 2007-08-20 16:20:51 UTC (rev 12) +++ trunk/.classpath 2007-08-21 13:41:49 UTC (rev 13) @@ -2,36 +2,37 @@ <classpath> <classpathentry kind="src" path="src/dl-learner"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="lib" path="/dl_learner/lib/dig1.1-xmlbeans.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/kaon2.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/xbean.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/antlr-2.7.5.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/commons-logging.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/concurrent.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/icu4j_3_4.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/iri.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/jena.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/jena/xercesImpl.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/antlr-runtime-3.0.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/commons-lang-2.2.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-api.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-apibinding.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-change.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-debugging.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-dig1_1.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-functionalparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-functionalrenderer.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-impl.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-krssparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-mansyntaxparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-mansyntaxrenderer.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-metrics.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-oboparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-owlxmlparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-owlxmlrenderer.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfapi.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfxmlparser.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfxmlrenderer.jar"/> - <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-util.jar"/> + <classpathentry kind="lib" path="library/dig1.1-xmlbeans.jar"/> + <classpathentry kind="lib" path="library/kaon2.jar"/> + <classpathentry kind="lib" path="library/xbean.jar"/> + <classpathentry kind="lib" path="library/jena/antlr-2.7.5.jar"/> + <classpathentry kind="lib" path="library/jena/commons-logging.jar"/> + <classpathentry kind="lib" path="library/jena/concurrent.jar"/> + <classpathentry kind="lib" path="library/jena/icu4j_3_4.jar"/> + <classpathentry kind="lib" path="library/jena/iri.jar"/> + <classpathentry kind="lib" path="library/jena/jena.jar"/> + <classpathentry kind="lib" path="library/jena/xercesImpl.jar"/> + <classpathentry kind="lib" path="library/modules/sparqlModule.jar"/> + <classpathentry kind="lib" path="library/owlapi/antlr-runtime-3.0.jar"/> + <classpathentry kind="lib" path="library/owlapi/commons-lang-2.2.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-api.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-apibinding.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-change.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-debugging.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-dig1_1.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-functionalparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-functionalrenderer.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-impl.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-krssparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-mansyntaxparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-mansyntaxrenderer.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-metrics.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-oboparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-owlxmlparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-owlxmlrenderer.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-rdfapi.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-rdfxmlparser.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-rdfxmlrenderer.jar"/> + <classpathentry kind="lib" path="library/owlapi/owlapi-util.jar"/> <classpathentry kind="output" path="classes"/> </classpath> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 16:20:54
|
Revision: 12 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=12&view=rev Author: jenslehmann Date: 2007-08-20 09:20:51 -0700 (Mon, 20 Aug 2007) Log Message: ----------- added Eclipse classpath and project files Added Paths: ----------- trunk/.classpath trunk/.project Added: trunk/.classpath =================================================================== --- trunk/.classpath (rev 0) +++ trunk/.classpath 2007-08-20 16:20:51 UTC (rev 12) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/dl-learner"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="lib" path="/dl_learner/lib/dig1.1-xmlbeans.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/kaon2.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/xbean.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/antlr-2.7.5.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/commons-logging.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/concurrent.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/icu4j_3_4.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/iri.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/jena.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/jena/xercesImpl.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/antlr-runtime-3.0.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/commons-lang-2.2.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-api.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-apibinding.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-change.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-debugging.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-dig1_1.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-functionalparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-functionalrenderer.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-impl.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-krssparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-mansyntaxparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-mansyntaxrenderer.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-metrics.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-oboparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-owlxmlparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-owlxmlrenderer.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfapi.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfxmlparser.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-rdfxmlrenderer.jar"/> + <classpathentry kind="lib" path="/dl_learner/lib/owlapi/owlapi-util.jar"/> + <classpathentry kind="output" path="classes"/> +</classpath> Added: trunk/.project =================================================================== --- trunk/.project (rev 0) +++ trunk/.project 2007-08-20 16:20:51 UTC (rev 12) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>DL-Learner-SVN</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 16:14:04
|
Revision: 11 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=11&view=rev Author: jenslehmann Date: 2007-08-20 09:13:59 -0700 (Mon, 20 Aug 2007) Log Message: ----------- updated Ant build script to fit new directory layout Modified Paths: -------------- trunk/build.xml Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2007-08-20 15:40:07 UTC (rev 10) +++ trunk/build.xml 2007-08-20 16:13:59 UTC (rev 11) @@ -1,82 +1,78 @@ <?xml version="1.0" encoding="UTF-8"?> <project basedir="." default="build" name="dl_learner"> - <property name="kaon2" value="lib/kaon2.jar"/> - <property name="xbean" value="lib/xbean.jar"/> - <property name="dig1.1_xmlbeans" value="lib/dig1.1-xmlbeans.jar"/> + <!-- directory settings --> + <property name="lib_dir" value="library" /> + <property name="source_dir" value="src/dl-learner" /> + <tstamp> + <format property="today" pattern="yyyy-MM-dd" locale="en" /> + </tstamp> + <property name="version_dir" value="dllearner-${today}" /> + <property name="release_tmp_dir" value="release/${version_dir}" /> - <!-- Jena --> - <property name="jena" value="lib/jena/jena.jar"/> + <property name="kaon2" value="${lib_dir}/kaon2.jar"/> + <property name="xbean" value="${lib_dir}/xbean.jar"/> + <property name="dig1.1_xmlbeans" value="${lib_dir}/dig1.1-xmlbeans.jar"/> + <property name="jena" value="${lib_dir}/jena/jena.jar"/> + <!-- setup classpath --> <path id="classpath"> <pathelement location="."/> <pathelement location="${kaon2}"/> <pathelement location="${xbean}"/> <pathelement location="${dig1.1_xmlbeans}"/> <pathelement location="${jena}"/> - <pathelement location="lib/owlapi/owlapi-api.jar"/> - <pathelement location="lib/owlapi/owlapi-apibinding.jar"/> - <pathelement location="lib/owlapi/owlapi-dig1_1.jar"/> + <pathelement location="${lib_dir}/owlapi/owlapi-api.jar"/> + <pathelement location="${lib_dir}/owlapi/owlapi-apibinding.jar"/> + <pathelement location="${lib_dir}/owlapi/owlapi-dig1_1.jar"/> </path> + <!-- build target --> <target name="build"> - <tstamp> - <format property="today" pattern="yyyy-MM-dd" locale="en" /> - </tstamp> - <property name="version_dir" value="dllearner-${today}" /> - <property name="release_tmp_dir" value="release/${version_dir}" /> - <!-- Java-Datei mit Build schreiben --> - <echo file="org/dllearner/Info.java" append="false"> + + <!-- write current build date into Info.java --> + <echo file="${source_dir}/org/dllearner/Info.java" append="false"> // File is updated automatically when a new version is created package org.dllearner; public class Info { public static final String build = "${today}"; } - </echo> - <!-- Projekt in temporäres Verzeichnis compilieren --> - <mkdir dir="classes"/> - <javac destdir="classes"> - <src path="."/> + </echo> + + <!-- compile project into temporary directory --> + <mkdir dir="classes_tmp"/> + <javac destdir="classes_tmp"> + <src path="${source_dir}"/> <classpath refid="classpath"/> - </javac> - <!-- altes Release löschen und neues erstellen --> + </javac> <mkdir dir="${release_tmp_dir}"/> <mkdir dir="${release_tmp_dir}/lib/"/> <jar jarfile="${release_tmp_dir}/lib/dllearner.jar"> - <fileset dir="classes"/> - </jar> - <delete dir="classes"/> - <copy file="${kaon2}" todir="${release_tmp_dir}/lib/" /> - <copy file="${xbean}" todir="${release_tmp_dir}/lib/" /> - <copy file="${dig1.1_xmlbeans}" todir="${release_tmp_dir}/lib/" /> - <copy toDir="${release_tmp_dir}/lib/jena/"> - <fileset dir="lib/jena/"/> + <fileset dir="classes_tmp"/> + </jar> + <delete dir="classes_tmp"/> + + <!-- copy all other libraries --> + <copy toDir="${release_tmp_dir}/lib"> + <!-- KAON2 has to be excluded, because it cannot be freely distributed --> + <fileset dir="${lib_dir}" excludes="${kaon2}" /> + </copy> + + <!-- copy binary files and examples --> + <copy toDir="${release_tmp_dir}/examples"> + <fileset dir="examples"/> </copy> - <copy toDir="${release_tmp_dir}/lib/owlapi/"> - <fileset dir="lib/owlapi/"/> - </copy> - <copy toDir="${release_tmp_dir}/lib/modules/"> - <fileset dir="lib/modules/"/> - </copy> <copy toDir="${release_tmp_dir}"> - <fileset dir="files"/> + <fileset dir="bin"/> </copy> - <!-- nicht notwendig - <chmod file="${release_tmp_dir}/dllearner" perm="755"/> - <chmod file="${release_tmp_dir}/quickstart" perm="755"/> - --> - <!-- Datei mit Datum des Builds schreiben --> - <!-- (today wird schon weiter oben definiert) - <tstamp> - <format property="today" pattern="yyyy-MM-dd" locale="en" /> - </tstamp> - --> + + <!-- create file containing the build info --> <echo file="${release_tmp_dir}/build.txt" append="false">DL-Leaner Build ${today}</echo> - <!-- tar.bz2 erzeugen (zip würde auch gehen, aber kann keine Dateien mit - execute-Erlaubnis speichern, bz2 ist hier nur unswesentlich besser, aber langsamer) --> - <tar destfile="dllearner_${today}.tar.gz" compression="gzip"> - <!-- Extraset für ausführbare Dateien --> + + <!-- create tar.gz files (allows storing whether a file is executable) --> + <tar longfile="gnu" destfile="dllearner_${today}.tar.gz" compression="gzip"> + <!-- extra set for executable files --> <tarfileset dir="release/" mode="755"> <include name="${version_dir}/dllearner" /> <include name="${version_dir}/quickstart" /> @@ -85,26 +81,30 @@ <tarfileset dir="release/"> <exclude name="${version_dir}/dllearner"/> <exclude name="${version_dir}/quickstart" /> - <exclude name="${version_dir}/quickstart" /> + <exclude name="${version_dir}/ws" /> </tarfileset> </tar> - <!-- kopieren des Quellcodes --> + + <!-- copy source code --> <mkdir dir="${release_tmp_dir}/src/"/> <copy toDir="${release_tmp_dir}/src/"> - <fileset dir="." includes="**/*.java,**/*.jjt,build.xml"/> + <fileset dir="${source_dir}" includes="**/*.java,**/*.jjt,build.xml"/> </copy> - <!-- Backup erstellen (enthält zusätzlich Quellcode) --> - <tar destfile="backup_dllearner_${today}.tar.gz" compression="gzip"> + + <!-- create backup (= standard build + source code) --> + <tar longfile="gnu" destfile="backup_dllearner_${today}.tar.gz" compression="gzip"> <tarfileset dir="release/" mode="755"> <include name="${version_dir}/dllearner" /> <include name="${version_dir}/quickstart" /> + <include name="${version_dir}/ws" /> </tarfileset> <tarfileset dir="release/"> <exclude name="${version_dir}/dllearner"/> <exclude name="${version_dir}/quickstart" /> + <exclude name="${version_dir}/ws" /> </tarfileset> - </tar> - <delete dir="release"/> + </tar> + <delete dir="release"/> </target> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 15:40:15
|
Revision: 10 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=10&view=rev Author: jenslehmann Date: 2007-08-20 08:40:07 -0700 (Mon, 20 Aug 2007) Log Message: ----------- removed dig protocol from father example Modified Paths: -------------- trunk/examples/father.conf Modified: trunk/examples/father.conf =================================================================== --- trunk/examples/father.conf 2007-08-20 15:23:17 UTC (rev 9) +++ trunk/examples/father.conf 2007-08-20 15:40:07 UTC (rev 10) @@ -34,9 +34,6 @@ father = (male AND EXISTS hasChild.TOP). -writeDIGProtocol = true; -digProtocolFile = "types_test.txt"; - // persons male(markus). male(stefan). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 15:23:29
|
Revision: 9 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=9&view=rev Author: jenslehmann Date: 2007-08-20 08:23:17 -0700 (Mon, 20 Aug 2007) Log Message: ----------- web service implementation added Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java Added Paths: ----------- trunk/src/dl-learner/org/dllearner/server/ClientState.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java trunk/src/dl-learner/org/dllearner/server/exceptions/ trunk/src/dl-learner/org/dllearner/server/exceptions/ClientNotKnownException.java trunk/src/dl-learner/org/dllearner/server/exceptions/NoOntologySelectedException.java trunk/src/dl-learner/org/dllearner/server/exceptions/OntologyURLNotValid.java trunk/src/dl-learner/org/dllearner/server/jaxws/ trunk/src/dl-learner/org/dllearner/server/jaxws/ClientNotKnownExceptionBean.java trunk/src/dl-learner/org/dllearner/server/jaxws/NoOntologySelectedExceptionBean.java trunk/src/dl-learner/org/dllearner/server/jaxws/OntologyURLNotValidBean.java Added: trunk/src/dl-learner/org/dllearner/server/ClientState.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/ClientState.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/ClientState.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,532 @@ +package org.dllearner.server; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.SortedSet; +import java.util.TreeSet; + +import org.dllearner.Config; +import org.dllearner.ConfigurationManager; +import org.dllearner.ConfigurationOption; +import org.dllearner.Main; +import org.dllearner.OntologyFileFormat; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.dl.AtomicConcept; +import org.dllearner.dl.AtomicRole; +import org.dllearner.dl.Concept; +import org.dllearner.dl.Individual; +import org.dllearner.dl.KB; +import org.dllearner.reasoning.Reasoner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; +import org.dllearner.reasoning.ReasoningService; + +import org.dllearner.server.exceptions.NoOntologySelectedException; +import org.dllearner.server.exceptions.OntologyURLNotValid; + +import com.hp.hpl.jena.shared.DoesNotExistException; +import com.hp.hpl.jena.shared.JenaException; + +public class ClientState { + + private String reasonerURL="http://localhost:8081"; + //private String reasonerURL="http://localhost:3490"; + + private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); + public SortedSet<Individual> getPosExamples() { return this.positiveExamples;} + + private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); + public SortedSet<Individual> getNegExamples() { return this.negativeExamples;} + + private SortedSet<String> ignoredConcept = new TreeSet<String>(); + + + private Reasoner reasoner; + public Reasoner getReasoner() { return reasoner;} + + private ReasoningService rs; + public ReasoningService getRs() { return rs; } + + private String currentOntologyURL=null; + private boolean debug_flag=true; + private LearnMonitor lm=null; + + private String lastResult=""; + public String getLastResult(){ + try{ + return ROL.getBestSolution().toString(); + }catch (Exception e) {} + return this.lastResult; } + public void setLastResult(String lastResult) {this.lastResult = lastResult;} + + private String status="maiden-like"; + public void setStatus(String status) {this.status = status;} + + ConfigurationManager confMgr; + public void addOption(ConfigurationOption c){confMgr.applyConfigurationOption(c);} + ROLearner ROL; + + public ClientState() { + + + TreeSet<ConfigurationOption> s=new TreeSet<ConfigurationOption>(); + //s.add(new ConfigurationOption("refinement","quiet","true")); + /*s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption()); + s.add(new ConfigurationOption());*/ + + confMgr = new ConfigurationManager(s); + addOption(new ConfigurationOption("refinement","quiet","true")); + //confMgr.applyOptions(); + + } + + + + + public void addPositiveExample(String posExample) { + positiveExamples.add(new Individual(posExample)); + p("added pos: "+posExample); + } + + + public void addNegativeExample(String negExample) { + negativeExamples.add(new Individual(negExample)); + p("added neg: "+negExample); + } + + public void addIgnoredConcept(String concept) { + ignoredConcept.add(concept); + p("added ignoredConcepts: "+concept); + } + + public String[] selectInstancesForAConcept(String Concept)throws NoOntologySelectedException{ + if(Concept.endsWith("#Thing"))return new String[]{}; + AtomicConcept SelectedConcept=new AtomicConcept(Concept); + ArrayList<String> al=new ArrayList<String>(); + Individual indtmp=null; + Set ConceptSet=null; + AtomicConcept ac=null; + + + System.out.println("selectInstancesForAConcept: "+Concept); + // add all positives + Set positives=rs.retrieval(SelectedConcept); + Iterator i = positives.iterator(); + while(i.hasNext()){ + indtmp=(Individual)i.next(); + p("added "+indtmp.getName()+" to positives"); + al.add("added "+indtmp.getName()+" to positives"); + positiveExamples.add(indtmp); + } + + //find more general concepts + ArrayList<AtomicConcept> superConcepts=new ArrayList<AtomicConcept>(); + try{ + //ConceptSet = rs.getSubsumptionHierarchy().getMoreGeneralConcepts(new AtomicConcept(Concept)); + //System.out.println(ConceptSet); + //Concept c=new AtomicConcept(Concept); + /*Set<AtomicConcept> s=rs.getAtomicConcepts(); + Set<Concept> sc=new TreeSet<Concept>(); + Iterator a=s.iterator(); + while (a.hasNext()) { + sc.add((Concept) a.next()); + } + sc=rs.subsumes(sc,new AtomicConcept(Concept));*/ + superConcepts=subsumesAll(SelectedConcept); + + //System.out.println("sizebefore: "+"size after:"+sc); + }catch (Exception e) {e.printStackTrace();} + + +// remove top + for (int j = 0; j < superConcepts.size(); ) { + //TODO no unique name assumption? + if(superConcepts.get(j).getName().equals(SelectedConcept.getName())){ + superConcepts.remove(j); + j=0; + continue; + } + if(superConcepts.get(j).getName().equals("TOP")){ + superConcepts.remove(j); + j=0; + continue; + } + j++; + } + + System.out.println("Found all those:"+ superConcepts); + + ac=null; + + if(superConcepts.size()==0){return al2s(al); }//TODO + else + { // add all negatives of all superclasses; + + //Iterator it=ConceptSet.iterator(); + for (int jj = 0; jj < superConcepts.size(); jj++) + { + ac=superConcepts.get(jj); + p("next this: "+ac.getName()); + Set negatives=rs.retrieval(ac); + Iterator i2 = negatives.iterator(); + indtmp=null; + while(i2.hasNext()){ + + indtmp=(Individual)i2.next(); + + if(!positives.contains(indtmp)){ + + p("added "+indtmp.getName()+" to NEGATIVES"); + al.add("added "+indtmp.getName()+" to NEGATIVES"); + negativeExamples.add(indtmp); + } + else{ + p("skipped "+indtmp.getName()); + al.add("skipped "+indtmp.getName()); + } + + } + }//endfor + return al2s(al); + } + + + } + + public ArrayList<AtomicConcept> subsumesAll(AtomicConcept c){ + Set s=rs.getAtomicConcepts(); + ArrayList<AtomicConcept> ret=new ArrayList<AtomicConcept>(); + Iterator i=s.iterator(); + while (i.hasNext()) { + AtomicConcept element = (AtomicConcept) i.next(); + if(rs.subsumes(element, c)) + { + ret.add(element); + } + + } + return ret; + } + public String[] getPositiveExamples(){ + String[] ret=new String[positiveExamples.size()]; + Iterator i=positiveExamples.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + //p("getPositiveEx"); + return ret; + } + public String[] getNegativeExamples(){ + String[] ret=new String[negativeExamples.size()]; + Iterator i=negativeExamples.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + //p("getNegativeEx"); + return ret; + } + + public String[] getIgnoredConcepts() { + String[] ret=new String[ignoredConcept.size()]; + Iterator i=ignoredConcept.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((String)i.next()); + } + //p("getNegativeEx"); + return ret; + } + + public String getSubsumptionHierarchy() throws NoOntologySelectedException { + try{ + return this.rs.getSubsumptionHierarchy().toString(); + }catch (Exception e) {throw new NoOntologySelectedException("Subsumptionhierarchy",e.getMessage());} + + } + + + + public boolean removeNegativeExample(String NegExample){ + p("removed from neg: "+NegExample); + return negativeExamples.remove(new Individual(NegExample)); + } + public boolean removePositiveExample(String PosExample){ + p("removed from pos: "+PosExample); + return positiveExamples.remove(new Individual(PosExample)); + } + + public boolean removeAllPositiveExamples(){ + positiveExamples = new TreeSet<Individual>(); + p("removing all positive examples"); + return true; + } + public boolean removeAllNegativeExamples(){ + negativeExamples = new TreeSet<Individual>(); + p("removing all negative examples"); + return true; + } + + public boolean removeAllExamples(){ + positiveExamples = new TreeSet<Individual>(); + negativeExamples = new TreeSet<Individual>(); + p("removing all examples"); + return true; + } + + public void removeIgnoredConcept(String concept) { + //ignoredConcept.add(concept); + this.ignoredConcept.remove(concept); + p("removed ignoredConcepts: "+concept); + } + + public String[] getInstances()throws NoOntologySelectedException{ + try{ + SortedSet<Individual> s=rs.getIndividuals(); + //System.out.println(s); + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + Arrays.sort(ret); + //p("getInstances"); + return ret; + }catch (Exception e) {throw new NoOntologySelectedException("Failed to get instances, no ontology selected","");} + } + + public String getCurrentOntologyURL()throws NoOntologySelectedException{ + p("getCurrentOntology: "+currentOntologyURL); + if(currentOntologyURL==null)throw new NoOntologySelectedException("Select Ontology First","quatsch"); + else return currentOntologyURL; + } + + public String getAlgorithmStatus(){ + return this.status; + } + + /** + * Specifies the URI of the ontology containing the background + * knowledge. Reads the ontology and sends it to the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + */ + // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch + /* + @WebMethod + public void readOntology(String ontologyURI) { + readOntology(ontologyURI, "RDF/XML"); + } + */ + + + public void removeOntology() { + this.currentOntologyURL=null; + this.reasoner=null; + this.rs=null; + this.positiveExamples = new TreeSet<Individual>(); + this.negativeExamples = new TreeSet<Individual>(); + this.ignoredConcept=new TreeSet<String>(); + p("removing Ontology"); + + } + + /** + * Specifies the URI of the ontology containing the background + * knowledge and its format. Reads the ontology and sends it to + * the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + * @param format "RDF/XML" or "N-TRIPLES". + */ + + + public void readOntology(String ontologyURL, String format) throws OntologyURLNotValid{ + this.currentOntologyURL=ontologyURL; + p("trying to read: "+ontologyURL+" ::"+format); + try{ + // this.ontologyURL = ontologyURL; + // this.ontologyFormat = format; + + // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien + // laden könnte (Fix: nur http:// zulassen, kein file://) + URL ontology = null; + try { + ontology = new URL(ontologyURL); + } catch (MalformedURLException e1) { + this.removeOntology(); + throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); + + } + + OntologyFileFormat ofFormat; + if (format.equals("RDF/XML")) + ofFormat = OntologyFileFormat.RDF_XML; + else + ofFormat = OntologyFileFormat.N_TRIPLES; + + Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); + m.put(ontology, ofFormat); + + // Default-URI für DIG-Reasoner setzen + + try { + Config.digReasonerURL = new URL(reasonerURL); + } catch (MalformedURLException e) { + // Exception tritt nie auf, da URL korrekt + e.printStackTrace(); + } + + reasoner = Main.createReasoner(new KB(), m); + rs = new ReasoningService(reasoner); + + Main.autoDetectConceptsAndRoles(rs); + reasoner.prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + p(rs.getSubsumptionHierarchy().toString()); + //rs.getRoleMembers(arg0) + } + catch (DoesNotExistException e) { + this.removeOntology(); + throw new OntologyURLNotValid("The URL of the Ontology is not correct<br>\nCheck settings and URL","OntologyURLNotValid"); + } + catch (JenaException e) { + e.printStackTrace();} + + + /*catch(Exception e2) { + + //p("exception:"+e.getMessage()); + e2.printStackTrace(); + }*/ + p("Ontology read: "+currentOntologyURL); + } + + + public void learnMonitored(){ + addOption(new ConfigurationOption("refinement","ignoredConcepts",ignoredConcept)); + this.lm=new LearnMonitor(this); + this.lm.start(); + //this.lm.learn(this); + } + + /*public void relearn(){ + //TreeSet<String> s=new TreeSet<String>(); + //new ConfigurationOption(); + this.lm=new LearnMonitor(this); + this.lm.start(); + //this.lm.learn(this); + }*/ + + + public String[] getAtomicConcepts()throws NoOntologySelectedException{ + try{ + return SortedSet2StringListConcepts( rs.getAtomicConcepts()); + }catch (Exception e) {throw new NoOntologySelectedException("Select Ontology First","ddddd");} + } + + public String[] retrieval(String Concept)throws NoOntologySelectedException{ + return SortedSet2StringListIndividuals(rs.retrieval(new AtomicConcept(Concept))); + } + + public String[] getAtomicRoles()throws NoOntologySelectedException{ + return SortedSet2StringListRoles( rs.getAtomicRoles()); + } + + public String[] getIndividualsForARole(String Role)throws NoOntologySelectedException{ + Map m=rs.getRoleMembers(new AtomicRole(Role)); + Set s=m.keySet(); + return SortedSet2StringListIndividuals(s); + } + + public synchronized void stop(){ + System.out.println("ROL"+this.ROL); + + System.out.println("lm"+lm); + System.out.println("lmstate"+lm.getState()); + System.out.println("lmalive"+lm.isAlive()); + System.out.println("lminterrupt"+lm.isInterrupted()); + this.ROL.stop(); + /*try{ + synchronized (this.lm) { + //this.lm.yield(); + } + }catch (Exception e) {e.printStackTrace();}*/ + System.out.println("lmstate"+lm.getState()); + System.out.println("lmalive"+lm.isAlive()); + System.out.println("lminterrupt"+lm.isInterrupted()); + + //this.ROL.stop(); + //this.lm.interrupt(); + + //this.lm.end(); + //this.lm.notify(); + } + + public String[] SortedSet2StringListIndividuals(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((Individual)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + + public String[] SortedSet2StringListConcepts(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((AtomicConcept)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + public String[] SortedSet2StringListRoles(Set s){ + + String[] ret=new String[s.size()]; + Iterator i=s.iterator(); + int a=0; + while (i.hasNext()){ + ret[a++]=((AtomicRole)i.next()).getName(); + } + Arrays.sort(ret); + return ret; + } + + public String[] al2s(ArrayList<String> al){ + String[] ret=new String[al.size()]; + for (int i = 0; i < al.size(); i++) { + ret[i]=al.get(i); + } + return ret; + } + public void p(String s){ + if(debug_flag){ + System.out.println("\t"+s); + } + + } +} Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2007-08-20 15:00:11 UTC (rev 8) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS.java 2007-08-20 15:23:17 UTC (rev 9) @@ -1,190 +1,223 @@ -package org.dllearner.server; - -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.SortedSet; -import java.util.TreeSet; - -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.jws.WebMethod; -import javax.jws.WebService; -import javax.jws.soap.SOAPBinding; - -import org.dllearner.Config; -import org.dllearner.LearningProblem; -import org.dllearner.Main; -import org.dllearner.OntologyFileFormat; -import org.dllearner.algorithms.refinement.ROLearner; -import org.dllearner.dl.Individual; -import org.dllearner.dl.KB; -import org.dllearner.reasoning.Reasoner; -import org.dllearner.reasoning.ReasoningMethodUnsupportedException; -import org.dllearner.reasoning.ReasoningService; - -/** - * Offene Fragen: - * - * Welche Rückgabetypen sind erlaubt? - * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie - * gelesen werden)? - * - * @author Jens Lehmann - * - */ -@WebService(name = "DLLearnerWebService") -@SOAPBinding(style = SOAPBinding.Style.RPC) -public class DLLearnerWS { - - // private String ontologyURL; - // private String ontologyFormat; - private Reasoner reasoner; - private ReasoningService rs; - private SortedSet<Individual> positiveExamples; - private SortedSet<Individual> negativeExamples; - - /* - public DLLearnerWS() { - System.out.println("call"); - }*/ - - @PostConstruct - public void postConstruct() { - System.out.println("post construct"); - positiveExamples = new TreeSet<Individual>(); - negativeExamples = new TreeSet<Individual>(); - } - - @PreDestroy - public void preConstruct() { - System.out.println("pre destroy"); - } - - /** - * Specifies the URI of the ontology containing the background - * knowledge. Reads the ontology and sends it to the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - */ - // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch - /* - @WebMethod - public void readOntology(String ontologyURI) { - readOntology(ontologyURI, "RDF/XML"); - } - */ - - /** - * Specifies the URI of the ontology containing the background - * knowledge and its format. Reads the ontology and sends it to - * the reasoner. - * - * @param ontologyURI The URI of the ontology to use. - * @param format "RDF/XML" or "N-TRIPLES". - */ - @WebMethod - public void readOntology(String ontologyURL, String format) { - // this.ontologyURL = ontologyURL; - // this.ontologyFormat = format; - - // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien - // laden könnte (Fix: nur http:// zulassen, kein file://) - URL ontology = null; - try { - ontology = new URL(ontologyURL); - } catch (MalformedURLException e1) { - e1.printStackTrace(); - } - - OntologyFileFormat ofFormat; - if (format.equals("RDF/XML")) - ofFormat = OntologyFileFormat.RDF_XML; - else - ofFormat = OntologyFileFormat.N_TRIPLES; - - Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); - m.put(ontology, ofFormat); - - // Default-URI für DIG-Reasoner setzen - try { - Config.digReasonerURL = new URL("http://localhost:8081"); - } catch (MalformedURLException e) { - // Exception tritt nie auf, da URL korrekt - e.printStackTrace(); - } - - reasoner = Main.createReasoner(new KB(), m); - rs = new ReasoningService(reasoner); - } - - /* - // String[] funktioniert leider noch nicht - @WebMethod - public void addPositiveExamples(String[] posExamples) { - for(String example : posExamples) - positiveExamples.add(new Individual(example)); - } - - @WebMethod - public void addNegativeExamples(String[] negExamples) { - for(String example : negExamples) - negativeExamples.add(new Individual(example)); - } - */ - - @WebMethod - public void addPositiveExample(String posExample) { - positiveExamples.add(new Individual(posExample)); - } - - @WebMethod - public void addNegativeExample(String negExample) { - negativeExamples.add(new Individual(negExample)); - } - - @WebMethod - public void removePositiveExample(String posExample) { - positiveExamples.remove(new Individual(posExample)); - } - - @WebMethod - public void removeNegativeExample(String negExample) { - negativeExamples.remove(new Individual(negExample)); - } - - @WebMethod - public String learnConcept() { - // notwendige Vorverarbeitungsschritte für den Lernalgorithmus - // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert - // werden - // - die Subsumptionhierarchie muss erstellt werden - // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen - Main.autoDetectConceptsAndRoles(rs); - reasoner.prepareSubsumptionHierarchy(); - if (Config.Refinement.improveSubsumptionHierarchy) { - try { - reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); - } catch (ReasoningMethodUnsupportedException e) { - // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl - e.printStackTrace(); - } - } - - System.out.println(positiveExamples); - System.out.println(negativeExamples); - - LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); - // erstmal wird nur der Refinement-Learner als Web-Service angeboten - ROLearner learner = new ROLearner(learningProblem); - return learner.getBestSolution().toString(); - } - - // Testmethode - @WebMethod - public String hello(String name) { - return "Hello " + name + "!"; - } - +package org.dllearner.server; + +import java.util.HashMap; +import java.util.Random; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.server.exceptions.ClientNotKnownException; +import org.dllearner.server.exceptions.NoOntologySelectedException; +import org.dllearner.server.exceptions.OntologyURLNotValid; + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWS { + Random rand=new Random(); + private HashMap<Integer, ClientState> clients; + + // private String ontologyURL; + // private String ontologyFormat; + + + + public DLLearnerWS(){ + this.clients=new HashMap<Integer, ClientState>(); + + } + + /** + * + * + * + */ + @WebMethod + public int getID(){ + int id=rand.nextInt(); + while (id<=0){ + id=rand.nextInt(); + } + + // dont change to local function get, cause of exception + ClientState c=this.clients.get(new Long(id)); + if(c!=null){ + return getID(); + } + else { + this.clients.put(new Integer(id), new ClientState()); + System.out.println("new Client with id: "+id); + return id; + } + + } + + @WebMethod + public void addPositiveExample(int id,String posExample) throws ClientNotKnownException{ + ClientState c=getClientState(id); + c.addPositiveExample(posExample); + //positiveExamples.add(new Individual(posExample)); + } + @WebMethod + public void addNegativeExample(int id,String negExample) throws ClientNotKnownException { + ClientState c=getClientState(id); + c.addNegativeExample(negExample); + } + @WebMethod + public void addIgnoredConcept(int id,String concept)throws ClientNotKnownException { + getClientState(id).addIgnoredConcept(concept); + } + + @WebMethod + public String[] selectInstancesForAConcept(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).selectInstancesForAConcept(Concept); + } + + + @WebMethod + public String[] getPositiveExamples(int id)throws ClientNotKnownException{ + ClientState c=getClientState(id); + return c.getPositiveExamples(); + } + @WebMethod + public String[] getNegativeExamples(int id)throws ClientNotKnownException{ + ClientState c=getClientState(id); + return c.getNegativeExamples(); + } + @WebMethod + public String[] getIgnoredConcepts(int id)throws ClientNotKnownException{ + return getClientState(id).getIgnoredConcepts(); + } + + @WebMethod + public boolean removePositiveExample(int id, String pos)throws ClientNotKnownException{ + return getClientState(id).removePositiveExample(pos); + } + + @WebMethod + public boolean removeNegativeExample(int id, String neg)throws ClientNotKnownException{ + return getClientState(id).removeNegativeExample(neg); + } + @WebMethod + public boolean removeAllExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllExamples(); + } + @WebMethod + public boolean removeAllPositiveExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllPositiveExamples(); + } + @WebMethod + public boolean removeAllNegativeExamples(int id)throws ClientNotKnownException{ + return getClientState(id).removeAllNegativeExamples(); + } + @WebMethod + public void removeIgnoredConcept(int id,String concept)throws ClientNotKnownException{ + getClientState(id).removeIgnoredConcept(concept); + } + + @WebMethod + public String getCurrentOntologyURL(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getCurrentOntologyURL(); + + } + + @WebMethod + public String[] getInstances(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getInstances(); + } + + @WebMethod + public String[] getAtomicConcepts(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getAtomicConcepts(); + } + + @WebMethod + public String[] getAtomicRoles(int id)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).getAtomicRoles(); + } + @WebMethod + public String[] getIndividualsForARole(int id,String Role)throws ClientNotKnownException, NoOntologySelectedException{ + return getClientState(id).getIndividualsForARole(Role); + } + @WebMethod + public String getSubsumptionHierarchy(int id)throws ClientNotKnownException, NoOntologySelectedException{ + return getClientState(id).getSubsumptionHierarchy(); + } + + @WebMethod + public String[] retrieval(int id,String Concept)throws ClientNotKnownException,NoOntologySelectedException{ + return getClientState(id).retrieval(Concept); + } + + @WebMethod + public void readOntology(int id,String ontologyURL, String format)throws ClientNotKnownException,OntologyURLNotValid{ + getClientState(id).readOntology(ontologyURL, format); + + } + + @WebMethod + public void removeOntology(int id)throws ClientNotKnownException{ + getClientState(id).removeOntology(); + } + + @WebMethod + public String learnConcept(int id)throws ClientNotKnownException{ + return "Deprecated method"; + + } + + + @WebMethod + public String getAlgorithmStatus(int id ) throws ClientNotKnownException{ + + return getClientState(id).getAlgorithmStatus(); + } + + + @WebMethod + public void learnMonitored(int id )throws ClientNotKnownException{ + getClientState(id).learnMonitored(); + } + /*@WebMethod + public void relearn(int id,String Concept )throws ClientNotKnownException{ + getClientState(id).relearn(Concept); + }*/ + + @WebMethod + public String getLastResult(int id)throws ClientNotKnownException{ + return getClientState(id).getLastResult(); + } + + @WebMethod + public void stop(int id)throws ClientNotKnownException{ + getClientState(id).stop(); + } + + + //*************************USER MANAGEMENT + + public ClientState getClientState(int id)throws ClientNotKnownException{ + System.out.println("Request from "+id); + ClientState c=this.clients.get(new Integer(id)); + if(c==null){ + //System.out.println(clients.keySet().toString()); + throw new ClientNotKnownException("Client with id: "+id+" is not known","ClientNotKnownException");}; + return c; + + } + + + + + } \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWS2.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,68 @@ +package org.dllearner.server; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.server.exceptions.ClientNotKnownException; + + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") + +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWS2 { + + /* + // String[] funktioniert leider noch nicht + @WebMethod + public void addPositiveExamples(String[] posExamples) { + for(String example : posExamples) + positiveExamples.add(new Individual(example)); + } + + @WebMethod + public void addNegativeExamples(String[] negExamples) { + for(String example : negExamples) + negativeExamples.add(new Individual(example)); + } + */ + + @WebMethod + /** + * @param name + * + * @return The sum + * @throws AddNumbersException + * if any of the numbers to be added is negative. + * + **/ + public String hellosimple(String name) throws ClientNotKnownException{ + /*for (int i = 0; i < name.length; i++) { + name[i]=i+"nnnn<br>"; + }*/ + if(name.equals("aa"))throw new ClientNotKnownException("a","b"); + + return "bbb"; + } + + + // Testmethode + @WebMethod + public String hello(String name){ + name=null; + //name.substring(5); + //throw new NullPointerException(); + return "Hello " + name + "!"; + } + +} \ No newline at end of file Modified: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java 2007-08-20 15:00:11 UTC (rev 8) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSStart.java 2007-08-20 15:23:17 UTC (rev 9) @@ -1,42 +1,71 @@ -package org.dllearner.server; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -import javax.xml.ws.Endpoint; - -public class DLLearnerWSStart { - - public static void main(String[] args) { - String url = "http://localhost:8181/services"; - if (args.length > 0) - url = args[0]; - - System.out.print("Starting DL-Learner web service at " + url + " ... "); - Endpoint endpoint = Endpoint.publish(url, new DLLearnerWS()); - System.out.println("OK."); - - System.out.println("Type \"exit\" to terminate web service."); - boolean terminate = false; - String inputString = ""; - do { - BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); - - try { - inputString = input.readLine(); - } catch (IOException e) { - e.printStackTrace(); - } - - if (inputString.equals("exit")) - terminate = true; - - } while (!terminate); - - System.out.print("Stopping web service ... "); - endpoint.stop(); - System.out.println("OK."); - } - -} +package org.dllearner.server; + + + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import javax.xml.ws.Endpoint; + +import com.sun.net.httpserver.HttpContext; +import com.sun.net.httpserver.HttpServer; + + +public class DLLearnerWSStart { + + public static void main(String[] args) { + String url = "http://139.18.114.78:8181/services"; + if (args.length > 0) + url = args[0]; + try{ + + InetSocketAddress isa=new InetSocketAddress("localhost",8181); + HttpServer server = HttpServer.create(isa, 5); + ExecutorService threads = Executors.newFixedThreadPool(5); + server.setExecutor(threads); + server.start(); + + System.out.print("Starting DL-Learner web service at http://" + + isa.getHostName()+":"+isa.getPort()+ "/services ... "); + Endpoint endpoint = Endpoint.create(new DLLearnerWS()); + //Endpoint endpoint = Endpoint.create(new CustomDataClass()); + HttpContext context = server.createContext("/services"); + endpoint.publish(context); + //Endpoint endpoint = Endpoint.publish(url, new DLLearnerWS()); + + System.out.println("OK."); + + + + System.out.println("Type \"exit\" to terminate web service."); + boolean terminate = false; + String inputString = ""; + do { + BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); + + try { + inputString = input.readLine(); + } catch (IOException e) { + e.printStackTrace(); + } + + if (inputString.equals("exit")) + terminate = true; + + } while (!terminate); + + System.out.print("Stopping web service ... "); + endpoint.stop(); + + server.stop(1); + threads.shutdown(); + System.out.println("OK."); + }catch (Exception e) {e.printStackTrace();} + } + +} Added: trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/DLLearnerWSoriginal.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,166 @@ +package org.dllearner.server; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; + +import javax.jws.WebMethod; +import javax.jws.WebService; +import javax.jws.soap.SOAPBinding; + +import org.dllearner.Config; +import org.dllearner.LearningProblem; +import org.dllearner.Main; +import org.dllearner.OntologyFileFormat; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.dl.Individual; +import org.dllearner.dl.KB; +import org.dllearner.reasoning.Reasoner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; +import org.dllearner.reasoning.ReasoningService; + +/** + * Offene Fragen: + * + * Welche Rückgabetypen sind erlaubt? + * Wie behandelt man Exceptions (z.B. aus angegebener URI kann keine Ontologie + * gelesen werden)? + * + * @author Jens Lehmann + * + */ +@WebService(name = "DLLearnerWebService") +@SOAPBinding(style = SOAPBinding.Style.RPC) +public class DLLearnerWSoriginal { + + // private String ontologyURL; + // private String ontologyFormat; + private Reasoner reasoner; + private ReasoningService rs; + private SortedSet<Individual> positiveExamples = new TreeSet<Individual>(); + private SortedSet<Individual> negativeExamples = new TreeSet<Individual>(); + + /** + * Specifies the URI of the ontology containing the background + * knowledge. Reads the ontology and sends it to the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + */ + // gleiche Methoden mit verschiedenen Parametern sind offenbar problematisch + /* + @WebMethod + public void readOntology(String ontologyURI) { + readOntology(ontologyURI, "RDF/XML"); + } + */ + + /** + * Specifies the URI of the ontology containing the background + * knowledge and its format. Reads the ontology and sends it to + * the reasoner. + * + * @param ontologyURI The URI of the ontology to use. + * @param format "RDF/XML" or "N-TRIPLES". + */ + @WebMethod + public void readOntology(String ontologyURL, String format) { + // this.ontologyURL = ontologyURL; + // this.ontologyFormat = format; + + // TODO: potentielles Sicherheitsrisiko, da man damit derzeit auch lokale Dateien + // laden könnte (Fix: nur http:// zulassen, kein file://) + URL ontology = null; + try { + ontology = new URL(ontologyURL); + } catch (MalformedURLException e1) { + e1.printStackTrace(); + } + + OntologyFileFormat ofFormat; + if (format.equals("RDF/XML")) + ofFormat = OntologyFileFormat.RDF_XML; + else + ofFormat = OntologyFileFormat.N_TRIPLES; + + Map<URL, OntologyFileFormat> m = new HashMap<URL, OntologyFileFormat>(); + m.put(ontology, ofFormat); + + // Default-URI für DIG-Reasoner setzen + try { + Config.digReasonerURL = new URL("http://localhost:8081"); + } catch (MalformedURLException e) { + // Exception tritt nie auf, da URL korrekt + e.printStackTrace(); + } + + reasoner = Main.createReasoner(new KB(), m); + + rs = new ReasoningService(reasoner); + + } + + + @WebMethod + public String[] testString(String c) { + + return new String[]{"a","b"}; + } + + // String[] funktioniert leider noch nicht + @WebMethod + public void addPositiveExamples(String[] posExamples) { + for(String example : posExamples) + positiveExamples.add(new Individual(example)); + } + + @WebMethod + public void addNegativeExamples(String[] negExamples) { + for(String example : negExamples) + negativeExamples.add(new Individual(example)); + } + + + @WebMethod + public void addPositiveExample(String posExample) { + positiveExamples.add(new Individual(posExample)); + } + + @WebMethod + public void addNegativeExample(String negExample) { + negativeExamples.add(new Individual(negExample)); + } + + @WebMethod + public String learnConcept() { + // notwendige Vorverarbeitungsschritte für den Lernalgorithmus + // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert + // werden + // - die Subsumptionhierarchie muss erstellt werden + // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen + Main.autoDetectConceptsAndRoles(rs); + reasoner.prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + reasoner.getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + + LearningProblem learningProblem = new LearningProblem(rs, positiveExamples, negativeExamples); + // erstmal wird nur der Refinement-Learner als Web-Service angeboten + ROLearner learner = new ROLearner(learningProblem); + return learner.getBestSolution().toString(); + } + + // Testmethode + @WebMethod + public String hello(String name) { + return "Hello " + name + "!"; + } + +} \ No newline at end of file Added: trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/LearnMonitor.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,81 @@ +package org.dllearner.server; + +import org.dllearner.Config; +import org.dllearner.LearningProblem; +import org.dllearner.Main; +import org.dllearner.algorithms.refinement.ROLearner; +import org.dllearner.reasoning.ReasoningMethodUnsupportedException; + +public class LearnMonitor extends Thread { + + + private ClientState c; + private boolean active = false; + + //private ROLearner ROL; + + public LearnMonitor(ClientState c){ + this.c=c; + } + + + public void end(){ + + System.out.println("trying to end"); + System.out.println("ROL2"+c.ROL); + this.c.ROL.stop(); + c.setLastResult(c.ROL.getBestSolution().toString()); + c.setStatus("stopped"); + } + + public void learn(){ + + this.start(); + + } + + public void run(){ + try{ + c.setStatus("still running"); + active=true; + c.setStatus("running"); + + // notwendige Vorverarbeitungsschritte für den Lernalgorithmus + // - es müssen ein paar Konzepte, die ev. von Jena generiert wurden ignoriert + // werden + // - die Subsumptionhierarchie muss erstellt werden + // - die Subsumptionhierarchie wird verbessert um das Lernen effizienter zu machen + Main.autoDetectConceptsAndRoles(c.getRs()); + c.getReasoner().prepareSubsumptionHierarchy(); + if (Config.Refinement.improveSubsumptionHierarchy) { + try { + c.getReasoner().getSubsumptionHierarchy().improveSubsumptionHierarchy(); + } catch (ReasoningMethodUnsupportedException e) { + // solange DIG-Reasoner eingestellt ist, schlägt diese Operation nie fehl + e.printStackTrace(); + } + } + c.p("learning started"); + LearningProblem learningProblem = new LearningProblem(c.getRs(), c.getPosExamples(), c.getNegExamples()); + // erstmal wird nur der Refinement-Learner als Web-Service angeboten + //System.out.println("aaaa"); + c.ROL = new ROLearner(learningProblem); + + c.ROL.start(); + //new ROLearner(); + //c.p(("ROL1"+ROL)); + + + + + + + //c.setLastResult(c.ROL.getBestSolution().toString()); + c.setLastResult(c.ROL.getBestSolution().toString()); + c.setStatus("finished"); + + }catch (Exception e) {e.printStackTrace();} + finally{active=false;}; + } + +} Added: trunk/src/dl-learner/org/dllearner/server/exceptions/ClientNotKnownException.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/exceptions/ClientNotKnownException.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/exceptions/ClientNotKnownException.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,14 @@ +package org.dllearner.server.exceptions; + +public class ClientNotKnownException extends Exception { + String detail; + + public ClientNotKnownException (String message, String detail) { + super (message); + this.detail = detail; + } + + public String getDetail () { + return detail; + } +} Added: trunk/src/dl-learner/org/dllearner/server/exceptions/NoOntologySelectedException.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/exceptions/NoOntologySelectedException.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/exceptions/NoOntologySelectedException.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,14 @@ +package org.dllearner.server.exceptions; + +public class NoOntologySelectedException extends Exception { + String detail; + + public NoOntologySelectedException (String message, String detail) { + super (message); + this.detail = detail; + } + + public String getDetail () { + return detail; + } +} Added: trunk/src/dl-learner/org/dllearner/server/exceptions/OntologyURLNotValid.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/exceptions/OntologyURLNotValid.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/exceptions/OntologyURLNotValid.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,14 @@ +package org.dllearner.server.exceptions; + +public class OntologyURLNotValid extends Exception { + String detail; + + public OntologyURLNotValid (String message, String detail) { + super (message); + this.detail = detail; + } + + public String getDetail () { + return detail; + } +} Added: trunk/src/dl-learner/org/dllearner/server/jaxws/ClientNotKnownExceptionBean.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/jaxws/ClientNotKnownExceptionBean.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/jaxws/ClientNotKnownExceptionBean.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,63 @@ + +package org.dllearner.server.jaxws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * This class was generated by the JAXWS SI. + * JAX-WS RI 2.0_02-b08-fcs + * Generated source version: 2.0_02 + * + */ +@XmlRootElement(name = "ClientNotKnownException", namespace = "http://ws/") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "ClientNotKnownException", namespace = "http://ws/", propOrder = { + "detail", + "message" +}) +public class ClientNotKnownExceptionBean { + + private String detail; + private String message; + + /** + * + * @return + * returns String + */ + public String getDetail() { + return this.detail; + } + + /** + * + * @param detail + * the value for the detail property + */ + public void setDetail(String detail) { + this.detail = detail; + } + + /** + * + * @return + * returns String + */ + public String getMessage() { + return this.message; + } + + /** + * + * @param message + * the value for the message property + */ + public void setMessage(String message) { + this.message = message; + } + +} Added: trunk/src/dl-learner/org/dllearner/server/jaxws/NoOntologySelectedExceptionBean.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/jaxws/NoOntologySelectedExceptionBean.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/jaxws/NoOntologySelectedExceptionBean.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,63 @@ + +package org.dllearner.server.jaxws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * This class was generated by the JAXWS SI. + * JAX-WS RI 2.0_02-b08-fcs + * Generated source version: 2.0_02 + * + */ +@XmlRootElement(name = "NoOntologySelectedException", namespace = "http://ws/") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "NoOntologySelectedException", namespace = "http://ws/", propOrder = { + "detail", + "message" +}) +public class NoOntologySelectedExceptionBean { + + private String detail; + private String message; + + /** + * + * @return + * returns String + */ + public String getDetail() { + return this.detail; + } + + /** + * + * @param detail + * the value for the detail property + */ + public void setDetail(String detail) { + this.detail = detail; + } + + /** + * + * @return + * returns String + */ + public String getMessage() { + return this.message; + } + + /** + * + * @param message + * the value for the message property + */ + public void setMessage(String message) { + this.message = message; + } + +} Added: trunk/src/dl-learner/org/dllearner/server/jaxws/OntologyURLNotValidBean.java =================================================================== --- trunk/src/dl-learner/org/dllearner/server/jaxws/OntologyURLNotValidBean.java (rev 0) +++ trunk/src/dl-learner/org/dllearner/server/jaxws/OntologyURLNotValidBean.java 2007-08-20 15:23:17 UTC (rev 9) @@ -0,0 +1,63 @@ + +package org.dllearner.server.jaxws; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; + + +/** + * This class was generated by the JAXWS SI. + * JAX-WS RI 2.0_02-b08-fcs + * Generated source version: 2.0_02 + * + */ +@XmlRootElement(name = "OntologyURLNotValid", namespace = "http://ws/") +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "OntologyURLNotValid", namespace = "http://ws/", propOrder = { + "detail", + "message" +}) +public class OntologyURLNotValidBean { + + private String detail; + private String message; + + /** + * + * @return + * returns String + */ + public String getDetail() { + return this.detail; + } + + /** + * + * @param detail + * the value for the detail property + */ + public void setDetail(String detail) { + this.detail = detail; + } + + /** + * + * @return + * returns String + */ + public String getMessage() { + return this.message; + } + + /** + * + * @param message + * the value for the message property + */ + public void setMessage(String message) { + this.message = message; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 15:00:13
|
Revision: 8 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=8&view=rev Author: jenslehmann Date: 2007-08-20 08:00:11 -0700 (Mon, 20 Aug 2007) Log Message: ----------- removed more executable flags Property Changed: ---------------- trunk/src/dl-learner/org/dllearner/Config.java trunk/src/dl-learner/org/dllearner/ConfigurationManager.java trunk/src/dl-learner/org/dllearner/ConfigurationOption.java trunk/src/dl-learner/org/dllearner/Info.java trunk/src/dl-learner/org/dllearner/LearningProblem.java trunk/src/dl-learner/org/dllearner/Main.java trunk/src/dl-learner/org/dllearner/Score.java trunk/src/dl-learner/org/dllearner/ScoreThreeValued.java trunk/src/dl-learner/org/dllearner/ScoreTwoValued.java Property changes on: trunk/src/dl-learner/org/dllearner/Config.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/ConfigurationManager.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/ConfigurationOption.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/Info.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/LearningProblem.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/Main.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/Score.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/ScoreThreeValued.java ___________________________________________________________________ Name: svn:executable - * Property changes on: trunk/src/dl-learner/org/dllearner/ScoreTwoValued.java ___________________________________________________________________ Name: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 14:57:25
|
Revision: 7 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=7&view=rev Author: jenslehmann Date: 2007-08-20 07:57:24 -0700 (Mon, 20 Aug 2007) Log Message: ----------- removed executable flag Property Changed: ---------------- trunk/README Property changes on: trunk/README ___________________________________________________________________ Name: svn:executable - * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 14:48:02
|
Revision: 6 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=6&view=rev Author: jenslehmann Date: 2007-08-20 07:47:39 -0700 (Mon, 20 Aug 2007) Log Message: ----------- changed requirements to Java 6 Modified Paths: -------------- trunk/README Modified: trunk/README =================================================================== --- trunk/README 2007-08-20 14:37:38 UTC (rev 5) +++ trunk/README 2007-08-20 14:47:39 UTC (rev 6) @@ -4,7 +4,7 @@ Requirements ============ -Java 5 is required. No installation is necessary. Just download and extract +Java 6 is required. No installation is necessary. Just download and extract DL-Learner. Instructions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 13:29:00
|
Revision: 4 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=4&view=rev Author: jenslehmann Date: 2007-08-20 06:28:55 -0700 (Mon, 20 Aug 2007) Log Message: ----------- added examples Added Paths: ----------- trunk/examples/arch/ trunk/examples/arch/arch.conf trunk/examples/arch/arch.gif trunk/examples/arch/arch.owl trunk/examples/arch/arch.png trunk/examples/arch/arch_owl.conf trunk/examples/dbpedia/ trunk/examples/dbpedia/AristotleWorking1.conf trunk/examples/dbpedia/SilentBob.conf trunk/examples/dbpedia/SilentBobWorking1.conf trunk/examples/dbpedia/SilentBobWorking2.conf trunk/examples/father.conf trunk/examples/father.owl trunk/examples/father2.conf trunk/examples/forte/ trunk/examples/forte/forte.conf trunk/examples/forte/forte.owl trunk/examples/forte/forte_uncle.conf trunk/examples/forte/statistics_uncle.pdf trunk/examples/grandfather.conf trunk/examples/poker/ trunk/examples/poker/pair50.owl trunk/examples/poker/pair_owl.conf trunk/examples/poker/poker_pair.conf trunk/examples/poker/poker_straight.conf trunk/examples/poker/straight.owl trunk/examples/poker/straight_owl.conf trunk/examples/trains/ trunk/examples/trains/trains.conf trunk/examples/trains/trains.gif trunk/examples/trains/trains.owl trunk/examples/trains/trains_owl.conf trunk/examples/uncle.conf trunk/examples/yinyang_examples/ trunk/examples/yinyang_examples/Brother.conf trunk/examples/yinyang_examples/Daughter.conf trunk/examples/yinyang_examples/Father.conf trunk/examples/yinyang_examples/GrandFather.conf trunk/examples/yinyang_examples/GrandMother.conf trunk/examples/yinyang_examples/GrandParent.conf trunk/examples/yinyang_examples/Offspring.conf trunk/examples/yinyang_examples/Parent.conf trunk/examples/yinyang_examples/Sibling.conf trunk/examples/yinyang_examples/Sister.conf trunk/examples/yinyang_examples/basicFamily.owl trunk/examples/yinyang_examples/readme.txt trunk/examples/yinyang_files/ trunk/examples/yinyang_files/archLearningProblem.xml trunk/examples/yinyang_files/archNegatives.txt trunk/examples/yinyang_files/archPositives.txt trunk/examples/yinyang_files/forteLearningProblemYinYang.xml trunk/examples/yinyang_files/forteNegativesYinYang.txt trunk/examples/yinyang_files/fortePositivesYinYang.txt trunk/examples/yinyang_files/pairLearningProblem.xml trunk/examples/yinyang_files/pairNegatives.txt trunk/examples/yinyang_files/pairPositives.txt trunk/examples/yinyang_files/readme.txt trunk/examples/yinyang_files/straightLearningProblem.xml trunk/examples/yinyang_files/straightNegatives.txt trunk/examples/yinyang_files/straightPositives.txt Added: trunk/examples/arch/arch.conf =================================================================== --- trunk/examples/arch/arch.conf (rev 0) +++ trunk/examples/arch/arch.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,115 @@ +/***************************** + +Example created from this: + +arch(A, B, C) A, B and C form an arch with lintel A +supports(A, B) A supports B +left-of(A, B) A is left of B +touches(A, B) the sides of A and B touch +brick(A) A is a brick +wedge(A) A is a wedge +parallelpiped(A, B) A is a brick or a wedge + +Solution: arch(A, B, C) <- left-of(B, C), supports(B, A), not touches(B, C) + +Solution +EXISTS hasPillar.EXISTS leftof.TOP <-TOO OBVIOUS all constructions c1,c2,c3,c4 +AND EXISTS hasPillar.EXISTS supports.TOP <-IS FOUND [c1, c3, c4] +AND NOT EXISTS hasPillar.EXISTS touches.TOP <- Not found (open world assumption) + work around with freeStandingPillar + +see picture arch.jpg + + +***************************/ + + //reasoner = kaon2; + + // search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "searchTree.txt"; +//export("arch.owl"); + +/** background knowledge **/ +parallelpipe = (brick OR wedge). +freeStandingPillar = (pillar AND NOT EXISTS touches.TOP ) . + + + +construction(c1). +construction(c2). +construction(c3). +construction(c4). +construction(c5). + + +pillar(p1). +pillar(p2). +pillar(p3). +pillar(p4). +pillar(p5). +pillar(p6). +pillar(p7). +pillar(p8). +pillar(p9). + + +brick(a). +brick(b). +brick(c). +wedge(d). +wedge(e). + +hasPillar(c1,p1). +hasPillar(c1,p2). +hasPillar(c2,p3). +hasPillar(c2,p4). +hasPillar(c3,p5). +hasPillar(c3,p6). +hasPillar(c4,p7). +hasPillar(c4,p8). +hasPillar(c5,p9). + + + + +hasParallelpipe(c1,a). +hasParallelpipe(c2,b). +hasParallelpipe(c3,c). +hasParallelpipe(c4,d). +hasParallelpipe(c5,e). + + +supports(p1,a). +supports(p2,a). +supports(p5,c). +supports(p6,c). +supports(p7,d). +supports(p8,d). +supports(p9,e). + + +leftof(p1,p2). +leftof(p3,p4). +leftof(p5,p6). +leftof(p7,p8). + +touches(p5,p6). + + +freeStandingPillar(p1). +freeStandingPillar(p2). +freeStandingPillar(p3). +freeStandingPillar(p4). +freeStandingPillar(p7). +freeStandingPillar(p8). +freeStandingPillar(p9). + + + +/** examples **/ ++arch(c1). ++arch(c4). +-arch(c2). +-arch(c3). +-arch(c5). Added: trunk/examples/arch/arch.gif =================================================================== (Binary files differ) Property changes on: trunk/examples/arch/arch.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/examples/arch/arch.owl =================================================================== --- trunk/examples/arch/arch.owl (rev 0) +++ trunk/examples/arch/arch.owl 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,115 @@ +<?xml version="1.0"?> +<!DOCTYPE rdf:RDF [ + <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> +]> +<rdf:RDF xml:base="http://localhost/foo" +xmlns:a="http://localhost/foo#" +xmlns:owl="http://www.w3.org/2002/07/owl#" +xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" +xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" +xmlns:prefix1="http://localhost/foo#"> + <owl:Ontology rdf:about=""/> + <owl:Class rdf:ID="freeStandingPillar"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#pillar"/> + <owl:Class> + <owl:complementOf> + <owl:Restriction> + <owl:onProperty rdf:resource="#touches"/> + <owl:someValuesFrom rdf:resource="&owl;Thing"/> + </owl:Restriction> + </owl:complementOf> + </owl:Class> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:Class rdf:ID="parallelpipe"> + <owl:equivalentClass> + <owl:Class> + <owl:unionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#brick"/> + <owl:Class rdf:about="#wedge"/> + </owl:unionOf> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <prefix1:brick rdf:ID="a"/> + <prefix1:brick rdf:ID="b"/> + <prefix1:brick rdf:ID="c"/> + <prefix1:construction rdf:ID="c1"> + <prefix1:hasParallelpipe rdf:resource="#a"/> + <prefix1:hasPillar rdf:resource="#p1"/> + <prefix1:hasPillar rdf:resource="#p2"/> + </prefix1:construction> + <prefix1:construction rdf:ID="c2"> + <prefix1:hasParallelpipe rdf:resource="#b"/> + <prefix1:hasPillar rdf:resource="#p3"/> + <prefix1:hasPillar rdf:resource="#p4"/> + </prefix1:construction> + <prefix1:construction rdf:ID="c3"> + <prefix1:hasParallelpipe rdf:resource="#c"/> + <prefix1:hasPillar rdf:resource="#p5"/> + <prefix1:hasPillar rdf:resource="#p6"/> + </prefix1:construction> + <prefix1:construction rdf:ID="c4"> + <prefix1:hasParallelpipe rdf:resource="#d"/> + <prefix1:hasPillar rdf:resource="#p7"/> + <prefix1:hasPillar rdf:resource="#p8"/> + </prefix1:construction> + <prefix1:construction rdf:ID="c5"> + <prefix1:hasParallelpipe rdf:resource="#e"/> + <prefix1:hasPillar rdf:resource="#p9"/> + </prefix1:construction> + <prefix1:wedge rdf:ID="d"/> + <prefix1:wedge rdf:ID="e"/> + <prefix1:freeStandingPillar rdf:ID="p1"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:leftof rdf:resource="#p2"/> + <prefix1:supports rdf:resource="#a"/> + </prefix1:freeStandingPillar> + <prefix1:freeStandingPillar rdf:ID="p2"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:supports rdf:resource="#a"/> + </prefix1:freeStandingPillar> + <prefix1:freeStandingPillar rdf:ID="p3"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:leftof rdf:resource="#p4"/> + </prefix1:freeStandingPillar> + <prefix1:freeStandingPillar rdf:ID="p4"> + <rdf:type rdf:resource="#pillar"/> + </prefix1:freeStandingPillar> + <prefix1:pillar rdf:ID="p5"> + <prefix1:leftof rdf:resource="#p6"/> + <prefix1:supports rdf:resource="#c"/> + <prefix1:touches rdf:resource="#p6"/> + </prefix1:pillar> + <prefix1:pillar rdf:ID="p6"> + <prefix1:supports rdf:resource="#c"/> + </prefix1:pillar> + <prefix1:freeStandingPillar rdf:ID="p7"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:leftof rdf:resource="#p8"/> + <prefix1:supports rdf:resource="#d"/> + </prefix1:freeStandingPillar> + <prefix1:freeStandingPillar rdf:ID="p8"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:supports rdf:resource="#d"/> + </prefix1:freeStandingPillar> + <prefix1:freeStandingPillar rdf:ID="p9"> + <rdf:type rdf:resource="#pillar"/> + <prefix1:supports rdf:resource="#e"/> + </prefix1:freeStandingPillar> + <owl:Class rdf:ID="brick"/> + <owl:Class rdf:ID="construction"/> + <owl:Class rdf:ID="pillar"/> + <owl:Class rdf:ID="wedge"/> + <owl:Class rdf:about="http://www.w3.org/2002/07/owl#Thing"/> + <owl:ObjectProperty rdf:ID="hasParallelpipe"/> + <owl:ObjectProperty rdf:ID="hasPillar"/> + <owl:ObjectProperty rdf:ID="leftof"/> + <owl:ObjectProperty rdf:ID="supports"/> + <owl:ObjectProperty rdf:ID="touches"/> +</rdf:RDF> Added: trunk/examples/arch/arch.png =================================================================== (Binary files differ) Property changes on: trunk/examples/arch/arch.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/examples/arch/arch_owl.conf =================================================================== --- trunk/examples/arch/arch_owl.conf (rev 0) +++ trunk/examples/arch/arch_owl.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,43 @@ +/***************************** + +Example created from this: + +arch(A, B, C) A, B and C form an arch with lintel A +supports(A, B) A supports B +left-of(A, B) A is left of B +touches(A, B) the sides of A and B touch +brick(A) A is a brick +wedge(A) A is a wedge +parallelpiped(A, B) A is a brick or a wedge + +Solution: arch(A, B, C) <- left-of(B, C), supports(B, A), not touches(B, C) + +Solution +EXISTS hasPillar.EXISTS leftof.TOP <-TOO OBVIOUS all constructions c1,c2,c3,c4 +AND EXISTS hasPillar.EXISTS supports.TOP <-IS FOUND [c1, c3, c4] +AND NOT EXISTS hasPillar.EXISTS touches.TOP <- Not found (open world assumption) + work around with freeStandingPillar + +see picture arch.jpg + + +***************************/ + + //reasoner = kaon2; + + // search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "searchTree.txt"; +refinement.quiet = true; +import("arch.owl"); +// hidePrefix="http://localhost/foo#"; +/** background knowledge **/ + + + +/** examples **/ ++arch("http://localhost/foo#c1"). ++arch("http://localhost/foo#c4"). +-arch("http://localhost/foo#c2"). +-arch("http://localhost/foo#c3"). +-arch("http://localhost/foo#c5"). Added: trunk/examples/dbpedia/AristotleWorking1.conf =================================================================== --- trunk/examples/dbpedia/AristotleWorking1.conf (rev 0) +++ trunk/examples/dbpedia/AristotleWorking1.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,82 @@ + +loadJarFile("lib/modules/sparqlModule.jar"); +runPreprocessingModule("org.dllearner.modules.SparqlModule"); + +// reasoner settings +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +useRetrievalForClassification = false; +refinement.useDIGMultiInstanceChecks = twoChecks; + +// algorithm settings +algorithm = refinement; +refinement.horizontalExpansionFactor = 0.6; +refinement.quiet = false; +refinement.useTooWeakList = true; + +// search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "Aristotle_searchTree.txt"; + +// control output +showIndividuals = true; +showConcepts = true; +showRoles = true; +showInternalKB = true; +showSubsumptionHierarchy = true; + +hidePrefix="http://dbpedia.org/resource/"; +// + +refinement.useAllConstructor = false; +refinement.useExistsConstructor = true; +refinement.useNegation = false; + +sparqlModule.numberOfRecursion = 2; +/** +1 flach nicht zu empfehlen +2 Klassen f�r objects und properties of objects +3 Klassen f�r properties of objects und superklassen von klassen +**/ +sparqlModule.filterMode = 0; + + +/*sparqlModule.sparqlPredicateFilterList={"http://www.w3.org/2004/02/skos/core", + "http://xmlns.com/foaf/0.1/", + "http://dbpedia.org/property/wikipage-", + "http://www.w3.org/2002/07/owl#sameAs", + "http://dbpedia.org/property/reference"}; +sparqlModule.sparqlObjectFilterList={"http://dbpedia.org/resource/Category:Articles_", + "http://dbpedia.org/resource/Category:Wikipedia_", + "http://xmlns.com/foaf/0.1/", + "http://dbpedia.org/resource/Category", + "http://dbpedia.org/resource/Template", + "http://upload.wikimedia.org/wikipedia/commons"};*/ +//sparqlModule.classList={}; +//sparqlModule.useLiterals = false; + + + + +//mathematiker ++test("http://dbpedia.org/resource/Pythagoras"). +//well you know ++test("http://dbpedia.org/resource/Philolaus"). +//was a Greek Pythagorean and Presocratic. ++test("http://dbpedia.org/resource/Archytas"). +//was an Ancient Greek philosopher, mathematician, astronomer, statesman, and strategist. + + +//Philosophen +-test("http://dbpedia.org/resource/Socrates"). +-test("http://dbpedia.org/resource/Plato"). + +-test("http://dbpedia.org/resource/Zeno_of_Elea"). +//was a pre-Socratic Greek philosopher +-test("http://dbpedia.org/resource/Democritus"). +//was a pre-Socratic Greek philosopher + + + + + Added: trunk/examples/dbpedia/SilentBob.conf =================================================================== --- trunk/examples/dbpedia/SilentBob.conf (rev 0) +++ trunk/examples/dbpedia/SilentBob.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,79 @@ +loadJarFile("lib/modules/sparqlModule.jar"); +runPreprocessingModule("org.dllearner.modules.SparqlModule"); + +// reasoner settings +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +useRetrievalForClassification = false; +refinement.useDIGMultiInstanceChecks = twoChecks; + +// algorithm settings +algorithm = refinement; +refinement.horizontalExpansionFactor = 0.6; +refinement.quiet = false; +refinement.useTooWeakList = true; + +// search tree protocol +refinement.writeSearchTree = true; +refinement.searchTreeFile = "SilentBob_searchTree.txt"; + +// control output +showIndividuals = true; +showConcepts = true; +showRoles = true; +showInternalKB = true; +showSubsumptionHierarchy = true; + +runPreprocessingModule("org.dllearner.modules.SparqlModule"); + +hidePrefix="http://dbpedia.org/resource/"; + + +refinement.useAllConstructor = false; +refinement.useExistsConstructor = true; +refinement.useNegation = false; +// missbraucht als number of recursions, wird minus 10 gerechnet +// es gilt: +/** +11 flach nicht zu empfehlen +12 Klassen f�r objects und properties of objects +13 Klassen f�r properties of objects und superklassen von klassen +**/ +gp.numberOfIndividuals = 13; +// nur yago =0 , nur category = 1 +// sollte nicht mit aufgenommen werden eher 3 listen mit uris +gp.crossoverPercent = 1; + + + + ++test("http://dbpedia.org/resource/Jason_Mewes"). ++test("http://dbpedia.org/resource/Kevin_Smith"). +-test("http://dbpedia.org/resource/Trey_Parker"). +-test("http://dbpedia.org/resource/Matt_Stone"). + + + +/* +TBox[0]: +RBox[0]: +ABox[0]: + +Subsumption Hierarchy is improved for Refinement Operator Based Algorithm +java.util.NoSuchElementException + at java.util.TreeMap.key(Unknown Source) + at java.util.TreeMap.firstKey(Unknown Source) + at java.util.TreeSet.first(Unknown Source) + at org.dllearner.reasoning.SubsumptionHierarchy.improveSubsumptionHierar +chy(Unknown Source) + at org.dllearner.Main.<init>(Unknown Source) + at org.dllearner.parser.DLLearner.main(Unknown Source) + at org.dllearner.QuickStart.main(Unknown Source) + + +*/ + + + + + Added: trunk/examples/dbpedia/SilentBobWorking1.conf =================================================================== --- trunk/examples/dbpedia/SilentBobWorking1.conf (rev 0) +++ trunk/examples/dbpedia/SilentBobWorking1.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,60 @@ +loadJarFile("lib/modules/sparqlModule.jar"); +runPreprocessingModule("org.dllearner.modules.SparqlModule"); + +// reasoner settings +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +useRetrievalForClassification = false; +refinement.useDIGMultiInstanceChecks = twoChecks; + +// algorithm settings +algorithm = refinement; +refinement.horizontalExpansionFactor = 0.6; +refinement.quiet = false; +refinement.useTooWeakList = true; + +// search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "Aristotle_searchTree.txt"; + +// control output +showIndividuals = true; +showConcepts = true; +showRoles = true; +showInternalKB = true; +showSubsumptionHierarchy = true; + +hidePrefix="http://dbpedia.org/resource/"; + + +refinement.useAllConstructor = false; +refinement.useExistsConstructor = true; +refinement.useNegation = false; +// missbraucht als number of recursions, wird minus 10 gerechnet +// es gilt: +/** +11 flach nicht zu empfehlen +12 Klassen fr objects und properties of objects +13 Klassen fr properties of objects und superklassen von klassen +**/ +gp.numberOfIndividuals = 13; +// nur yago =0 , nur category = 1 nur skos+cat =2 +// sollte nicht mit aufgenommen werden eher 3 listen mit uris +gp.crossoverPercent = 0; + +// http://dbpedia.org/class/yago/agnostic OR http://dbpedia.org/class/yago/artist +// http://dbpedia.org/class/yago/agnostic OR http://dbpedia.org/class/yago/teetotaler + + ++test("http://dbpedia.org/resource/Matt_Stone"). ++test("http://dbpedia.org/resource/Sarah_Silverman"). +-test("http://dbpedia.org/resource/Jim_Carrey"). +-test("http://dbpedia.org/resource/Jason_Mewes"). +-test("http://dbpedia.org/resource/Kevin_Smith"). +-test("http://dbpedia.org/resource/Trey_Parker"). +-test("http://dbpedia.org/resource/Adam_Sandler"). + + + + + Added: trunk/examples/dbpedia/SilentBobWorking2.conf =================================================================== --- trunk/examples/dbpedia/SilentBobWorking2.conf (rev 0) +++ trunk/examples/dbpedia/SilentBobWorking2.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,105 @@ +loadJarFile("lib/modules/sparqlModule.jar"); +runPreprocessingModule("org.dllearner.modules.SparqlModule"); + +// reasoner settings +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +useRetrievalForClassification = false; +refinement.useDIGMultiInstanceChecks = twoChecks; + +// algorithm settings +algorithm = refinement; +refinement.horizontalExpansionFactor = 0.6; +refinement.quiet = false; +refinement.useTooWeakList = true; + +// search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "Aristotle_searchTree.txt"; + +// control output +showIndividuals = true; +showConcepts = true; +showRoles = true; +showInternalKB = true; +showSubsumptionHierarchy = true; + +hidePrefix="http://dbpedia.org/resource/"; + + +refinement.useAllConstructor = false; +refinement.useExistsConstructor = true; +refinement.useNegation = false; +// missbraucht als number of recursions, wird minus 10 gerechnet +// es gilt: +/** +11 flach nicht zu empfehlen +12 Klassen f�r objects und properties of objects +13 Klassen f�r properties of objects und superklassen von klassen +**/ +gp.numberOfIndividuals = 13; +// nur yago =0 , nur category = 1 nur skos+cat =2 +// sollte nicht mit aufgenommen werden eher 3 listen mit uris +gp.crossoverPercent = 2; + +// hier sind alternativen zum ausklammern + + +/* +Category:1970s AND Category:Religion_in_the_United_States +Category:Actors AND Category:Religion_in_the_United_States +*/ + ++test("http://dbpedia.org/resource/Matt_Stone"). ++test("http://dbpedia.org/resource/Sarah_Silverman"). ++test("http://dbpedia.org/resource/Kevin_Smith"). + +-test("http://dbpedia.org/resource/Jason_Mewes"). +-test("http://dbpedia.org/resource/Jim_Carrey"). +-test("http://dbpedia.org/resource/Trey_Parker"). +-test("http://dbpedia.org/resource/Adam_Sandler"). + + + + +/* +Category:1970s AND Category:Voice_actors_by_series) +Category:Actors_by_nationality AND Category:Voice_actors_by_series) +Category:Actors_by_religion AND Category:Voice_actors_by_series) +Category:Ethnic_groups_in_the_United_States AND Category:Voice_actors_by_seri +es) +Category:European_diaspora AND Category:Voice_actors_by_series) +Category:Jews AND Category:Voice_actors_by_series) +Category:Jews_and_Judaism_in_the_United_States AND Category:Voice_actors_by_s +eries) +Category:Jews_by_country AND Category:Voice_actors_by_series) +Category:Jews_by_occupation AND Category:Voice_actors_by_series) +Category:Middle_Eastern_Americans AND Category:Voice_actors_by_series) +Category:People_by_ethnic_or_national_origin AND Category:Voice_actors_by_ser +ies) +Category:People_by_nationality_and_religion AND Category:Voice_actors_by_seri +es) +Category:Religion_in_the_United_States AND Category:Voice_actors_by_series) + ++test("http://dbpedia.org/resource/Matt_Stone"). ++test("http://dbpedia.org/resource/Sarah_Silverman"). +-test("http://dbpedia.org/resource/Kevin_Smith"). +-test("http://dbpedia.org/resource/Jason_Mewes"). +-test("http://dbpedia.org/resource/Jim_Carrey"). +-test("http://dbpedia.org/resource/Trey_Parker"). +-test("http://dbpedia.org/resource/Adam_Sandler"). +*/ + + +/* +(Category:Actors AND Category:European_diaspora) ++test("http://dbpedia.org/resource/Matt_Stone"). ++test("http://dbpedia.org/resource/Sarah_Silverman"). ++test("http://dbpedia.org/resource/Brian_O%27Halloran"). +-test("http://dbpedia.org/resource/Kevin_Smith"). +-test("http://dbpedia.org/resource/Jason_Mewes"). +-test("http://dbpedia.org/resource/Jim_Carrey"). +-test("http://dbpedia.org/resource/Trey_Parker"). +-test("http://dbpedia.org/resource/Adam_Sandler"). + +*/ \ No newline at end of file Added: trunk/examples/father.conf =================================================================== --- trunk/examples/father.conf (rev 0) +++ trunk/examples/father.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,62 @@ +/** + * Father Example + * + * possible solution: male AND EXISTS hasChild.TOP + */ + +/** settings **/ +// reasoner settings +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +useRetrievalForClassification = true; +refinement.useDIGMultiInstanceChecks = twoChecks; + +// algorithm settings +algorithm = refinement; +refinement.horizontalExpansionFactor = 0.5; +refinement.quiet = false; + +// search tree protocol +refinement.writeSearchTree = false; +refinement.searchTreeFile = "searchTree.txt"; + +// control output +showIndividuals = true; +showConcepts = true; +showRoles = true; +showInternalKB = true; +showSubsumptionHierarchy = true; + +refinement.ignoredConcepts = { father }; + +/** background knowledge ***/ +BOTTOM = (male AND female). + +father = (male AND EXISTS hasChild.TOP). + +writeDIGProtocol = true; +digProtocolFile = "types_test.txt"; + +// persons +male(markus). +male(stefan). +male(heinz). +male(bernd). +female(anna). +female(gabi). +female(michelle). + +// children +hasChild(stefan,markus). +hasChild(markus,anna). +hasChild(bernd,gabi). +hasChild(anna,heinz). + +/** examples **/ ++father(stefan). ++father(markus). ++father(bernd). +-father(heinz). +-father(anna). +-father(gabi). +-father(michelle). Property changes on: trunk/examples/father.conf ___________________________________________________________________ Name: svn:executable + * Added: trunk/examples/father.owl =================================================================== --- trunk/examples/father.owl (rev 0) +++ trunk/examples/father.owl 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<rdf:RDF + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xsd="http://www.w3.org/2001/XMLSchema#" + xmlns="http://example.com/father#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xml:base="http://example.com/father"> + <owl:Ontology rdf:about=""/> + <owl:Class rdf:ID="female"/> + <owl:Class rdf:ID="male"> + <owl:equivalentClass> + <owl:Class> + <owl:complementOf rdf:resource="#female"/> + </owl:Class> + </owl:equivalentClass> + </owl:Class> + <owl:ObjectProperty rdf:ID="hasChild"/> + <male rdf:ID="markus"> + <hasChild> + <female rdf:ID="anna"> + <hasChild> + <male rdf:ID="heinz"/> + </hasChild> + </female> + </hasChild> + </male> + <male rdf:ID="stefan"> + <hasChild rdf:resource="#markus"/> + </male> + <female rdf:ID="michelle"/> + <male rdf:ID="martin"> + <hasChild rdf:resource="#heinz"/> + </male> +</rdf:RDF> Added: trunk/examples/father2.conf =================================================================== --- trunk/examples/father2.conf (rev 0) +++ trunk/examples/father2.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,23 @@ +/** + * Another Father Example (this time using OWL import) + * + */ + +reasoner = dig; +digReasonerURL = "http://localhost:8081"; +import("father.owl"); + +// do not display http://example.com/father# in concepts +// and roles to make the output more readable +hidePrefix = "http://example.com/father#"; + +writeDIGProtocol = true; +digProtocolFile = "owlapi_dig.txt"; + +/** examples **/ ++father("http://example.com/father#stefan"). ++father("http://example.com/father#markus"). ++father("http://example.com/father#martin"). +-father("http://example.com/father#heinz"). +-father("http://example.com/father#anna"). +-father("http://example.com/father#michelle"). Added: trunk/examples/forte/forte.conf =================================================================== --- trunk/examples/forte/forte.conf (rev 0) +++ trunk/examples/forte/forte.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,507 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + */ + +// control output +// showIndividuals = true; +showConcepts = true; +showRoles = true; +// showInternalKB = true; +// showSubsumptionHierarchy = true; + + +algorithm = hybridGP; +gp.algorithmType = generational; +gp.numberOfIndividuals = 100; +// gp.selectionType = tournament; + + +// algorithm = gp; +// gp.refinementPercent = 70; +// gp.crossoverPercent = 25; + +reasoner = dig; + +// Subrole(sister,sibling). +// Subrole(brother,sibling). + +BOTTOM = (male AND female). + +Symmetric(sibling). +Symmetric(married). +Functional(married). + +male(alfred). +female(alice). +female(angela). +female(ann). +male(art). +female(beatrice). +male(bob). +female(callie). +male(calvin). +male(carl). +male(carlos). +female(christy). +female(cornelia). +male(david). +female(deanna). +female(elisa). +male(eric). +female(f12). +female(f14). +female(f19). +female(f2). +female(f20). +female(f21). +female(f22). +female(f23). +female(f25). +female(f26). +female(f28). +female(f8). +female(fannie). +male(fred). +male(frederick). +female(gail). +male(george). +male(harry). +female(helen). +male(jack). +male(james). +female(jane). +female(janet). +male(jonas). +female(kari). +male(karl). +male(leon). +female(lorrie). +male(m1). +male(m10). +male(m11). +male(m13). +male(m15). +male(m16). +male(m17). +male(m18). +male(m24). +male(m27). +male(m29). +male(m3). +male(m4). +male(m5). +male(m6). +male(m7). +male(m9). +female(maria). +male(mark). +female(martha). +male(melvin). +female(nancy). +male(neil). +male(nero). +female(nonnie). +female(oma). +male(owen). +male(paul). +female(paula). +male(peter). +female(prissie). +female(rachel). +male(ray). +female(regina). +male(steve). +female(susan). +female(terri). +male(terry). +male(umo). +male(walt). +female(wendy). + +sibling(angela,ray). +sibling(art,umo). +sibling(art,wendy). +sibling(calvin,christy). +sibling(calvin,jack). +sibling(christy,calvin). +sibling(christy,jack). +sibling(cornelia,melvin). +sibling(cornelia,nancy). +sibling(david,elisa). +sibling(elisa,david). +sibling(eric,fannie). +sibling(eric,gail). +sibling(eric,harry). +sibling(f12,m11). +sibling(f14,m13). +sibling(f14,m15). +sibling(f19,f20). +sibling(f19,m18). +sibling(f2,m1). +sibling(f20,f19). +sibling(f20,m18). +sibling(f21,f22). +sibling(f22,f21). +sibling(f23,f25). +sibling(f23,m24). +sibling(f25,f23). +sibling(f25,m24). +sibling(f26,f28). +sibling(f26,m27). +sibling(f28,f26). +sibling(f28,m27). +sibling(f8,m10). +sibling(f8,m9). +sibling(fannie,eric). +sibling(fannie,gail). +sibling(fannie,harry). +sibling(frederick,jane). +sibling(frederick,prissie). +sibling(gail,eric). +sibling(gail,fannie). +sibling(gail,harry). +sibling(harry,eric). +sibling(harry,fannie). +sibling(harry,gail). +sibling(jack,calvin). +sibling(jack,christy). +sibling(jane,frederick). +sibling(jane,prissie). +sibling(janet,nero). +sibling(jonas,terry). +sibling(karl,lorrie). +sibling(karl,mark). +sibling(lorrie,karl). +sibling(lorrie,mark). +sibling(m1,f2). +sibling(m10,f8). +sibling(m10,m9). +sibling(m11,f12). +sibling(m13,f14). +sibling(m13,m15). +sibling(m15,f14). +sibling(m15,m13). +sibling(m16,m17). +sibling(m17,m16). +sibling(m18,f19). +sibling(m18,f20). +sibling(m24,f23). +sibling(m24,f25). +sibling(m27,f26). +sibling(m27,f28). +sibling(m4,m5). +sibling(m4,m6). +sibling(m4,m7). +sibling(m5,m4). +sibling(m5,m6). +sibling(m5,m7). +sibling(m6,m4). +sibling(m6,m5). +sibling(m6,m7). +sibling(m7,m4). +sibling(m7,m5). +sibling(m7,m6). +sibling(m9,f8). +sibling(m9,m10). +sibling(mark,karl). +sibling(mark,lorrie). +sibling(melvin,cornelia). +sibling(melvin,nancy). +sibling(nancy,cornelia). +sibling(nancy,melvin). +sibling(nero,janet). +sibling(oma,paul). +sibling(oma,rachel). +sibling(paul,oma). +sibling(paul,rachel). +sibling(prissie,frederick). +sibling(prissie,jane). +sibling(rachel,oma). +sibling(rachel,paul). +sibling(ray,angela). +sibling(terry,jonas). +sibling(umo,art). +sibling(umo,wendy). +sibling(wendy,art). +sibling(wendy,umo). + +parent(ann, david). +parent(ann, elisa). +parent(beatrice, eric). +parent(beatrice, fannie). +parent(beatrice, gail). +parent(beatrice, harry). +parent(callie, karl). +parent(callie, lorrie). +parent(callie, mark). +parent(kari, janet). +parent(kari, nero). +parent(lorrie, oma). +parent(lorrie, paul). +parent(lorrie, rachel). +parent(martha, susan). +parent(deanna, jonas). parent(deanna, terry). parent(elisa, umo). +parent(elisa, wendy). parent(elisa, art). parent(fannie, cornelia). +parent(fannie, melvin). parent(fannie, nancy). parent(helen, prissie). +parent(helen, jane). parent(janet, jack). parent(janet, calvin). +parent(janet, christy). parent(nonnie, angela). parent(nonnie, ray). +parent(terri, f8). parent(terri, m9). parent(terri, m10). +parent(wendy, m11). parent(wendy, f12). parent(alice, m13). +parent(alice, f14). parent(alice, m15). parent(maria, m16). +parent(maria, m17). parent(nancy, m18). parent(nancy, f19). +parent(nancy, f20). parent(prissie, f21). parent(prissie, f22). +parent(jane, f23). parent(jane, m24). parent(jane, f25). +parent(christy, f26). parent(christy, m27). parent(christy, f28). +parent(regina, m29). parent(oma, m1). parent(oma, f2). +parent(paula, m3). parent(susan, m4). parent(susan, m5). +parent(susan, m6). parent(susan, m7). parent(helen, frederick). + +parent(alfred, david). parent(alfred, elisa). parent(bob, eric). +parent(bob, fannie). parent(bob, gail). parent(bob, harry). +parent(carl, karl). parent(carl, lorrie). parent(carl, mark). +parent(karl, janet). parent(karl, nero). parent(leon, oma). +parent(leon, paul). parent(leon, rachel). parent(mark, susan). +parent(david, jonas). parent(david, terry). parent(eric, umo). +parent(eric, wendy). parent(eric, art). parent(fred, cornelia). +parent(fred, melvin). parent(fred, nancy). parent(harry, prissie). +parent(harry, jane). parent(james, jack). parent(james, calvin). +parent(james, christy). parent(nero, angela). parent(nero, ray). +parent(terry, f8). parent(terry, m9). parent(terry, m10). +parent(walt, m11). parent(walt, f12). parent(art, m13). +parent(art, f14). parent(art, m15). parent(melvin, m16). +parent(melvin, m17). parent(neil, m18). parent(neil, f19). +parent(neil, f20). parent(peter, f21). parent(peter, f22). +parent(jack, f23). parent(jack, m24). parent(jack, f25). +parent(carlos, f26). parent(carlos, m27). parent(carlos, f28). +parent(ray, m29). parent(owen, m1). parent(owen, f2). +parent(paul, m3). parent(steve, m4). parent(steve, m5). +parent(steve, m6). parent(steve, m7). parent(harry, frederick). + + married(ann, alfred). married(beatrice, bob). married(callie, carl). + married(deanna, david). married(elisa, eric). married(fannie, fred). + married(gail, george). married(helen, harry). married(janet, james). + married(kari, karl). married(lorrie, leon). married(martha, mark). + married(nonnie, nero). married(oma, owen). married(paula, paul). + married(susan, steve). married(terri, terry). married(wendy, walt). + married(alice, art). married(maria, melvin). married(nancy, neil). + married(prissie, peter). married(jane, jack). married(christy, carlos). + married(regina, ray). + +/* small example set ++isUncle(art). ++isUncle(calvin). ++isUncle(carlos). ++isUncle(david). ++isUncle(eric). ++isUncle(fred). ++isUncle(frederick). ++isUncle(george). + +-isUncle(alfred). +-isUncle(alice). +-isUncle(angela). +-isUncle(bob). +-isUncle(carl). +-isUncle(christy). +-isUncle(karl). +*/ + +// complete example set ++isUncle(art). ++isUncle(calvin). ++isUncle(carlos). ++isUncle(david). ++isUncle(eric). ++isUncle(fred). ++isUncle(frederick). ++isUncle(george). ++isUncle(harry). ++isUncle(jack). ++isUncle(james). ++isUncle(jonas). ++isUncle(karl). ++isUncle(leon). ++isUncle(mark). ++isUncle(melvin). ++isUncle(neil). ++isUncle(nero). ++isUncle(owen). ++isUncle(paul). ++isUncle(peter). ++isUncle(umo). ++isUncle(walt). + +-isUncle(alfred). +-isUncle(alice). +-isUncle(angela). +-isUncle(ann). +-isUncle(beatrice). +-isUncle(bob). +-isUncle(callie). +-isUncle(carl). +-isUncle(christy). +-isUncle(cornelia). +-isUncle(deanna). +-isUncle(elisa). +-isUncle(f12). +-isUncle(f14). +-isUncle(f19). +-isUncle(f2). +-isUncle(f20). +-isUncle(f21). +-isUncle(f22). +-isUncle(f23). +-isUncle(f25). +-isUncle(f26). +-isUncle(f28). +-isUncle(f8). +-isUncle(fannie). +-isUncle(gail). +-isUncle(helen). +-isUncle(jane). +-isUncle(janet). +-isUncle(kari). +-isUncle(lorrie). +-isUncle(m1). +-isUncle(m10). +-isUncle(m11). +-isUncle(m13). +-isUncle(m15). +-isUncle(m16). +-isUncle(m17). +-isUncle(m18). +-isUncle(m24). +-isUncle(m27). +-isUncle(m29). +-isUncle(m3). +-isUncle(m4). +-isUncle(m5). +-isUncle(m6). +-isUncle(m7). +-isUncle(m9). +-isUncle(maria). +-isUncle(martha). +-isUncle(nancy). +-isUncle(nonnie). +-isUncle(oma). +-isUncle(paula). +-isUncle(prissie). +-isUncle(rachel). +-isUncle(ray). +-isUncle(regina). +-isUncle(steve). +-isUncle(susan). +-isUncle(terri). +-isUncle(terry). +-isUncle(wendy). + + + +// temporär: +/* +married(art,alice). +married(david,deanna). +married(harry,helen). +married(melvin,maria). +married(ray,regina). +married(terry,terri). +*/ + +/* Here's the family shown graphically: + + Steve |--- m7 + Martha | | |--- m6 + | |------ Susan |--- m5 + /-- Mark | |--- m4 + / + / /-- Rachel + / / + / / + Callie | | + | |----- Lorrie | + Carl | | |------- Paul | + \ Leon | | |--- m3 + | | Paula | + | \ + | \ + | \----- Oma |--- f2 + | | | + | Owen |--- m1 + | + | /----- Ray | + | / | |--- m29 + | / Regina | + | Nonnie | + | | | + | /---- Nero |----- Angela + | / + | / + \---- Karl | Carlos |--- f28 + | | | |--- m27 + Kari | /- Christy |--- f26 + \ / + \ / + \--- Janet | + | |----- Calvin + James | + \ + \ + \---- Jack |--- f25 + | |--- m24 + /---- Jane |--- f23 + / + / + Helen | + | |-- Frederick + /-- Harry | + / \ + | \ + | \- Prissie |--- f22 + | | | + | Peter |--- f21 + | + | George + | | + / /-- Gail + | / Neil |--- f20 + Bob |-/ | |--- f19 + | | /--- Nancy |--- m18 + Beatrice |-\ / + | \ / + \ \- Fannie | + | | |-- Cornelia + | Fred | + | \ + | \ + | \-- Melvin |--- m17 + | | | + | Maria |--- m16 + | + | Alice |--- m15 + | | |--- f14 + | /----- Art |--- m13 + | / + \ / + \--- Eric | + | |------- Umo + /-- Elisa | + / \ + / \ + Ann | \--- Wendy |--- f12 + | | | | + Alfred | Walt |--- m11 + \ + \ + \-- David | ----- Jonas + | | + Deanna | + \ + \ + \--- Terry |--- m10 + | |--- m9 + Terri |--- f8 +*/ \ No newline at end of file Added: trunk/examples/forte/forte.owl =================================================================== --- trunk/examples/forte/forte.owl (rev 0) +++ trunk/examples/forte/forte.owl 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,547 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE rdf:RDF [ + <!ENTITY owl 'http://www.w3.org/2002/07/owl#'> +]> + +<rdf:RDF + xml:base="http://localhost/foo" + xmlns:a="http://localhost/foo#" + xmlns:owl="http://www.w3.org/2002/07/owl#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> + +<owl:Ontology rdf:about=""/> + +<owl:Class rdf:about="&owl;Nothing"> + <owl:equivalentClass> + <owl:Class> + <owl:intersectionOf rdf:parseType="Collection"> + <owl:Class rdf:about="#male"/> + <owl:Class rdf:about="#female"/> + </owl:intersectionOf> + </owl:Class> + </owl:equivalentClass> +</owl:Class> + +<owl:ObjectProperty rdf:ID="married"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> + <rdf:type rdf:resource="&owl;FunctionalProperty"/> +</owl:ObjectProperty> + +<owl:ObjectProperty rdf:ID="sibling"> + <rdf:type rdf:resource="&owl;SymmetricProperty"/> +</owl:ObjectProperty> + +<a:male rdf:ID="alfred"> + <a:parent rdf:resource="#david"/> + <a:parent rdf:resource="#elisa"/> +</a:male> + +<a:female rdf:ID="alice"> + <a:married rdf:resource="#art"/> + <a:parent rdf:resource="#f14"/> + <a:parent rdf:resource="#m13"/> + <a:parent rdf:resource="#m15"/> +</a:female> + +<a:female rdf:ID="angela"> + <a:sibling rdf:resource="#ray"/> +</a:female> + +<a:female rdf:ID="ann"> + <a:married rdf:resource="#alfred"/> + <a:parent rdf:resource="#david"/> + <a:parent rdf:resource="#elisa"/> +</a:female> + +<a:male rdf:ID="art"> + <a:parent rdf:resource="#f14"/> + <a:parent rdf:resource="#m13"/> + <a:parent rdf:resource="#m15"/> + <a:sibling rdf:resource="#umo"/> + <a:sibling rdf:resource="#wendy"/> +</a:male> + +<a:female rdf:ID="beatrice"> + <a:married rdf:resource="#bob"/> + <a:parent rdf:resource="#eric"/> + <a:parent rdf:resource="#fannie"/> + <a:parent rdf:resource="#gail"/> + <a:parent rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="bob"> + <a:parent rdf:resource="#eric"/> + <a:parent rdf:resource="#fannie"/> + <a:parent rdf:resource="#gail"/> + <a:parent rdf:resource="#harry"/> +</a:male> + +<a:female rdf:ID="callie"> + <a:married rdf:resource="#carl"/> + <a:parent rdf:resource="#karl"/> + <a:parent rdf:resource="#lorrie"/> + <a:parent rdf:resource="#mark"/> +</a:female> + +<a:male rdf:ID="calvin"> + <a:sibling rdf:resource="#christy"/> + <a:sibling rdf:resource="#jack"/> +</a:male> + +<a:male rdf:ID="carl"> + <a:parent rdf:resource="#karl"/> + <a:parent rdf:resource="#lorrie"/> + <a:parent rdf:resource="#mark"/> +</a:male> + +<a:male rdf:ID="carlos"> + <a:parent rdf:resource="#f26"/> + <a:parent rdf:resource="#f28"/> + <a:parent rdf:resource="#m27"/> +</a:male> + +<a:female rdf:ID="christy"> + <a:married rdf:resource="#carlos"/> + <a:parent rdf:resource="#f26"/> + <a:parent rdf:resource="#f28"/> + <a:parent rdf:resource="#m27"/> + <a:sibling rdf:resource="#calvin"/> + <a:sibling rdf:resource="#jack"/> +</a:female> + +<a:female rdf:ID="cornelia"> + <a:sibling rdf:resource="#melvin"/> + <a:sibling rdf:resource="#nancy"/> +</a:female> + +<a:male rdf:ID="david"> + <a:parent rdf:resource="#jonas"/> + <a:parent rdf:resource="#terry"/> + <a:sibling rdf:resource="#elisa"/> +</a:male> + +<a:female rdf:ID="deanna"> + <a:married rdf:resource="#david"/> + <a:parent rdf:resource="#jonas"/> + <a:parent rdf:resource="#terry"/> +</a:female> + +<a:female rdf:ID="elisa"> + <a:married rdf:resource="#eric"/> + <a:parent rdf:resource="#art"/> + <a:parent rdf:resource="#umo"/> + <a:parent rdf:resource="#wendy"/> + <a:sibling rdf:resource="#david"/> +</a:female> + +<a:male rdf:ID="eric"> + <a:parent rdf:resource="#art"/> + <a:parent rdf:resource="#umo"/> + <a:parent rdf:resource="#wendy"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#gail"/> + <a:sibling rdf:resource="#harry"/> +</a:male> + +<a:female rdf:ID="f12"> + <a:sibling rdf:resource="#m11"/> +</a:female> + +<a:female rdf:ID="f14"> + <a:sibling rdf:resource="#m13"/> + <a:sibling rdf:resource="#m15"/> +</a:female> + +<a:female rdf:ID="f19"> + <a:sibling rdf:resource="#f20"/> + <a:sibling rdf:resource="#m18"/> +</a:female> + +<a:female rdf:ID="f2"> + <a:sibling rdf:resource="#m1"/> +</a:female> + +<a:female rdf:ID="f20"> + <a:sibling rdf:resource="#f19"/> + <a:sibling rdf:resource="#m18"/> +</a:female> + +<a:female rdf:ID="f21"> + <a:sibling rdf:resource="#f22"/> +</a:female> + +<a:female rdf:ID="f22"> + <a:sibling rdf:resource="#f21"/> +</a:female> + +<a:female rdf:ID="f23"> + <a:sibling rdf:resource="#f25"/> + <a:sibling rdf:resource="#m24"/> +</a:female> + +<a:female rdf:ID="f25"> + <a:sibling rdf:resource="#f23"/> + <a:sibling rdf:resource="#m24"/> +</a:female> + +<a:female rdf:ID="f26"> + <a:sibling rdf:resource="#f28"/> + <a:sibling rdf:resource="#m27"/> +</a:female> + +<a:female rdf:ID="f28"> + <a:sibling rdf:resource="#f26"/> + <a:sibling rdf:resource="#m27"/> +</a:female> + +<a:female rdf:ID="f8"> + <a:sibling rdf:resource="#m10"/> + <a:sibling rdf:resource="#m9"/> +</a:female> + +<a:female rdf:ID="fannie"> + <a:married rdf:resource="#fred"/> + <a:parent rdf:resource="#cornelia"/> + <a:parent rdf:resource="#melvin"/> + <a:parent rdf:resource="#nancy"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#gail"/> + <a:sibling rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="fred"> + <a:parent rdf:resource="#cornelia"/> + <a:parent rdf:resource="#melvin"/> + <a:parent rdf:resource="#nancy"/> +</a:male> + +<a:male rdf:ID="frederick"> + <a:sibling rdf:resource="#jane"/> + <a:sibling rdf:resource="#prissie"/> +</a:male> + +<a:female rdf:ID="gail"> + <a:married rdf:resource="#george"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#harry"/> +</a:female> + +<a:male rdf:ID="george"/> + +<a:male rdf:ID="harry"> + <a:parent rdf:resource="#frederick"/> + <a:parent rdf:resource="#jane"/> + <a:parent rdf:resource="#prissie"/> + <a:sibling rdf:resource="#eric"/> + <a:sibling rdf:resource="#fannie"/> + <a:sibling rdf:resource="#gail"/> +</a:male> + +<a:female rdf:ID="helen"> + <a:married rdf:resource="#harry"/> + <a:parent rdf:resource="#frederick"/> + <a:parent rdf:resource="#jane"/> + <a:parent rdf:resource="#prissie"/> +</a:female> + +<a:male rdf:ID="jack"> + <a:parent rdf:resource="#f23"/> + <a:parent rdf:resource="#f25"/> + <a:parent rdf:resource="#m24"/> + <a:sibling rdf:resource="#calvin"/> + <a:sibling rdf:resource="#christy"/> +</a:male> + +<a:male rdf:ID="james"> + <a:parent rdf:resource="#calvin"/> + <a:parent rdf:resource="#christy"/> + <a:parent rdf:resource="#jack"/> +</a:male> + +<a:female rdf:ID="jane"> + <a:married rdf:resource="#jack"/> + <a:parent rdf:resource="#f23"/> + <a:parent rdf:resource="#f25"/> + <a:parent rdf:resource="#m24"/> + <a:sibling rdf:resource="#frederick"/> + <a:sibling rdf:resource="#prissie"/> +</a:female> + +<a:female rdf:ID="janet"> + <a:married rdf:resource="#james"/> + <a:parent rdf:resource="#calvin"/> + <a:parent rdf:resource="#christy"/> + <a:parent rdf:resource="#jack"/> + <a:sibling rdf:resource="#nero"/> +</a:female> + +<a:male rdf:ID="jonas"> + <a:sibling rdf:resource="#terry"/> +</a:male> + +<a:female rdf:ID="kari"> + <a:married rdf:resource="#karl"/> + <a:parent rdf:resource="#janet"/> + <a:parent rdf:resource="#nero"/> +</a:female> + +<a:male rdf:ID="karl"> + <a:parent rdf:resource="#janet"/> + <a:parent rdf:resource="#nero"/> + <a:sibling rdf:resource="#lorrie"/> + <a:sibling rdf:resource="#mark"/> +</a:male> + +<a:male rdf:ID="leon"> + <a:parent rdf:resource="#oma"/> + <a:parent rdf:resource="#paul"/> + <a:parent rdf:resource="#rachel"/> +</a:male> + +<a:female rdf:ID="lorrie"> + <a:married rdf:resource="#leon"/> + <a:parent rdf:resource="#oma"/> + <a:parent rdf:resource="#paul"/> + <a:parent rdf:resource="#rachel"/> + <a:sibling rdf:resource="#karl"/> + <a:sibling rdf:resource="#mark"/> +</a:female> + +<a:male rdf:ID="m1"> + <a:sibling rdf:resource="#f2"/> +</a:male> + +<a:male rdf:ID="m10"> + <a:sibling rdf:resource="#f8"/> + <a:sibling rdf:resource="#m9"/> +</a:male> + +<a:male rdf:ID="m11"> + <a:sibling rdf:resource="#f12"/> +</a:male> + +<a:male rdf:ID="m13"> + <a:sibling rdf:resource="#f14"/> + <a:sibling rdf:resource="#m15"/> +</a:male> + +<a:male rdf:ID="m15"> + <a:sibling rdf:resource="#f14"/> + <a:sibling rdf:resource="#m13"/> +</a:male> + +<a:male rdf:ID="m16"> + <a:sibling rdf:resource="#m17"/> +</a:male> + +<a:male rdf:ID="m17"> + <a:sibling rdf:resource="#m16"/> +</a:male> + +<a:male rdf:ID="m18"> + <a:sibling rdf:resource="#f19"/> + <a:sibling rdf:resource="#f20"/> +</a:male> + +<a:male rdf:ID="m24"> + <a:sibling rdf:resource="#f23"/> + <a:sibling rdf:resource="#f25"/> +</a:male> + +<a:male rdf:ID="m27"> + <a:sibling rdf:resource="#f26"/> + <a:sibling rdf:resource="#f28"/> +</a:male> + +<a:male rdf:ID="m29"/> + +<a:male rdf:ID="m3"/> + +<a:male rdf:ID="m4"> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m6"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m5"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m6"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m6"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m7"/> +</a:male> + +<a:male rdf:ID="m7"> + <a:sibling rdf:resource="#m4"/> + <a:sibling rdf:resource="#m5"/> + <a:sibling rdf:resource="#m6"/> +</a:male> + +<a:male rdf:ID="m9"> + <a:sibling rdf:resource="#f8"/> + <a:sibling rdf:resource="#m10"/> +</a:male> + +<a:female rdf:ID="maria"> + <a:married rdf:resource="#melvin"/> + <a:parent rdf:resource="#m16"/> + <a:parent rdf:resource="#m17"/> +</a:female> + +<a:male rdf:ID="mark"> + <a:parent rdf:resource="#susan"/> + <a:sibling rdf:resource="#karl"/> + <a:sibling rdf:resource="#lorrie"/> +</a:male> + +<a:female rdf:ID="martha"> + <a:married rdf:resource="#mark"/> + <a:parent rdf:resource="#susan"/> +</a:female> + +<a:male rdf:ID="melvin"> + <a:parent rdf:resource="#m16"/> + <a:parent rdf:resource="#m17"/> + <a:sibling rdf:resource="#cornelia"/> + <a:sibling rdf:resource="#nancy"/> +</a:male> + +<a:female rdf:ID="nancy"> + <a:married rdf:resource="#neil"/> + <a:parent rdf:resource="#f19"/> + <a:parent rdf:resource="#f20"/> + <a:parent rdf:resource="#m18"/> + <a:sibling rdf:resource="#cornelia"/> + <a:sibling rdf:resource="#melvin"/> +</a:female> + +<a:male rdf:ID="neil"> + <a:parent rdf:resource="#f19"/> + <a:parent rdf:resource="#f20"/> + <a:parent rdf:resource="#m18"/> +</a:male> + +<a:male rdf:ID="nero"> + <a:parent rdf:resource="#angela"/> + <a:parent rdf:resource="#ray"/> + <a:sibling rdf:resource="#janet"/> +</a:male> + +<a:female rdf:ID="nonnie"> + <a:married rdf:resource="#nero"/> + <a:parent rdf:resource="#angela"/> + <a:parent rdf:resource="#ray"/> +</a:female> + +<a:female rdf:ID="oma"> + <a:married rdf:resource="#owen"/> + <a:parent rdf:resource="#f2"/> + <a:parent rdf:resource="#m1"/> + <a:sibling rdf:resource="#paul"/> + <a:sibling rdf:resource="#rachel"/> +</a:female> + +<a:male rdf:ID="owen"> + <a:parent rdf:resource="#f2"/> + <a:parent rdf:resource="#m1"/> +</a:male> + +<a:male rdf:ID="paul"> + <a:parent rdf:resource="#m3"/> + <a:sibling rdf:resource="#oma"/> + <a:sibling rdf:resource="#rachel"/> +</a:male> + +<a:female rdf:ID="paula"> + <a:married rdf:resource="#paul"/> + <a:parent rdf:resource="#m3"/> +</a:female> + +<a:male rdf:ID="peter"> + <a:parent rdf:resource="#f21"/> + <a:parent rdf:resource="#f22"/> +</a:male> + +<a:female rdf:ID="prissie"> + <a:married rdf:resource="#peter"/> + <a:parent rdf:resource="#f21"/> + <a:parent rdf:resource="#f22"/> + <a:sibling rdf:resource="#frederick"/> + <a:sibling rdf:resource="#jane"/> +</a:female> + +<a:female rdf:ID="rachel"> + <a:sibling rdf:resource="#oma"/> + <a:sibling rdf:resource="#paul"/> +</a:female> + +<a:male rdf:ID="ray"> + <a:parent rdf:resource="#m29"/> + <a:sibling rdf:resource="#angela"/> +</a:male> + +<a:female rdf:ID="regina"> + <a:married rdf:resource="#ray"/> + <a:parent rdf:resource="#m29"/> +</a:female> + +<a:male rdf:ID="steve"> + <a:parent rdf:resource="#m4"/> + <a:parent rdf:resource="#m5"/> + <a:parent rdf:resource="#m6"/> + <a:parent rdf:resource="#m7"/> +</a:male> + +<a:female rdf:ID="susan"> + <a:married rdf:resource="#steve"/> + <a:parent rdf:resource="#m4"/> + <a:parent rdf:resource="#m5"/> + <a:parent rdf:resource="#m6"/> + <a:parent rdf:resource="#m7"/> +</a:female> + +<a:female rdf:ID="terri"> + <a:married rdf:resource="#terry"/> + <a:parent rdf:resource="#f8"/> + <a:parent rdf:resource="#m10"/> + <a:parent rdf:resource="#m9"/> +</a:female> + +<a:male rdf:ID="terry"> + <a:parent rdf:resource="#f8"/> + <a:parent rdf:resource="#m10"/> + <a:parent rdf:resource="#m9"/> + <a:sibling rdf:resource="#jonas"/> +</a:male> + +<a:male rdf:ID="umo"> + <a:sibling rdf:resource="#art"/> + <a:sibling rdf:resource="#wendy"/> +</a:male> + +<a:male rdf:ID="walt"> + <a:parent rdf:resource="#f12"/> + <a:parent rdf:resource="#m11"/> +</a:male> + +<a:female rdf:ID="wendy"> + <a:married rdf:resource="#walt"/> + <a:parent rdf:resource="#f12"/> + <a:parent rdf:resource="#m11"/> + <a:sibling rdf:resource="#art"/> + <a:sibling rdf:resource="#umo"/> +</a:female> + +<owl:Class rdf:ID="female"/> + +<owl:Class rdf:ID="male"/> + +<owl:ObjectProperty rdf:ID="parent"/> + +</rdf:RDF> Added: trunk/examples/forte/forte_uncle.conf =================================================================== --- trunk/examples/forte/forte_uncle.conf (rev 0) +++ trunk/examples/forte/forte_uncle.conf 2007-08-20 13:28:55 UTC (rev 4) @@ -0,0 +1,495 @@ +/** + * Extracted from the FORTE (First Order Revision of Theories from Examples) + * data set + * + * http://www.cs.utexas.edu/users/ml/forte.html + * + * possible solution: (male AND (EXISTS hasSibling.EXISTS hasChild.TOP + * OR EXISTS married.EXISTS hasSibling.EXISTS hasChild.TOP)) + */ + +// control output +// showIndividuals = true; +showConcepts = true; +showRoles = true; +// showInternalKB = true; +// showSubsumptionHierarchy = true; + +algorithm = refinement; + +BOTTOM = (male AND female). + +Symmetric(sibling). +Symmetric(married). +Functional(married). + +male(alfred). +female(alice). +female(angela). +female(ann). +male(art). +female(beatrice). +male(bob). +female(callie). +male(calvin). +male(carl). +male(carlos). +female(christy). +female(cornelia). +male(david). +female(deanna). +female(elisa). +male(eric). +female(f12). +female(f14). +female(f19). +female(f2). +female(f20). +female(f21). +female(f22). +female(f23). +female(f25). +female(f26). +female(f28). +female(f8). +female(fannie). +male(fred). +male(frederick). +female(gail). +male(george). +male(harry). +female(helen). +male(jack). +male(james). +female(jane). +female(janet). +male(jonas). +female(kari). +male(karl). +male(leon). +female(lorrie). +male(m1). +male(m10). +male(m11). +male(m13). +male(m15). +male(m16). +male(m17). +male(m18). +male(m24). +male(m27). +male(m29). +male(m3). +male(m4). +male(m5). +male(m6). +male(m7). +male(m9). +female(maria). +male(mark). +female(martha). +male(melvin). +female(nancy). +male(neil). +male(nero). +female(nonnie). +female(oma). +male(owen). +male(paul). +female(paula). +male(peter). +female(prissie). +female(rachel). +male(ray). +female(regina). +male(steve). +female(susan). +female(terri). +male(terry). +male(umo). +male(walt). +female(wendy). + +sibling(angela,ray). +sibling(art,umo). +sibling(art,wendy). +sibling(calvin,christy). +sibling(calvin,jack). +sibling(christy,calvin). +sibling(christy,jack). +sibling(cornelia,melvin). +sibling(cornelia,nancy). +sibling(david,elisa). +sibling(elisa,david). +sibling(eric,fannie). +sibling(eric,gail). +sibling(eric,harry). +sibling(f12,m11). +sibling(f14,m13). +sibling(f14,m15). +sibling(f19,f20). +sibling(f19,m18). +sibling(f2,m1). +sibling(f20,f19). +sibling(f20,m18). +sibling(f21,f22). +sibling(f22,f21). +sibling(f23,f25). +sibling(f23,m24). +sibling(f25,f23). +sibling(f25,m24). +sibling(f26,f28). +sibling(f26,m27). +sibling(f28,f26). +sibling(f28,m27). +sibling(f8,m10). +sibling(f8,m9). +sibling(fannie,eric). +sibling(fannie,gail). +sibling(fannie,harry). +sibling(frederick,jane). +sibling(frederick,prissie). +sibling(gail,eric). +sibling(gail,fannie). +sibling(gail,harry). +sibling(harry,eric). +sibling(harry,fannie). +sibling(harry,gail). +sibling(jack,calvin). +sibling(jack,christy). +sibling(jane,frederick). +sibling(jane,prissie). +sibling(janet,nero). +sibling(jonas,terry). +sibling(karl,lorrie). +sibling(karl,mark). +sibling(lorrie,karl). +sibling(lorrie,mark). +sibling(m1,f2). +sibling(m10,f8). +sibling(m10,m9). +sibling(m11,f12). +sibling(m13,f14). +sibling(m13,m15). +sibling(m15,f14). +sibling(m15,m13). +sibling(m16,m17). +sibling(m17,m16). +sibling(m18,f19). +sibling(m18,f20). +sibling(m24,f23). +sibling(m24,f25). +sibling(m27,f26). +sibling(m27,f28). +sibling(m4,m5). +sibling(m4,m6). +sibling(m4,m7). +sibling(m5,m4). +sibling(m5,m6). +sibling(m5,m7). +sibling(m6,m4). +sibling(m6,m5). +sibling(m6,m7). +sibling(m7,m4). +sibling(m7,m5). +sibling(m7,m6). +sibling(m9,f8). +sibling(m9,m10). +sibling(mark,karl). +sibling(mark,lorrie). +sibling(melvin,cornelia). +sibling(melvin,nancy). +sibling(nancy,cornelia). +sibling(nancy,melvin). +sibling(nero,janet). +sibling(oma,paul). +sibling(oma,rachel). +sibling(paul,oma). +sibling(paul,rachel). +sibling(prissie,frederick). +sibling(prissie,jane). +sibling(rachel,oma). +sibling(rachel,paul). +sibling(ray,angela). +sibling(terry,jonas). +sibling(umo,art). +sibling(umo,wendy). +sibling(wendy,art). +sibling(wendy,umo). + +parent(ann, david). +parent(ann, elisa). +parent(beatrice, eric). +parent(beatrice, fannie). +parent(beatrice, gail). +parent(beatrice, harry). +parent(callie, karl). +parent(callie, lorrie). +parent(callie, mark). +parent(kari, janet). +parent(kari, nero). +parent(lorrie, oma). +parent(lorrie, paul). +parent(lorrie, rachel). +parent(martha, susan). +parent(deanna, jonas). parent(deanna, terry). parent(elisa, umo). +parent(elisa, wendy). parent(elisa, art). parent(fannie, cornelia). +parent(fannie, melvin). parent(fannie, nancy). parent(helen, prissie). +parent(helen, jane). parent(janet, jack). parent(janet, calvin). +parent(janet, christy). parent(nonnie, angela). parent(nonnie, ray). +parent(terri, f8). parent(terri, m9). parent(terri, m10). +parent(wendy, m11). parent(wendy, f12). parent(alice, m13). +parent(alice, f14). parent(alice, m15). parent(maria, m16). +parent(maria, m17). parent(nancy, m18). parent(nancy, f19). +parent(nancy, f20). parent(prissie, f21). parent(prissie, f22). +parent(jane, f23). parent(jane, m24). paren... [truncated message content] |
From: <jen...@us...> - 2007-08-20 13:24:25
|
Revision: 3 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=3&view=rev Author: jenslehmann Date: 2007-08-20 06:24:20 -0700 (Mon, 20 Aug 2007) Log Message: ----------- added libraries Added Paths: ----------- trunk/library/dig1.1-xmlbeans.jar trunk/library/jena/ trunk/library/jena/antlr-2.7.5.jar trunk/library/jena/commons-logging.jar trunk/library/jena/concurrent.jar trunk/library/jena/icu4j_3_4.jar trunk/library/jena/iri.jar trunk/library/jena/jena.jar trunk/library/jena/xercesImpl.jar trunk/library/modules/ trunk/library/modules/sparqlModule.jar trunk/library/modules/sparqlModule.txt trunk/library/owlapi/ trunk/library/owlapi/antlr-runtime-3.0.jar trunk/library/owlapi/commons-lang-2.2.jar trunk/library/owlapi/owlapi-api.jar trunk/library/owlapi/owlapi-apibinding.jar trunk/library/owlapi/owlapi-change.jar trunk/library/owlapi/owlapi-debugging.jar trunk/library/owlapi/owlapi-dig1_1.jar trunk/library/owlapi/owlapi-functionalparser.jar trunk/library/owlapi/owlapi-functionalrenderer.jar trunk/library/owlapi/owlapi-impl.jar trunk/library/owlapi/owlapi-krssparser.jar trunk/library/owlapi/owlapi-mansyntaxparser.jar trunk/library/owlapi/owlapi-mansyntaxrenderer.jar trunk/library/owlapi/owlapi-metrics.jar trunk/library/owlapi/owlapi-oboparser.jar trunk/library/owlapi/owlapi-owlxmlparser.jar trunk/library/owlapi/owlapi-owlxmlrenderer.jar trunk/library/owlapi/owlapi-rdfapi.jar trunk/library/owlapi/owlapi-rdfxmlparser.jar trunk/library/owlapi/owlapi-rdfxmlrenderer.jar trunk/library/owlapi/owlapi-util.jar trunk/library/xbean.jar Added: trunk/library/dig1.1-xmlbeans.jar =================================================================== (Binary files differ) Property changes on: trunk/library/dig1.1-xmlbeans.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/antlr-2.7.5.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/antlr-2.7.5.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/commons-logging.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/commons-logging.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/concurrent.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/concurrent.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/icu4j_3_4.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/icu4j_3_4.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/iri.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/iri.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/jena.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/jena.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/jena/xercesImpl.jar =================================================================== (Binary files differ) Property changes on: trunk/library/jena/xercesImpl.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/modules/sparqlModule.jar =================================================================== (Binary files differ) Property changes on: trunk/library/modules/sparqlModule.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/modules/sparqlModule.txt =================================================================== --- trunk/library/modules/sparqlModule.txt (rev 0) +++ trunk/library/modules/sparqlModule.txt 2007-08-20 13:24:20 UTC (rev 3) @@ -0,0 +1,245 @@ + + +Algorithm: +========= + +Start with: +java dbpedia.SparqlModule ListOfIndividuals + +ListOfIndividuals= Individual | ListOfIndividuals | {} + +The String[] args of the main method is taken as input at the moment. +This will be changed later, it is only for testing. + +Example: +java dbpedia.SparqlModule http://dbpedia.org/resource/Angela_Merkel http://dbpedia.org/resource/Gerhard_Schr%C3%B6der http://dbpedia.org/resource/Helmut_Kohl http://dbpedia.org/resource/Helmut_Schmidt http://dbpedia.org/resource/Ludwig_Erhard http://dbpedia.org/resource/Willy_Brandt + +See bottom for more examples + +*Sparql-Queries*** + +Example Sparql-Query see Options below for more info about FILTERS: + +SELECT * WHERE { +<http://dbpedia.org/resource/Angela_Merkel> ?predicate ?object. +FILTER( +(!isLiteral(?object)) +&&( !regex(str(?predicate), 'http://www.w3.org/2004/02/skos/core#') ) +&&( !regex(str(?predicate), 'http://xmlns.com/foaf/0.1/') ) +&&( !regex(str(?predicate), 'http://dbpedia.org/property/wikipage-') ) +&&( !regex(str(?predicate), 'http://www.w3.org/2002/07/owl#sameAs') ) +&&( !regex(str(?predicate), 'http://dbpedia.org/property/reference') ) +&&( !regex((?object), 'http://xmlns.com/foaf/0.1/') )).} + + +*Typing*** +DBpedia is not typed at all. +I replaced/added the following to comply to OWL-DL: + +Resources are sorted in three categories (Class, Property, Instance) +(implemented as HashSets) according to their uris +Properties are typed as Properties +Classes see below Options +Instances is what is left + +*Output*** +The Ontology is written to a file System.currentMillisec().nt + + + +*Cache*** +the cache remembers: a timestamp, the original sparql-query, the result +key is the subject http://dbpedia.org/resource/Angela_Merkel which is first urlencoded +and so serves as the hash for the filename. +Cache validates if timestamp too old and Sparql-Query the same +before returning the SPARQL xml-result + + + + + +Options: +======== + +All Options cannot be altered right now, except in the source. +This will be later moved to the constructor. +Default is always used. +Some are marked with "NYI", these are Not Yet Implemented and are just ideas I had. + +Main-Algorithm: +--------------- + +*NumberOfRecursion (int)*** + +how deep will the Ontology be cut out + +Default: ??? not sure 2 at the moment + +*ClassRepeat NYI (int)*** + +Recursion can be increased, if the Object is a class. +This will result in deeper, richer hierarchies + + +Server: +------ + +there are no options planned right now hardcoded with: +dbpedia.openlinksw.com:8890 + + +Sparql-queries: +--------------- + +*SparqlFilterPredicate (String[])*** + +removes all rows with the specified String in the PREDICATE from the ResultSet +(integrated in SPARQL query with FILTER !regex) + +Default: +"http://www.w3.org/2004/02/skos/core#" // conflict: no properties between classes allowed +"http://xmlns.com/foaf/0.1/" //foaf is not well defined/unnecessary +"http://dbpedia.org/property/wikipage-" // foreign wikis -fr -es, etc. +"http://www.w3.org/2002/07/owl#sameAs" // contradicts with owl-dl maybe changed later so it will be replaced by owl:equivalentClass for Classes +"http://dbpedia.org/property/reference" //links to homepages + +*SparqlFilterObject (String[])*** +(integrated in SPARQL query with FILTER !regex) + +removes all rows with the specified String in the OBJECT from the ResultSet + +Default: +http://xmlns.com/foaf/0.1/ //foaf is not well defined/unnecessary + +*useLiterals (boolean)*** +(integrated in SPARQL query with FILTER !isLiteral) + +removes all rows with literals as objects from the ResultSet + +Default: false + + + +Type Information: +----------------- + +options that are used to type resources to retain OWL-DL + +*IsClass (String[])*** + +specifies URI's that can be considered classes (and therefore will be typed as classes) + +Default: +"http://dbpedia.org/resource/Category:" //dbpedia categories +"http://www.w3.org/2004/02/skos/core" // concept +"http://dbpedia.org/class/yago" // yago classes +"http://dbpedia.org/class/" // "yago" is missing in some of the Datasets from DBpedia, +I don't actually know if this is a mistake or on purpose + + +Cache: +------ + + +*freshdays (int)*** + +Determines how many days a cached query stays valid + +Default: 15 days + +*path (String)*** + +path of the cache-folder + +Default: cache + + + +Syntactic Sugar NYI +---------------- +Instead of choosing example individuals to put into main, +it could be nice to choose 2 Categories. +The module automatically downloads the individals for both classes itself, +removes the category from the definiton and then runs the DL-Learner. + + + + + +Examples: +========= + +German Leaders: + +Input: +http://dbpedia.org/resource/Adolf_Hitler http://dbpedia.org/resource/Prince_Chlodwig_zu_HohenloheSchillingsf%C3%BCrst http://dbpedia.org/resource/Prince_Maximilian_of_Baden http://dbpedia.org/resource/Franz_von_Papen http://dbpedia.org/resource/Joseph_Goebbels http://dbpedia.org/resource/Gerhard_Schr%C3%B6der http://dbpedia.org/resource/Angela_Merkel http://dbpedia.org/resource/Helmut_Kohl http://dbpedia.org/resource/Helmut_Schmidt http://dbpedia.org/resource/Ludwig_Erhard http://dbpedia.org/resource/Willy_Brandt + +conf: + ++test("http://dbpedia.org/resource/Adolf_Hitler"). ++test("http://dbpedia.org/resource/Prince_Chlodwig_zu_Hohenlohe-Schillingsf%C3%BCrst"). ++test("http://dbpedia.org/resource/Prince_Maximilian_of_Baden"). ++test("http://dbpedia.org/resource/Franz_von_Papen"). ++test("http://dbpedia.org/resource/Joseph_Goebbels"). ++test("http://dbpedia.org/resource/Gerhard_Schr%C3%B6der"). ++test("http://dbpedia.org/resource/Angela_Merkel"). ++test("http://dbpedia.org/resource/Helmut_Kohl"). ++test("http://dbpedia.org/resource/Helmut_Schmidt"). ++test("http://dbpedia.org/resource/Ludwig_Erhard"). ++test("http://dbpedia.org/resource/Willy_Brandt"). + + +Greek Philosophers: + +Input + + http://dbpedia.org/resource/Socrates http://dbpedia.org/resource/Plato http://dbpedia.org/resource/Pythagoras http://dbpedia.org/resource/Zeno_of_Elea http://dbpedia.org/resource/Democritus http://dbpedia.org/resource/Theophrastus http://dbpedia.org/resource/Anaxagoras http://dbpedia.org/resource/Alexander_the_Great http://dbpedia.org/resource/Hephaestion http://dbpedia.org/resource/Diotima http://dbpedia.org/resource/Nicomachus http://dbpedia.org/resource/Harpalus http://dbpedia.org/resource/Menaechmus + +Conf + ++test("http://dbpedia.org/resource/Socrates"). ++test("http://dbpedia.org/resource/Plato"). ++test("http://dbpedia.org/resource/Pythagoras"). + ++test("http://dbpedia.org/resource/Zeno_of_Elea"). +//was a pre-Socratic Greek philosopher ++test("http://dbpedia.org/resource/Democritus"). +//was a pre-Socratic Greek philosopher +//+test("http://dbpedia.org/resource/Theophrastus"). +//a native of Eressos in Lesbos, was the successor of Aristotle in the Peripatetic school. ++test("http://dbpedia.org/resource/Anaxagoras"). +//was a pre-Socratic Greek philosopher. + +-test("http://dbpedia.org/resource/Alexander_the_Great"). +-test("http://dbpedia.org/resource/Hephaestion"). +//makedonischer Adeliger, der engste Freund, General, Leibw\xE4chter und vielleicht auch Geliebter Alexanders des Gro\xDFen. +-test("http://dbpedia.org/resource/Diotima"). +//ist eine literarische Figur Platons, eine Seherin aus Mantin\xE4a, +-test("http://dbpedia.org/resource/Nicomachus"). +//Nicomachus sp\xE4tantiker r\xF6mischer Schriftsteller und Politiker +-test("http://dbpedia.org/resource/Harpalus"). +//Harpalus was an aristocrat of Macedon and boyhood friend of Alexander the Great +-test("http://dbpedia.org/resource/Menaechmus"). +//was a Greek mathematician and geometer born in Alopeconnesus + + + + + + + + + + + + + + + + + + + + + + Added: trunk/library/owlapi/antlr-runtime-3.0.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/antlr-runtime-3.0.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/commons-lang-2.2.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/commons-lang-2.2.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-api.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-api.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-apibinding.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-apibinding.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-change.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-change.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-debugging.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-debugging.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-dig1_1.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-dig1_1.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-functionalparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-functionalparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-functionalrenderer.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-functionalrenderer.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-impl.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-impl.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-krssparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-krssparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-mansyntaxparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-mansyntaxparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-mansyntaxrenderer.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-mansyntaxrenderer.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-metrics.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-metrics.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-oboparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-oboparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-owlxmlparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-owlxmlparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-owlxmlrenderer.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-owlxmlrenderer.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-rdfapi.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-rdfapi.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-rdfxmlparser.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-rdfxmlparser.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-rdfxmlrenderer.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-rdfxmlrenderer.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/owlapi/owlapi-util.jar =================================================================== (Binary files differ) Property changes on: trunk/library/owlapi/owlapi-util.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/library/xbean.jar =================================================================== (Binary files differ) Property changes on: trunk/library/xbean.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jen...@us...> - 2007-08-20 10:44:05
|
Revision: 2 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2&view=rev Author: jenslehmann Date: 2007-08-20 03:43:47 -0700 (Mon, 20 Aug 2007) Log Message: ----------- added more structure Added Paths: ----------- trunk/INSTALL trunk/LICENSE trunk/README trunk/bin/ trunk/bin/dllearner trunk/bin/dllearner.bat trunk/bin/quickstart trunk/bin/quickstart.bat trunk/bin/ws trunk/bin/ws.bat trunk/build.xml trunk/doc/ trunk/examples/ trunk/library/ trunk/src/ Added: trunk/INSTALL =================================================================== --- trunk/INSTALL (rev 0) +++ trunk/INSTALL 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ + Added: trunk/LICENSE =================================================================== --- trunk/LICENSE (rev 0) +++ trunk/LICENSE 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Added: trunk/README =================================================================== --- trunk/README (rev 0) +++ trunk/README 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1,319 @@ +DL-Learner ist a program to learn Description Logic concepts from positive and +negative examples. + +Requirements +============ + +Java 5 is required. No installation is necessary. Just download and extract +DL-Learner. + +Instructions +============ + +Linux (and other systems) + +Make sure the file "dllearner" is executable and run it on the command line +followed by the name of the file to process, e.g. +"./dllearner examples/father.conf". + +Windows: + +Run "dllearner.bat" followed by the name of the file to process, e.g. +"dllearner.bat examples/father.conf". + +All: + +You can use the "java" command to run the program directly. Have a look at +"dllearner" and "dllearner.bat" to see what the command looks like. + +Syntax +====== + +The background knowledge can either be given as OWL DL file (using the import +function in the configuration files) or by specifying it directly in the +configuration file (which we refer to as the internal knowledge base). + +Some examples of the syntax of the background knowledge in the internal +knowledge base: + +person = (male OR female). +mother = (female AND EXISTS hasChild.TOP). +motherManyDaughters = (female AND >= 4 hasChild.female). +(mother AND father) SUBCLASSOF person. + +Also see the example files. + +This is the EBNF description of the input language [slightly outdated]: + +Number = ["1"-"9"] (["0"-"9"])* +Id = ["a"-"z"] (["_","a"-"z","A"-"Z","0"-"9"])* +String: "\"" (~["\"","\\","\n","\r"])* "\"" +Instruction = ConfOption + | FunctionCall + | PosExample + | NegExample + | ABoxConcept + | ABoxRole + | Transitive + | Functional + | Symmetric + | Inverse + | Subrole + | TBoxEquiv + | TBoxSub +ConfOption = Id [ "." Id ] "=" ( Id | Number ) ";" +FunctionCall = Id "(" String ")" ";" +PosExample = "+" Id "(" Id ")" "." +NegExample = "-" Id "(" Id ")" "." +ABoxConcept = Concept "(" Id ")" "." +ABoxRole = Id "(" Id "," Id ")" "." +Transitive = "Transitive" "(" Id ")" "." +Functional = "Functional" "(" Id ")" "." +Symmetric = "Symmetric" "(" Id ")" "." +Inverse = "Inverse" "(" Id "," Id ")" "." +Subrole = "Subrole" "(" Id "," Id ")" "." +TBoxEquiv = Concept "=" Concept "." +TBoxSub = Concept ("SUBCLASSOF" | "SUB" ) Concept "." +Concept = "TOP" + | "BOTTOM" + | Id + | "(" Concept "AND" Concept ")" + | "(" Concept "OR" Concept ")" + | "EXISTS" Id "." Concept + | "ALL" Id "." Concept + | "NOT" Concept + | ">=" Number Id "." Concept + | "<=" Number Id "." Concept + +Configuration Options +===================== + +General +------- + +Option: algorithm +Possible Values: bruteForce, gp, random, refinement, hybridGP +Default: refinement +Effect: Specifies the algorithm to use for solving the learning problem. Note, + that hybridGP is not an algorithm itself, but starts the GP algorithm + with a sensible set of default values for the hybrid algorithm combining + GP with refinement operators. In particular the probability of all + operators except refinement is set to 0. + +Option: reasoner +Possible Values: dig, kaon2, fastRetrieval +Default: dig +Effect: Specifies the reasoner to be used. DIG communicates with a reasoner + using the DIG Interface. KAON2 means to use the KAON2 Java API directly. + FastRetrieval is an internal algorithm, which can only be used for + retrieval (not for subsumption). Currently the DIG reasoner cannot read + OWL files. + +Option: digReasonerURL +Possible Values: a valid URL +Default: http://localhost:8081 +Effect: Specifies the URL to be used to look for a DIG capable reasoner. + +Option: writeDIGProtocol +Possible Values: true, false +Default: false +Effect: Specifies whether to store all DIG communication. + +Option: digProtocolFile +Possible Values: strings +Default: digProtocol.txt +Effect: The file to store all DIG communication if writeDIGProtocol is true. + +Option: useRetrievalForClassification +Possible Values: true, false +Default: false +Effect: To measure which concepts are covered, one can either use one retrieval + or several instance checks (at most one for each example). This option + controls which of both options should be used. + +Option: percentPerLengthUnit +Possible Values: 0-1 +Default: 0.05 +Effect: How much percent (wrt classification accuracy) can a concept be worse to + justify an increase in length of 1. This variable is used for GP and in + refinement when the flexible heuristic is used. For GP, you should use a + value smaller than the default. + +> general options below are ignored < +> by the refinement operator algorithm < + +Option: accuracyPenalty +Possible Values: 1-1000 +Default: 1 +Effect: Sets the penalty for "small misclassifications". + +Option: errorPenalty +Possible Values: 1-1000 +Default: 3 +Effect: Sets the penalty for classification errors. + +Option: maxLength +Possible Values: 1-20 +Default: 7 +Effect: For the brute force learner this specifies the depth limit for the + search. The GP learner currently ignores it. + +Option: scoreMethod +Possible Values: full, positive +Default: positive +Effect: The positive score method ignores if a negative examples cannot be + classified. This is often usefull, because of the limited expressiveness + of SHIQ wrt. negated role assertions. The full method penalizes this. + +Option: showCorrectClassifications +Possible Values: true, false +Default: false +Effect: Controls if correct classifications are printed (does not effect the + algorithm). + +Option: penalizeNeutralExamples +Possible Values: true, false +Default: false +Effect: If true there is a penalty if a neutral (neither positive nor negative) + individual is classified as either positive or negative. This should + usually be set to false. + +Refinement Operator Algorithm Specific +-------------------------------------- + +Option: refinement.horizontalExpansionFactor +Possible Values: 0-1 +Default: 0.6 +Effect: Specifies horizontal expansion factor. + +Option: refinement.writeSearchTree +Possible Values: true, false +Default: false +Effect: Specifies whether to write the search tree to a file. + +Option: refinement.searchTreeFile +Possible Values: strings +Default: "searchTree.txt" +Effect: Specifies a file to save the current search tree after each loop of + the refinement algorithm. + +Option: refinement.heuristic +Possible Values: flexible, lexicographic +Default: lexicographic +Effect: The refinement operator together with a heuristic yields a learning + algorithm. The lexicographic heuristic uses a lexicographic order of + covered negative examples and horizontal expansion of a node (i.e. + the covered examples are the first criterion, the horizontal expansion + the second criterion). The flexible heuristic computes a combined node + score of both criteria. Note, that the lexicographic needs a horizontal + expansion factor greater than 0 to ensure correctness of the learning + algorithm. + +Option: refinement.quiet +Possible Values: true, false +Default: false +Effect: If set to true, no messages will be shown during the run of the + algorithm (but there will still be startup and summary messages). + +Option: refinement.applyAllFilter +Possible Values: true, false +Default: true +Effect: Specifies wether all equivalences should be used. + +Option: refinement.applyExistsFilter +Possible Values: true, false +Default: true +Effect: Specifies wether exists equivalences should be used. + +Option: refinement.useTooWeakList +Possible Values: true, false +Default: true +Effect: Specifies wether a too weak list should be used to reduce reasoner + requests. + +Option: refinement.useOverlyGeneralList +Possible Values: true, false +Default: true +Effect: Specifies wether an overly general list should be used to reduce + reasoner requests. + +Option: refinement.useShortConceptConstruction +Possible Values: true, false +Default: true +Effect: Specifies wether the algorithm should try to reduce a concept to a + known more general concept to reduce the number of necessary + subsumption checks for the reasoner. + +Option: refinement.useDIGMultiInstanceChecks +Possible Values: never, twoChecks, oneCheck +Default: twoChecks +Effect: The DIG protocol allows to send several queries to a DIG reasoner at + once. [This is automatically done for subsumption tests.] However, + for instance checks this has the disadvantage that it may not be + necessary to send all instance to the DIG reasoner if one of the + positive examples is not covered (meaning that the concept is + classified as too weak). + If the option is set to never, then each instance check is send + separately. + If the option is set to twoChecks, then first all positive examples will + be send in one query. If all of them are covered, i.e. the concept is + not classified as too weak, then all the negative examples are send in + one query. + If the option is set to oneCheck, then all examples will be send in one + query. + +Genetic Programming Specific +---------------------------- + +Option: gp.algorithmType +Possible Values: steadyState, generational +Default: steadyState +Effect: Uses either a steady state (population partly replaced) or generational + (population completely replaced) algorithm. + +Option: gp.elitism +Possible Values: true, false +Default: true +Effect: If true an the GP algorithm uses elitism, i.e. the best individual is + guarenteed to survive. + +Option: gp.numberOfIndividuals +Possible Values: 1-1000000 +Default: 1000 +Effect: Sets the number of individuals in the population. A higher value + improves classification, but is computationally more expensive. + +Option: gp.numberOfSelectedIndividuals +Possible Values: 1-1000000 +Default: 960 +Effect: Sets the number of individuals, which are selected for replacement in a + steady state GP algorithm. + +Option: gp.crossoverPercent +Possible Values: 0-100 +Default: 95 +Effect: The probability that offspring is produced using crossover (in contrast + to simply being copied over to the next generation). + +Option: gp.mutationPercent +Possible Values: 0-100 +Default: 3 +Effect: The probability that offspring is mutated after reproduction. + +Option: gp.hillClimbingPercent +Possible Values: 0-100 +Default: 0 +Effect: The probability that offspring is produced using the hill climbing + operator. + +Option: gp.refinementPercent +Possible Values: 0-100 +Default: 0 +Effect: The probability that offspring is produced using the genetic refinement + operator. + +Option: gp.postConvergenceGenerations +Possible Values: 10-1000 +Default: 50 +Effect: If the algorithm does not find a better solution for this number of + generations it stops. \ No newline at end of file Property changes on: trunk/README ___________________________________________________________________ Name: svn:executable + * Added: trunk/bin/dllearner =================================================================== --- trunk/bin/dllearner (rev 0) +++ trunk/bin/dllearner 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .:lib/dllearner.jar:lib/kaon2.jar:lib/dig1.1-xmlbeans.jar:lib/xbean.jar:lib/jena/antlr-2.7.5.jar:lib/jena/commons-logging.jar:lib/jena/concurrent.jar:lib/jena/icu4j_3_4.jar:lib/jena/iri.jar:lib/jena/jena.jar:lib/jena/xercesImpl.jar org.dllearner.parser.DLLearner $@ Property changes on: trunk/bin/dllearner ___________________________________________________________________ Name: svn:executable + * Added: trunk/bin/dllearner.bat =================================================================== --- trunk/bin/dllearner.bat (rev 0) +++ trunk/bin/dllearner.bat 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .;lib/dllearner.jar;lib/kaon2.jar;lib/dig1.1-xmlbeans.jar;lib/xbean.jar;lib/jena/antlr-2.7.5.jar;lib/jena/commons-logging.jar;lib/jena/concurrent.jar;lib/jena/icu4j_3_4.jar;lib/jena/iri.jar;lib/jena/jena.jar;lib/jena/xercesImpl.jar org.dllearner.parser.DLLearner %* Property changes on: trunk/bin/dllearner.bat ___________________________________________________________________ Name: svn:executable + * Added: trunk/bin/quickstart =================================================================== --- trunk/bin/quickstart (rev 0) +++ trunk/bin/quickstart 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .:lib:lib/dllearner.jar:lib/kaon2.jar:lib/dig1.1-xmlbeans.jar:lib/xbean.jar:lib/jena/antlr-2.7.5.jar:lib/jena/commons-logging.jar:lib/jena/concurrent.jar:lib/jena/icu4j_3_4.jar:lib/jena/iri.jar:lib/jena/jena.jar:lib/jena/xercesImpl.jar org.dllearner.QuickStart Property changes on: trunk/bin/quickstart ___________________________________________________________________ Name: svn:executable + * Added: trunk/bin/quickstart.bat =================================================================== --- trunk/bin/quickstart.bat (rev 0) +++ trunk/bin/quickstart.bat 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .;lib;lib/dllearner.jar;lib/kaon2.jar;lib/dig1.1-xmlbeans.jar;lib/xbean.jar;lib/jena/antlr-2.7.5.jar;lib/jena/commons-logging.jar;lib/jena/concurrent.jar;lib/jena/icu4j_3_4.jar;lib/jena/iri.jar;lib/jena/jena.jar;lib/jena/xercesImpl.jar org.dllearner.QuickStart Added: trunk/bin/ws =================================================================== --- trunk/bin/ws (rev 0) +++ trunk/bin/ws 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .:lib/dllearner.jar:lib/kaon2.jar:lib/dig1.1-xmlbeans.jar:lib/xbean.jar:lib/jena/antlr-2.7.5.jar:lib/jena/commons-logging.jar:lib/jena/concurrent.jar:lib/jena/icu4j_3_4.jar:lib/jena/iri.jar:lib/jena/jena.jar:lib/jena/xercesImpl.jar org.dllearner.server.DLLearnerWSStart $@ Property changes on: trunk/bin/ws ___________________________________________________________________ Name: svn:executable + * Added: trunk/bin/ws.bat =================================================================== --- trunk/bin/ws.bat (rev 0) +++ trunk/bin/ws.bat 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1 @@ +java -cp .;lib/dllearner.jar;lib/kaon2.jar;lib/dig1.1-xmlbeans.jar;lib/xbean.jar;lib/jena/antlr-2.7.5.jar;lib/jena/commons-logging.jar;lib/jena/concurrent.jar;lib/jena/icu4j_3_4.jar;lib/jena/iri.jar;lib/jena/jena.jar;lib/jena/xercesImpl.jar org.dllearner.server.DLLearnerWSStart %* Property changes on: trunk/bin/ws.bat ___________________________________________________________________ Name: svn:executable + * Added: trunk/build.xml =================================================================== --- trunk/build.xml (rev 0) +++ trunk/build.xml 2007-08-20 10:43:47 UTC (rev 2) @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project basedir="." default="build" name="dl_learner"> + + <property name="kaon2" value="lib/kaon2.jar"/> + <property name="xbean" value="lib/xbean.jar"/> + <property name="dig1.1_xmlbeans" value="lib/dig1.1-xmlbeans.jar"/> + + <!-- Jena --> + <property name="jena" value="lib/jena/jena.jar"/> + + <path id="classpath"> + <pathelement location="."/> + <pathelement location="${kaon2}"/> + <pathelement location="${xbean}"/> + <pathelement location="${dig1.1_xmlbeans}"/> + <pathelement location="${jena}"/> + <pathelement location="lib/owlapi/owlapi-api.jar"/> + <pathelement location="lib/owlapi/owlapi-apibinding.jar"/> + <pathelement location="lib/owlapi/owlapi-dig1_1.jar"/> + </path> + + <target name="build"> + <tstamp> + <format property="today" pattern="yyyy-MM-dd" locale="en" /> + </tstamp> + <property name="version_dir" value="dllearner-${today}" /> + <property name="release_tmp_dir" value="release/${version_dir}" /> + <!-- Java-Datei mit Build schreiben --> + <echo file="org/dllearner/Info.java" append="false"> +// File is updated automatically when a new version is created +package org.dllearner; + +public class Info { + public static final String build = "${today}"; +} + </echo> + <!-- Projekt in temporäres Verzeichnis compilieren --> + <mkdir dir="classes"/> + <javac destdir="classes"> + <src path="."/> + <classpath refid="classpath"/> + </javac> + <!-- altes Release löschen und neues erstellen --> + <mkdir dir="${release_tmp_dir}"/> + <mkdir dir="${release_tmp_dir}/lib/"/> + <jar jarfile="${release_tmp_dir}/lib/dllearner.jar"> + <fileset dir="classes"/> + </jar> + <delete dir="classes"/> + <copy file="${kaon2}" todir="${release_tmp_dir}/lib/" /> + <copy file="${xbean}" todir="${release_tmp_dir}/lib/" /> + <copy file="${dig1.1_xmlbeans}" todir="${release_tmp_dir}/lib/" /> + <copy toDir="${release_tmp_dir}/lib/jena/"> + <fileset dir="lib/jena/"/> + </copy> + <copy toDir="${release_tmp_dir}/lib/owlapi/"> + <fileset dir="lib/owlapi/"/> + </copy> + <copy toDir="${release_tmp_dir}/lib/modules/"> + <fileset dir="lib/modules/"/> + </copy> + <copy toDir="${release_tmp_dir}"> + <fileset dir="files"/> + </copy> + <!-- nicht notwendig + <chmod file="${release_tmp_dir}/dllearner" perm="755"/> + <chmod file="${release_tmp_dir}/quickstart" perm="755"/> + --> + <!-- Datei mit Datum des Builds schreiben --> + <!-- (today wird schon weiter oben definiert) + <tstamp> + <format property="today" pattern="yyyy-MM-dd" locale="en" /> + </tstamp> + --> + <echo file="${release_tmp_dir}/build.txt" append="false">DL-Leaner Build ${today}</echo> + <!-- tar.bz2 erzeugen (zip würde auch gehen, aber kann keine Dateien mit + execute-Erlaubnis speichern, bz2 ist hier nur unswesentlich besser, aber langsamer) --> + <tar destfile="dllearner_${today}.tar.gz" compression="gzip"> + <!-- Extraset für ausführbare Dateien --> + <tarfileset dir="release/" mode="755"> + <include name="${version_dir}/dllearner" /> + <include name="${version_dir}/quickstart" /> + <include name="${version_dir}/ws" /> + </tarfileset> + <tarfileset dir="release/"> + <exclude name="${version_dir}/dllearner"/> + <exclude name="${version_dir}/quickstart" /> + <exclude name="${version_dir}/quickstart" /> + </tarfileset> + </tar> + <!-- kopieren des Quellcodes --> + <mkdir dir="${release_tmp_dir}/src/"/> + <copy toDir="${release_tmp_dir}/src/"> + <fileset dir="." includes="**/*.java,**/*.jjt,build.xml"/> + </copy> + <!-- Backup erstellen (enthält zusätzlich Quellcode) --> + <tar destfile="backup_dllearner_${today}.tar.gz" compression="gzip"> + <tarfileset dir="release/" mode="755"> + <include name="${version_dir}/dllearner" /> + <include name="${version_dir}/quickstart" /> + </tarfileset> + <tarfileset dir="release/"> + <exclude name="${version_dir}/dllearner"/> + <exclude name="${version_dir}/quickstart" /> + </tarfileset> + </tar> + <delete dir="release"/> + </target> + +</project> Property changes on: trunk/build.xml ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |