<commit_before>class Vectorscan < Formula
  desc "High-performance regular expression matching library"
  homepage "https://github.com/VectorCamp/vectorscan"
  url "https://github.com/VectorCamp/vectorscan/archive/refs/tags/vectorscan/5.4.7.tar.gz"
  sha256 "cd70c2a7bf632b5374083a450019703605520c10c5614a4c12011c99ab8435dd"
  license "BSD-3-Clause"

  bottle do
    sha256 cellar: :any, arm64_monterey: "abe4b344d8deccfef0b799220de4f167f9f4bf7036cab75a5046c709fffc36a1"
    sha256 cellar: :any, arm64_big_sur:  "dd42e4b9620e17d37f250beb78be6cdc8547b78a38d02bcf838fd5f986f8fb04"
  end

  depends_on "boost" => :build
  depends_on "cmake" => :build
  depends_on "pcre" => :build
  depends_on "pkg-config" => :build
  depends_on "ragel" => :build
  depends_on arch: :arm64

  def install
    cmake_args = [
      "-DBUILD_STATIC_AND_SHARED=ON",
      "-DPYTHON_EXECUTABLE:FILEPATH=python3",
    ]

    system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args
    system "cmake", "--build", "build"
    system "cmake", "--install", "build"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <hs/hs.h>
      int main()
      {
        printf("hyperscan v%s", hs_version());
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test"
    assert_match "hyperscan v#{version}", shell_output("./test")
  end
end
<commit_msg>vectorscan 5.4.8<commit_after>class Vectorscan < Formula
  desc "High-performance regular expression matching library"
  homepage "https://github.com/VectorCamp/vectorscan"
  url "https://github.com/VectorCamp/vectorscan/archive/refs/tags/vectorscan/5.4.8.tar.gz"
  sha256 "71fae7ee8d63e1513a6df762cdb5d5f02a9120a2422cf1f31d57747c2b8d36ab"
  license "BSD-3-Clause"

  bottle do
    sha256 cellar: :any, arm64_monterey: "abe4b344d8deccfef0b799220de4f167f9f4bf7036cab75a5046c709fffc36a1"
    sha256 cellar: :any, arm64_big_sur:  "dd42e4b9620e17d37f250beb78be6cdc8547b78a38d02bcf838fd5f986f8fb04"
  end

  depends_on "boost" => :build
  depends_on "cmake" => :build
  depends_on "pcre" => :build
  depends_on "pkg-config" => :build
  depends_on "ragel" => :build
  depends_on arch: :arm64

  def install
    cmake_args = [
      "-DBUILD_STATIC_AND_SHARED=ON",
      "-DPYTHON_EXECUTABLE:FILEPATH=python3",
    ]

    system "cmake", "-S", ".", "-B", "build", *cmake_args, *std_cmake_args
    system "cmake", "--build", "build"
    system "cmake", "--install", "build"
  end

  test do
    (testpath/"test.c").write <<~EOS
      #include <stdio.h>
      #include <hs/hs.h>
      int main()
      {
        printf("hyperscan v%s", hs_version());
        return 0;
      }
    EOS
    system ENV.cc, "test.c", "-I#{include}", "-L#{lib}", "-lhs", "-o", "test"
    assert_match "hyperscan v#{version}", shell_output("./test")
  end
end

{'fraction_non_alphanumeric': 0.14640980735551665, 'fraction_numerical': 0.09527145359019265, 'mean_word_length': 3.744186046511628, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '4853046', 'n_tokens_mistral': 1307, 'n_tokens_neox': 1167, 'n_words': 199}