php class wrapper for machinebox.io
- Build a base test image to test this build process (Travis/Docker)
- Build tests
- Gnomes
- Profit
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/andreaskasper/machinebox-php"
}
],
"require": {
"andreaskasper/machinebox-php": "*"
},
"require-dev": {
"andreaskasper/machinebox-php": "dev-master"
}
}php composer.phar update<?php
//Load Composer's autoloader
require 'vendor/autoload.php';
$box = new \machinebox\classificationbox("http://127.0.0.1:8080");
$box->createmodel("sprache01", "Spracherkennung", array("english","deutsch"));
$input = new inputlist();
$input->add("text", "Hallo dies ist ein deutscher Satz.");
$box->teach("deutsch", $input);
$input = new inputlist();
$input->add("text", "Hello, this is an english sentence.");
$box->teach("english", $input);
$input = new inputlist();
$input->add("text", "Welche Sprache hat dieser Satz?");
$out = $box->predict($input);
print_r($out);