Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker file for Learningbox
Full Description

h1. Learning Box

h2. A RESTful Machine Learning

Learning box is a RESTful machine learning which is built on top of <a href="">OpenNLP</a>. Features:

  • Document categorization

h2. Getting Started

h3. Requirements

You need to have docker and docker-compose.

h3. Installation

  • Clone github repo.
  • docker-compose build
  • docker-compose up

h3. Document categorization

h4. Learning phase

First of all you need to train the box.

Note: If you are using docker on Mac OSX on Windows, replace "localhost" with IP of your docker machine (docker-machine ip <env>).

curl -H "Content-type:application/json" -XPOST 'http://localhost:8080/learn' -d '{ "area" : "<area>", "category": "<category>", "text": "<text>" }'

- <area> is a logical division of training set
- <category> is the document's category
- <text> is the document's text


Now, let's see if the information was added by GETting it:

curl -XGET 'http://localhost:8080/learn'

h4. Categorization phase

Now you are able to provide a text to the machine and get the category

curl 'http://localhost:8080/api/categorize/<area>' -d '<text>'

h1. License

This software is licensed under the Apache License, version 2 ("ALv2"), quoted below.

Copyright 2016 Gianluca Tomasino

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations under
the License.

Docker Pull Command
Source Repository