<commit_before>require "uri"
require "health_check/check_file_parser"
require "health_check/calculator"

module HealthCheck
  class SearchChecker
    attr_reader :search_client

    def initialize(options = {})
      @test_data_file = options[:test_data]
      @search_client = options[:search_client]
    end

    def run!
      Logging.logger[self].info("Connecting to #{@search_client.to_s}")

      checks.each do |check|
        search_results = search_client.search(check.search_term)[:results]
        result = check.result(search_results)
        calculator.add(result)
      end

      calculator
    end<commit_msg>Minor variable rename for clarity<commit_after>require "uri"
require "health_check/check_file_parser"
require "health_check/calculator"

module HealthCheck
  class SearchChecker
    attr_reader :search_client

    def initialize(options = {})
      @test_data_file = options[:test_data]
      @search_client = options[:search_client]
    end

    def run!
      Logging.logger[self].info("Connecting to #{@search_client.to_s}")

      checks.each do |check|
        search_results = search_client.search(check.search_term)[:results]
        check_result   = check.result(search_results)
        calculator.add(check_result)
      end

      calculator
    end
{'fraction_non_alphanumeric': 0.09190031152647975, 'fraction_numerical': 0.0, 'mean_word_length': 3.5729537366548043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4493225', 'n_tokens_mistral': 388, 'n_tokens_neox': 382, 'n_words': 73}