<commit_before>class Ocrmypdf < Formula
  include Language::Python::Virtualenv

  desc "Adds an OCR text layer to scanned PDF files"
  homepage "https://github.com/jbarlow83/OCRmyPDF"
  url "https://files.pythonhosted.org/packages/c3/e1/bab4844da8f43aec32d89d9813c245dc4d6887612d1b7f9c4d17f8204a8c/ocrmypdf-13.1.1.tar.gz"
  sha256 "562bd3c7c2e9d4f3c8b7ef5c4e04b2de8a4c2941e05aea31ad091a3f3d1be7ac"
  license "MPL-2.0"

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "0406167963bba7125b5f443443b3a6d327e95698fd0d1f64b11fd75512ae0600"
    sha256 cellar: :any,                 arm64_big_sur:  "98eb29edd13db59b2a6e3ca8f24ab0215118d506a3171dc0802066f1d28684a1"
    sha256 cellar: :any,                 monterey:       "968c944cecdfd0138b0a18db7a26703ae297330adf506bce40e620b370ba03b8"
    sha256 cellar: :any,                 big_sur:        "8dec2f13e78f3890a41311322d46a6e57f0a1fbbfc81295fe0138f42c8b43f31"
    sha256 cellar: :any,                 catalina:       "10090687e24bf91c8f5cd4c12731ac38dd62eb876d8c21f1106a9cb70cc3d5b8"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "1cabfffb5a97453b4ba1e3856035b59601c633d39efd5082a3fe4ba73d79e0ff"
  end

  depends_on "pkg-config" => :build
  depends_on "rust" => :build
  depends_on "ghostscript"
  depends_on "jbig2enc"
  depends_on "leptonica"
  depends_on "libffi"
  depends_on "libpng"
  depends_on "pillow"
  depends_on "pngquant"
  depends_on "pybind11"
  depends_on "python@3.9"
  depends_on "qpdf"
  depends_on "tesseract"
  depends_on "unpaper"

  uses_from_macos "libxml2"
  uses_from_macos "libxslt"

  on_linux do
    depends_on "gcc"
  end

  fails_with gcc: "5"

  resource "cffi" do
    url "https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.tar.gz"
    sha256 "920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"
  end
<commit_msg>ocrmypdf: drop unneeded dependency on leptonica<commit_after>class Ocrmypdf < Formula
  include Language::Python::Virtualenv

  desc "Adds an OCR text layer to scanned PDF files"
  homepage "https://github.com/jbarlow83/OCRmyPDF"
  url "https://files.pythonhosted.org/packages/c3/e1/bab4844da8f43aec32d89d9813c245dc4d6887612d1b7f9c4d17f8204a8c/ocrmypdf-13.1.1.tar.gz"
  sha256 "562bd3c7c2e9d4f3c8b7ef5c4e04b2de8a4c2941e05aea31ad091a3f3d1be7ac"
  license "MPL-2.0"

  bottle do
    sha256 cellar: :any,                 arm64_monterey: "0406167963bba7125b5f443443b3a6d327e95698fd0d1f64b11fd75512ae0600"
    sha256 cellar: :any,                 arm64_big_sur:  "98eb29edd13db59b2a6e3ca8f24ab0215118d506a3171dc0802066f1d28684a1"
    sha256 cellar: :any,                 monterey:       "968c944cecdfd0138b0a18db7a26703ae297330adf506bce40e620b370ba03b8"
    sha256 cellar: :any,                 big_sur:        "8dec2f13e78f3890a41311322d46a6e57f0a1fbbfc81295fe0138f42c8b43f31"
    sha256 cellar: :any,                 catalina:       "10090687e24bf91c8f5cd4c12731ac38dd62eb876d8c21f1106a9cb70cc3d5b8"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "1cabfffb5a97453b4ba1e3856035b59601c633d39efd5082a3fe4ba73d79e0ff"
  end

  depends_on "pkg-config" => :build
  depends_on "rust" => :build
  depends_on "ghostscript"
  depends_on "jbig2enc"
  depends_on "libffi"
  depends_on "libpng"
  depends_on "pillow"
  depends_on "pngquant"
  depends_on "pybind11"
  depends_on "python@3.9"
  depends_on "qpdf"
  depends_on "tesseract"
  depends_on "unpaper"

  uses_from_macos "libxml2"
  uses_from_macos "libxslt"

  on_linux do
    depends_on "gcc"
  end

  fails_with gcc: "5"

  resource "cffi" do
    url "https://files.pythonhosted.org/packages/00/9e/92de7e1217ccc3d5f352ba21e52398372525765b2e0c4530e6eb2ba9282a/cffi-1.15.0.tar.gz"
    sha256 "920f0d66a896c2d99f0adbb391f990a84091179542c205fa53ce5787aff87954"
  end

{'fraction_non_alphanumeric': 0.07503267973856209, 'fraction_numerical': 0.23790849673202613, 'mean_word_length': 4.465714285714285, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3349600', 'n_tokens_mistral': 2210, 'n_tokens_neox': 1782, 'n_words': 215}