<commit_before>require "formula"

class Sword < Formula
  homepage "http://www.crosswire.org/sword/index.jsp"
  url "ftp://ftp.crosswire.org/pub/sword/source/v1.7/sword-1.7.3.tar.gz"
  sha1 "6ecac6364aa098e150cf8851fd8f97d48df21a34"

  bottle do
    sha1 "8fc45d81b7fcc7d1feffdc130f6c139ffc382db4" => :yosemite
    sha1 "148fd1c7b4358bb3f97979022f65b113afabb856" => :mavericks
    sha1 "36eedc14308de364ebfb1e2fecfc86852b65e3cf" => :mountain_lion
  end

  option "with-icu4c", "Uses icu4c for unicode support"
  depends_on "icu4c" => :optional
  option "with-clucene", "Uses clucene for text searching capabilities"
  depends_on "clucene" => :optional

  def install
    args = [
      "--prefix=#{prefix}",
      "--disable-debug",
      "--disable-profile",
      "--disable-tests",
      "--with-curl", # use system curl
    ]

    if build.with? "icu4c"
      args << "--with-icu"
    else
      args << "--without-icu"
    end

    if build.with? "clucene"
      args << "--with-clucene"<commit_msg>sword 1.7.4<commit_after>class Sword < Formula
  homepage "http://www.crosswire.org/sword/index.jsp"
  url "http://www.crosswire.org/ftpmirror/pub/sword/source/v1.7/sword-1.7.4.tar.gz"
  sha256 "995da8cf5a207c1f09809bf4b9db0bd7d267da5fcdb9d6666c9b313edd9d213d"

  bottle do
    sha1 "8fc45d81b7fcc7d1feffdc130f6c139ffc382db4" => :yosemite
    sha1 "148fd1c7b4358bb3f97979022f65b113afabb856" => :mavericks
    sha1 "36eedc14308de364ebfb1e2fecfc86852b65e3cf" => :mountain_lion
  end

  depends_on "clucene" => :optional
  depends_on "icu4c" => :optional
  option "with-clucene", "Use clucene for text searching capabilities"
  option "with-icu4c", "Use icu4c for unicode support"

  def install
    args = [
      "--prefix=#{prefix}",
      "--disable-debug",
      "--disable-profile",
      "--disable-tests",
      "--with-curl", # use system curl
    ]

    if build.with? "icu4c"
      args << "--with-icu"
    else
      args << "--without-icu"
    end

    if build.with? "clucene"
      args << "--with-clucene"
{'fraction_non_alphanumeric': 0.13798219584569732, 'fraction_numerical': 0.10880316518298715, 'mean_word_length': 3.1970954356846475, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, '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': '4113413', 'n_tokens_mistral': 935, 'n_tokens_neox': 829, 'n_words': 136}