<commit_before>class Opencc < Formula
  desc "Simplified-traditional Chinese conversion tool"
  homepage "https://github.com/BYVoid/OpenCC"
  url "https://dl.bintray.com/byvoid/opencc/opencc-1.0.2.tar.gz"
  sha256 "e0976ec214961d00dfcd34be100cf62f8f71ef5f56b3f27229e7be5e4f07f1e2"

  bottle do
    sha1 "f49556768692c346a700382cec6746ee3d425ff3" => :yosemite
    sha1 "e7024a546b9b322a5cdb43703004a93a5dcd21b9" => :mavericks
    sha1 "535532648a4f756a5c20ddda3da12953c7520128" => :mountain_lion
  end

  depends_on "cmake" => :build

  needs :cxx11

  def install
    ENV.cxx11
    system "cmake", ".", "-DBUILD_DOCUMENTATION:BOOL=OFF", *std_cmake_args
    system "make"
    system "make", "install"
  end
end
<commit_msg>opencc 1.0.3<commit_after>class Opencc < Formula
  desc "Simplified-traditional Chinese conversion tool"
  homepage "https://github.com/BYVoid/OpenCC"
  url "https://dl.bintray.com/byvoid/opencc/opencc-1.0.3.tar.gz"
  sha256 "5738c6996c6576539e8c5dea103456d86005b0656b476b9d97c65d468a9e7d97"

  bottle do
    sha1 "f49556768692c346a700382cec6746ee3d425ff3" => :yosemite
    sha1 "e7024a546b9b322a5cdb43703004a93a5dcd21b9" => :mavericks
    sha1 "535532648a4f756a5c20ddda3da12953c7520128" => :mountain_lion
  end

  depends_on "cmake" => :build

  needs :cxx11

  def install
    ENV.cxx11
    system "cmake", ".", "-DBUILD_DOCUMENTATION:BOOL=OFF", *std_cmake_args
    system "make"
    system "make", "install"
  end

  test do
    input = "中国鼠标软件打印机"
    output = shell_output("echo #{input} | #{bin}/opencc")
    output = output.force_encoding("UTF-8") if output.respond_to?(:force_encoding)
    assert_match "中國鼠標軟件打印機", output
  end
end

{'fraction_non_alphanumeric': 0.1100420926037282, 'fraction_numerical': 0.17017438364401682, 'mean_word_length': 4.602693602693603, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '1629453', 'n_tokens_mistral': 871, 'n_tokens_neox': 734, 'n_words': 107}