Public | Automated Build

Last pushed: a year 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="https://opennlp.apache.org">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>).

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

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

</pre>

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

<pre>
curl -XGET 'http://localhost:8080/learn'
</pre>

h4. Categorization phase

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

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

h1. License

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

Copyright 2016 Gianluca Tomasino http://www.gianlucatomasino.me

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

http://www.apache.org/licenses/LICENSE-2.0

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.
</pre>

Docker Pull Command
Owner
gianlucatomasino
Source Repository

Comments (0)