<commit_before>json.partial! "policy", policy: @policy

# More detailed information
json.policy_divisions do
  json.array! @policy.policy_divisions do |pd|
    json.division do
      json.partial! "api/v1/divisions/division", division: pd.division
    end
    json.vote pd.vote_without_strong
    json.strong pd.strong_vote?
  end
end


json.people_comparisons do
  json.array! @policy.policy_person_distances.order(:distance_a) do |ppd|
    json.person do
      json.id ppd.person.id
      member = ppd.person.latest_member
      json.name do
        json.first member.first_name
        json.last member.last_name
      end
      json.electorate member.electorate
      json.house member.australian_house
      json.party member.party
    end
    json.agreement number_with_precision(ppd.agreement_fraction * 100,  precision: 2, significant: true)
    json.voted ppd.voted?
  end
end<commit_msg>Use new partial<commit_after>json.partial! "policy", policy: @policy

# More detailed information
json.policy_divisions do
  json.array! @policy.policy_divisions do |pd|
    json.division do
      json.partial! "api/v1/divisions/division", division: pd.division
    end
    json.vote pd.vote_without_strong
    json.strong pd.strong_vote?
  end
end

json.people_comparisons do
  json.array! @policy.policy_person_distances.order(:distance_a) do |ppd|
    json.person do
      json.partial! "api/v1/people/person", person: ppd.person
    end
    json.agreement number_with_precision(ppd.agreement_fraction * 100,  precision: 2, significant: true)
    json.voted ppd.voted?
  end
end
{'fraction_non_alphanumeric': 0.09062103929024082, 'fraction_numerical': 0.00697084917617237, 'mean_word_length': 3.524355300859599, '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': '6950304', 'n_tokens_mistral': 532, 'n_tokens_neox': 509, 'n_words': 114}