<commit_before>require 'formula'

class Plowshare < Formula
  homepage 'http://code.google.com/p/plowshare/'
  url 'http://plowshare.googlecode.com/files/plowshare-snapshot-git20120930.tar.gz'
  sha1 'd8272d2a325764f855d77158e0ed35e70d9d1968'

  head 'https://code.google.com/p/plowshare/', :using => :git

  depends_on 'recode'
  depends_on 'imagemagick'
  depends_on 'tesseract'
  depends_on 'spidermonkey'
  depends_on 'aview'
  depends_on 'coreutils'
  depends_on 'gnu-sed'
  depends_on 'gnu-getopt'

  def patches
    DATA
  end

  def install
    ENV["PREFIX"] = prefix
    system "bash setup.sh install"
  end<commit_msg>plowshare: add caveat about X11 support for imagemagick<commit_after>require 'formula'

class Plowshare < Formula
  homepage 'http://code.google.com/p/plowshare/'
  url 'http://plowshare.googlecode.com/files/plowshare-snapshot-git20120930.tar.gz'
  sha1 'd8272d2a325764f855d77158e0ed35e70d9d1968'

  head 'https://code.google.com/p/plowshare/', :using => :git

  depends_on 'recode'
  depends_on 'imagemagick'
  depends_on 'tesseract'
  depends_on 'spidermonkey'
  depends_on 'aview'
  depends_on 'coreutils'
  depends_on 'gnu-sed'
  depends_on 'gnu-getopt'

  def patches
    DATA
  end

  def install
    ENV["PREFIX"] = prefix
    system "bash setup.sh install"
  end

  def caveats; <<-EOS.undent
    The default installation of imagemagick does not enable
    X11 support. plowshare uses the display command which does
    not work if X11 support is not enabled. To enable:
      brew remove imagemagick
      brew install imagemagick --with-x
    EOS
  end
{'fraction_non_alphanumeric': 0.09811320754716982, 'fraction_numerical': 0.05157232704402516, 'mean_word_length': 3.806646525679758, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, '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': '4304433', 'n_tokens_mistral': 639, 'n_tokens_neox': 600, 'n_words': 133}