Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

machinebox-php

php class wrapper for machinebox.io

Build status: Build Status

Latest Stable Version Total Downloads Latest Unstable Version License

Features

Steps

  • Build a base test image to test this build process (Travis/Docker)
  • Build tests
  • Gnomes
  • Profit

Installation

via Composer

{
  "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

Examples

Simple Example

<?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);

About

php class wrapper for machinebox.io

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages