<commit_before># Any23 Transformer [![Build Status](https://travis-ci.org/fusepoolP3/p3-any23-transformer.svg)](https://travis-ci.org/fusepoolP3/p3-any23-transformer)

This module provides a Fusepool P3 Transformer implementation for 
[Apache Any23](http://any23.apache.org)

The Any23 Transformer is an asynchronous transformer implementation.

## Try it out

## Compiling and Running

This module uses Maven as build system. After obtaining the sources, build using

    mvn clean install

in the root directory of the sources, this will build a runnable jar. 
After the build succeeds you can find it in the ´/target´ folder.

Calling

    java -Xmx1g -jar any23-transformer-{version}.jar

will run the Any23 Transformer on port `8303` with the default Any23 configuration
and a thread pool of min `3` and max `20` threads.

The command line tool provides the following configuration parameters:<commit_msg>Wrote try-it-out-section<commit_after># Any23 Transformer [![Build Status](https://travis-ci.org/fusepoolP3/p3-any23-transformer.svg)](https://travis-ci.org/fusepoolP3/p3-any23-transformer)

This module provides a Fusepool P3 Transformer implementation for 
[Apache Any23](http://any23.apache.org)

The Any23 Transformer is an asynchronous transformer implementation.

## Try it out

The transformer can be started using the latest release that can be downloaded from the releases section. The executable jar file contains all the necessary dependencies. To start it, run the command

    java -jar any23-transformer-any23-transformer-*.jar 

The transformer will be started and listen on it's default port 8303. 

As an example, a RDFa-document can be sent to the transformer (the document can be found [here](https://github.com/fusepoolP3/p3-any23-transformer/blob/master/src/test/resources/rdfa11.html)):

 curl -v -X "POST" -H "Content-Type: text/html;charset=UTF-8" -T "rdfa11.html" \http://localhost:8303/

After submitting this request, the transformer will answer with an URL where the response can be fetched:

    HTTP/1.1 202 Accepted
    Date: Mon, 06 Jul 2015 11:07:07 GMT
    Location: /job/a7e3d269-55c0-40d6-9513-58bb2a966bd5

Thus, by accessing `http://localhost:8303/job/a7e3d269-55c0-40d6-9513-58bb2a966bd5` the resulting RDF data should be returned.

## Compiling and Running

This module uses Maven as build system. After obtaining the sources, build using

    mvn clean install

in the root directory of the sources, this will build a runnable jar. 
After the build succeeds you can find it in the ´/target´ folder.

Calling

    java -Xmx1g -jar any23-transformer-{version}.jar

will run the Any23 Transformer on port `8303` with the default Any23 configuration
and a thread pool of min `3` and max `20` threads.

The command line tool provides the following configuration parameters:
{'fraction_non_alphanumeric': 0.08126330731014904, 'fraction_numerical': 0.0525195173882186, 'mean_word_length': 4.36952380952381, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2381086', 'n_tokens_mistral': 945, 'n_tokens_neox': 848, 'n_words': 332}