<commit_before># cloudINSIGHT
[![Build Status](https://travis-ci.org/mcapuccini/cloud-insight.svg?branch=master)](https://travis-ci.org/mcapuccini/cloud-insight)

## Run locally (Ubuntu)
1) Build docker container
```
cd container
sudo docker build -t insight-particle-evaluator .
```
2) Add Enviroment variable to your run configuration
- Right click on CloudInsight.scala -> RunAs -> Run Configurations -> Enviroment
- Create Variable TMPDIR with value /tmp

3) Add your user into the docker usergroup
http://askubuntu.com/questions/477551/how-can-i-use-docker-without-sudo<commit_msg>add docs [skip ci]<commit_after># cloudINSIGHT
[![Build Status](https://travis-ci.org/mcapuccini/cloud-insight.svg?branch=master)](https://travis-ci.org/mcapuccini/cloud-insight)

## Run locally (Ubuntu)
0) Install dependencies:
  - Install Docker and make sure your user in into Docker group
  - Download Apache Spark, extract it to a directory and set ``export SPARK_HOME=/your/spark/directory``
1) Pull `insight-particle-evaluator` Docker container
```
docker pull mcapuccini/insight-particle-evaluator
```
2) Make sure that `TMPDIR` is defined in your environmemt (e.g. `TMPDIR=/tmp`)
3) Build cloudINSIGHT
```
cd cinsight && mvn clean package
```
4) Run the analysis locally
```
$SPARK_HOME/bin/spark-submit \
  --class se.uu.it.cinsight.Main
  --master local[*]
  cinsight/target/cinsight-0.1.0-SNAPSHOT-jar-with-dependencies.jar
```
{'fraction_non_alphanumeric': 0.13333333333333333, 'fraction_numerical': 0.011929824561403509, 'mean_word_length': 4.844262295081967, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 4, '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': '4272758', 'n_tokens_mistral': 507, 'n_tokens_neox': 472, 'n_words': 123}