$client->applyConfigEntryInt($id, $laID, "maxExecutionTimeInSeconds", 1); $client->applyConfigEntryBoolean($id, $laID, "useHasValueConstructor", true); $client->applyConfigEntryInt($id, $laID, "valueFrequencyThreshold", 2); $client->initAll($id); echo '<p>Positive examples:<br />'; foreach ($examples as $example) { echo $example . '<br />'; } echo '</p>'; echo '<p>Additional instances:<br />'; foreach ($relatedInstances as $related) { echo $related . '<br />'; } echo '</p>'; echo '<p>start learning ... '; $startTime = microtime(true); $concepts = $client->learnDescriptionsEvaluated($id, 10); $runTime = microtime(true) - $startTime; echo 'OK (' . $runTime . ' seconds)</p>'; $concepts = json_decode($concepts); // var_dump($concepts); echo '<table border="1px"><tr><td><i>natural description</i></td><td><i>Manchester OWL Syntax</i></td><td><i>accuracy</i></td></tr>'; foreach ($concepts as $concept) { $natural = $client->getNaturalDescription($id, $concept->descriptionKBSyntax); // echo $natural . '(Manchester: ' . $concept->descriptionManchesterSyntax . ', acc. ' . $concept->scoreValue . ')<br />'; ; echo '<tr><td>' . $natural . '</td><td>' . $concept->descriptionManchesterSyntax . '</td><td>' . $concept->scoreValue . '</td></tr>'; } echo '</table>'; ?>