<commit_before>class QueryService

  def initialize(location)
    @location = location
  end

  def query
    return human_location if location_found?
    @location.ip
  end

  private

  def location_found?
    @location.city.present?
  end

  def human_location
    "#{@location.city} #{@location.state}, #{@location.country}"
  end
end
<commit_msg>improve human location string formatting<commit_after>class QueryService

  def initialize(location)
    @location = location
  end

  def query
    return human_location if location_found?
    @location.ip
  end

  private

  def location_found?
    @location.city.present?
  end

  def human_location
    "#{@location.city}, #{@location.state}, #{@location.country}"
  end
end

{'fraction_non_alphanumeric': 0.09178082191780822, 'fraction_numerical': 0.0, 'mean_word_length': 3.59748427672956, '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': '4527136', 'n_tokens_mistral': 230, 'n_tokens_neox': 218, 'n_words': 58}