<commit_before>json.extract! entry, :id, :feed_id, :title, :author, :content
json.summary nil
json.url entry.fully_qualified_url
json.published entry.published.iso8601(6)
json.created_at entry.created_at.iso8601(6)
json.original entry.original if params[:include_original] == 'true'
json.enclosure entry.data if params[:include_enclosure] == 'true'<commit_msg>Content diff option.<commit_after>json.extract! entry, :id, :feed_id, :title, :author, :content
json.summary nil
json.url entry.fully_qualified_url
json.published entry.published.iso8601(6)
json.created_at entry.created_at.iso8601(6)
json.original entry.original if params[:include_original] == 'true'
json.enclosure entry.data if params[:include_enclosure] == 'true'
if params[:include_content_diff] == 'true'
  begin
    before = ContentFormatter.api_format(entry.original['content'], entry)
    json.content_diff HTMLDiff::Diff.new(before, entry.content).inline_html
  rescue
    json.content_diff nil
  end
end
{'fraction_non_alphanumeric': 0.12320328542094455, 'fraction_numerical': 0.02053388090349076, 'mean_word_length': 6.738095238095238, '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': '7477817', 'n_tokens_mistral': 320, 'n_tokens_neox': 310, 'n_words': 66}