* a class definition using a separate learning thread. * * @author Jens Lehmann */ include 'Utilities.php'; // load WSDL files (has to be done due to a Java web service bug) ini_set("soap.wsdl_cache_enabled", "0"); $wsdluri = "http://localhost:8181/services?wsdl"; Utilities::loadWSDLfiles($wsdluri); // specifiy ontology $ontology = 'file:' . realpath("../examples/family/uncle.owl"); // create DL-Learner client $client = new SoapClient("main.wsdl"); // load owl file in reasoner $id = $client->generateID(); $state = $client->getState($id); var_dump($state); echo 'STATE END'; $ksID = $client->addKnowledgeSource($id, "owlfile", $ontology); $rID = $client->setReasoner($id, "owlapi"); // create a learning problem $posExamples = array('http://localhost/foo#heinrich', 'http://localhost/foo#alfred', 'http://localhost/foo#heinz', 'http://localhost/foo#hans', 'http://localhost/foo#alex'); $negExamples = array('http://localhost/foo#jan', 'http://localhost/foo#markus', 'http://localhost/foo#susi', 'http://localhost/foo#anna', 'http://localhost/foo#maria', 'http://localhost/foo#katrin', 'http://localhost/foo#johanna', 'http://localhost/foo#mandy', 'http://localhost/foo#miriam', 'http://localhost/foo#hanna'); $client->setLearningProblem($id, "posNegLPStandard"); $client->setPositiveExamples($id, $posExamples); $client->setNegativeExamples($id, $negExamples); // choose refinement operator approach $client->setLearningAlgorithm($id, "refinement"); $client->initAll($id); // start learning process in DL-Learner $client->learnThreaded($id);