<commit_before>require "formula"

class MecabKoDic < Formula
  homepage "https://bitbucket.org/bibreen/mecab-ko-dic"
  url "https://bitbucket.org/bibreen/mecab-ko-dic/downloads/mecab-ko-dic-1.4.3-20131115.tar.gz"
  sha1 "8a6165f564f8285942dbd838f12c52e7dfa29357"

  depends_on :autoconf
  depends_on :automake
  depends_on 'mecab-ko'

  def patches
    DATA
  end

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--with-dicdir=#{prefix}"
    system "make install"
  end
end


__END__
--- a/configure<commit_msg>mecab-ko-dic: use patch DSL<commit_after>require "formula"

class MecabKoDic < Formula
  homepage "https://bitbucket.org/bibreen/mecab-ko-dic"
  url "https://bitbucket.org/bibreen/mecab-ko-dic/downloads/mecab-ko-dic-1.4.3-20131115.tar.gz"
  sha1 "8a6165f564f8285942dbd838f12c52e7dfa29357"

  depends_on :autoconf
  depends_on :automake
  depends_on 'mecab-ko'

  patch :DATA

  def install
    system "./configure", "--prefix=#{prefix}",
                          "--with-dicdir=#{prefix}"
    system "make install"
  end
end


__END__
--- a/configure
{'fraction_non_alphanumeric': 0.13417951042611062, 'fraction_numerical': 0.07252946509519492, 'mean_word_length': 3.1194029850746268, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '7635568', 'n_tokens_mistral': 494, 'n_tokens_neox': 444, 'n_words': 68}