<commit_before>require 'formula'

class Predictionio < Formula
  homepage 'http://prediction.io/'
  url 'http://download.prediction.io/PredictionIO-0.8.5.tar.gz'
  sha1 '1cc68733d2f8dbad1ae01e960f74085db24c7e74'

  depends_on 'elasticsearch'
  depends_on 'hadoop'
  depends_on 'hbase'
  depends_on 'apache-spark'
  depends_on :java => "1.7"

  def install
    rm_f Dir["bin/*.bat"]

    libexec.install Dir['*']
    bin.write_exec_script libexec/"bin/pio"

    inreplace libexec/"conf/pio-env.sh" do |s|
       s.gsub! /#\s*ES_CONF_DIR=.+$/, "ES_CONF_DIR=#{Formula['elasticsearch'].opt_prefix}/config"
       s.gsub! /SPARK_HOME=.+$/, "SPARK_HOME=#{Formula['apache-spark'].opt_prefix}"
    end
  end

end
<commit_msg>PredictionIO 0.8.6<commit_after>require 'formula'

class Predictionio < Formula
  homepage 'http://prediction.io/'
  url 'http://download.prediction.io/PredictionIO-0.8.6.tar.gz'
  sha1 'bba9342864bd01859b2719dc76affb3067fcab46'

  depends_on 'elasticsearch'
  depends_on 'hadoop'
  depends_on 'hbase'
  depends_on 'apache-spark'
  depends_on :java => "1.7"

  def install
    rm_f Dir["bin/*.bat"]

    libexec.install Dir['*']
    bin.write_exec_script libexec/"bin/pio"

    inreplace libexec/"conf/pio-env.sh" do |s|
       s.gsub! /#\s*ES_CONF_DIR=.+$/, "ES_CONF_DIR=#{Formula['elasticsearch'].opt_prefix}/config"
       s.gsub! /SPARK_HOME=.+$/, "SPARK_HOME=#{Formula['apache-spark'].opt_prefix}"
    end
  end

end

{'fraction_non_alphanumeric': 0.15983321751216123, 'fraction_numerical': 0.04378040305767894, 'mean_word_length': 3.9315068493150687, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1185979', 'n_tokens_mistral': 611, 'n_tokens_neox': 582, 'n_words': 87}