<commit_before>#!/bin/bash

ELASTICSEARCH_VERSION=1.5.2
KUROMOJI_VERSION=2.5.0

sudo apt-get update
sudo apt-get upgrade

if type java > /dev/null 2&>1; then
  sudo apt-get install -y openjdk-7-jre
fi

sudo wget -O /tmp/elasticsearch-$ELASTICSEARCH_VERSION.deb https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
sudo dpkg -i /tmp/elasticsearch-$ELASTICSEARCH_VERSION.deb
sudo sed -i 's/# http.enabled: false/http.enabled: true/g' /etc/elasticsearch/elasticsearch.yml
sudo sed -i 's/# network.host: 192.168.0.1/network.host: $$HOST$$/g' /etc/elasticsearch/elasticsearch.yml
sudo /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/$KUROMOJI_VERSION<commit_msg>Install openjdk-7-jre on all environments<commit_after>#!/bin/bash

ELASTICSEARCH_VERSION=1.5.2
KUROMOJI_VERSION=2.5.0

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y openjdk-7-jre

sudo wget -O /tmp/elasticsearch-$ELASTICSEARCH_VERSION.deb https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-$ELASTICSEARCH_VERSION.deb
sudo dpkg -i /tmp/elasticsearch-$ELASTICSEARCH_VERSION.deb
sudo sed -i 's/# http.enabled: false/http.enabled: true/g' /etc/elasticsearch/elasticsearch.yml
sudo sed -i 's/# network.host: 192.168.0.1/network.host: $$HOST$$/g' /etc/elasticsearch/elasticsearch.yml
sudo /usr/share/elasticsearch/bin/plugin -install elasticsearch/elasticsearch-analysis-kuromoji/$KUROMOJI_VERSION
{'fraction_non_alphanumeric': 0.12634408602150538, 'fraction_numerical': 0.02217741935483871, 'mean_word_length': 5.256302521008403, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7499893', 'n_tokens_mistral': 548, 'n_tokens_neox': 530, 'n_words': 96}