From: <jen...@us...> - 2009-08-17 16:40:52
|
Revision: 1826 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=1826&view=rev Author: jenslehmann Date: 2009-08-17 16:40:36 +0000 (Mon, 17 Aug 2009) Log Message: ----------- fixed JSON output (bug in JSON API) Modified Paths: -------------- trunk/src/dl-learner/org/dllearner/core/owl/Individual.java trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java trunk/src/php-examples/LearningClass.php Modified: trunk/src/dl-learner/org/dllearner/core/owl/Individual.java =================================================================== --- trunk/src/dl-learner/org/dllearner/core/owl/Individual.java 2009-08-17 15:17:59 UTC (rev 1825) +++ trunk/src/dl-learner/org/dllearner/core/owl/Individual.java 2009-08-17 16:40:36 UTC (rev 1826) @@ -51,11 +51,15 @@ } public int compareTo(Individual o) { +// System.out.println(o); return name.compareTo(o.name); } @Override public boolean equals(Object o) { + if(o==null) { + return false; + } return (compareTo((Individual)o)==0); } Modified: trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java =================================================================== --- trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java 2009-08-17 15:17:59 UTC (rev 1825) +++ trunk/src/dl-learner/org/dllearner/learningproblems/EvaluatedDescriptionClass.java 2009-08-17 16:40:36 UTC (rev 1826) @@ -26,6 +26,7 @@ import org.dllearner.core.owl.Individual; import org.dllearner.utilities.owl.OWLAPIDescriptionConvertVisitor; import org.dllearner.utilities.owl.OWLAPIRenderers; +import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.semanticweb.owl.model.OWLDescription; @@ -114,8 +115,8 @@ object.put("descriptionOWLXML", OWLAPIRenderers.toOWLXMLSyntax(d)); object.put("descriptionKBSyntax", description.toKBSyntaxString()); object.put("scoreValue", score.getAccuracy()); - object.put("additionalInstances", getAdditionalInstances()); - object.put("coveredInstances", getCoveredInstances()); + object.put("additionalInstances", new JSONArray(getAdditionalInstances())); + object.put("coveredInstances", new JSONArray(getCoveredInstances())); object.put("isConsistent", isConsistent()); object.put("coverage", getCoverage()); object.put("addition", getAddition()); Modified: trunk/src/php-examples/LearningClass.php =================================================================== --- trunk/src/php-examples/LearningClass.php 2009-08-17 15:17:59 UTC (rev 1825) +++ trunk/src/php-examples/LearningClass.php 2009-08-17 16:40:36 UTC (rev 1826) @@ -48,6 +48,7 @@ $client->applyConfigEntryURL($id, $lp, "classToDescribe", "http://ns.softwiki.de/req/CustomerRequirement"); $la_id = $client->setLearningAlgorithm($id, "celoe"); +$client->applyConfigEntryInt($id, $la_id, "maxExecutionTimeInSeconds", 5); $client->initAll($id); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |