<commit_before># DALPHI

[![Build Status](https://travis-ci.org/Dalphi/dalphi.svg?branch=master)](https://travis-ci.org/dalphi/dalphi)
[![Dependency Status](https://gemnasium.com/Dalphi/dalphi.svg)](https://gemnasium.com/Dalphi/dalphi)
[![codebeat badge](https://codebeat.co/badges/c3c6b8d5-8ef4-4a81-9d37-6ee06383fc85)](https://codebeat.co/projects/github-com-dalphi-dalphi)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7a177baa4ea244d59202547cd6f8a975)](https://www.codacy.com/app/github_67/dalphi)
[![Code Climate](https://codeclimate.com/github/Dalphi/dalphi/badges/gpa.svg)](https://codeclimate.com/github/dalphi/dalphi)
[![Issue Count](https://codeclimate.com/github/Dalphi/dalphi/badges/issue_count.svg)](https://codeclimate.com/github/Dalphi/dalphi)
[![Test Coverage](https://codeclimate.com/github/Dalphi/dalphi/badges/coverage.svg)](https://codeclimate.com/github/Dalphi/dalphi/coverage)

![DALPHI](https://raw.githubusercontent.com/Dalphi/dalphi/master/app/assets/images/dalphi-logo.png)
DALPHI - Active Learning Platform for Human Interaction

## Introduction

DALPHI helps you to build and maintain your annotated data for machine learning tasks.
It is completely agnostic regarding the document content of your data to allow for a wide range of labeling problems.
Internally, each document is treated as a blob, only the services you provide understand its content.
These JSON-based services define the machine learning problem you want to solve.

Due to its rather early stage, the communication protocol between DALPHI and the external services is still evolving and changes constantly.
This is just to give you an idea of how the process works.
Currently, the following endpoints must be provided by your service in order to run DALPHI:

* **iterate**
  * Input: The whole corpus including all labeled and unlabeled documents
  * Output: A list of _AnnotationDocuments_
  
* **merge**
  * Input: One raw _CorpusDocument_ and one or more corresponding _AnnotationDocuments_
  * Output: The _CorpusDocument_ containing the merged feedback from the _AnnotationDocuments_

You can think of an _AnnotationDocument_ as a question to the human annotator.
This may be a simple closed question like "Is there a cat on the picture?" or "Is this a valid person name?".
Or it may require custom rendering asking for complex feedback.
Therefore you have to register a custom HTML interface to render complex questions.
We are still working on the concrete API documentation and example services.
These are planned to be available by December 2016.

Check also out our [DALPHI product presentation](https://dalphi.github.io/presentation/).

## Getting started

### Kickstart with Docker

Start just the Ruby on Rails Webapp with

```
docker build -t DALPHI .
docker run -it -p 3000:3000 DALPHI
```

or launch the complete bundle including some example services and a worker with

```
docker-compose up
```

### Starting for development

DALPHI requires Ruby 2.3.3 to work properly.
With `rvm` it can be installed by running the following.

```bash
rvm install ruby-2.3.3
rvm use ruby-2.3.3
```

Get DALPHI by cloning the official repository.

```bash<commit_msg>update README.md in order to make usage of Ruby v2.4.0<commit_after># DALPHI

[![Build Status](https://travis-ci.org/Dalphi/dalphi.svg?branch=master)](https://travis-ci.org/dalphi/dalphi)
[![Dependency Status](https://gemnasium.com/Dalphi/dalphi.svg)](https://gemnasium.com/Dalphi/dalphi)
[![codebeat badge](https://codebeat.co/badges/c3c6b8d5-8ef4-4a81-9d37-6ee06383fc85)](https://codebeat.co/projects/github-com-dalphi-dalphi)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7a177baa4ea244d59202547cd6f8a975)](https://www.codacy.com/app/github_67/dalphi)
[![Code Climate](https://codeclimate.com/github/Dalphi/dalphi/badges/gpa.svg)](https://codeclimate.com/github/dalphi/dalphi)
[![Issue Count](https://codeclimate.com/github/Dalphi/dalphi/badges/issue_count.svg)](https://codeclimate.com/github/Dalphi/dalphi)
[![Test Coverage](https://codeclimate.com/github/Dalphi/dalphi/badges/coverage.svg)](https://codeclimate.com/github/Dalphi/dalphi/coverage)

![DALPHI](https://raw.githubusercontent.com/Dalphi/dalphi/master/app/assets/images/dalphi-logo.png)
DALPHI - Active Learning Platform for Human Interaction

## Introduction

DALPHI helps you to build and maintain your annotated data for machine learning tasks.
It is completely agnostic regarding the document content of your data to allow for a wide range of labeling problems.
Internally, each document is treated as a blob, only the services you provide understand its content.
These JSON-based services define the machine learning problem you want to solve.

Due to its rather early stage, the communication protocol between DALPHI and the external services is still evolving and changes constantly.
This is just to give you an idea of how the process works.
Currently, the following endpoints must be provided by your service in order to run DALPHI:

* **iterate**
  * Input: The whole corpus including all labeled and unlabeled documents
  * Output: A list of _AnnotationDocuments_
  
* **merge**
  * Input: One raw _CorpusDocument_ and one or more corresponding _AnnotationDocuments_
  * Output: The _CorpusDocument_ containing the merged feedback from the _AnnotationDocuments_

You can think of an _AnnotationDocument_ as a question to the human annotator.
This may be a simple closed question like "Is there a cat on the picture?" or "Is this a valid person name?".
Or it may require custom rendering asking for complex feedback.
Therefore you have to register a custom HTML interface to render complex questions.
We are still working on the concrete API documentation and example services.
These are planned to be available by December 2016.

Check also out our [DALPHI product presentation](https://dalphi.github.io/presentation/).

## Getting started

### Kickstart with Docker

Start just the Ruby on Rails Webapp with

```
docker build -t DALPHI .
docker run -it -p 3000:3000 DALPHI
```

or launch the complete bundle including some example services and a worker with

```
docker-compose up
```

### Starting for development

DALPHI requires Ruby 2.4.0 to work properly.
With `rvm` it can be installed by running the following.

```bash
rvm install ruby-2.4.0
rvm use ruby-2.4.0
```

Get DALPHI by cloning the official repository.

```bash
{'fraction_non_alphanumeric': 0.09701609123574441, 'fraction_numerical': 0.02046555225745977, 'mean_word_length': 4.966449207828518, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 32, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6825650', 'n_tokens_mistral': 2048, 'n_tokens_neox': 1907, 'n_words': 672}