<commit_before># Extracts the title of the page from a text/html response
class InformationExtractors::TitleExtractor < InformationExtractor

  def extract( response )
    Nokogiri.parse(response).css("title").first.text
  end

end<commit_msg>title_extractor should only extract the title if the title exists<commit_after># Extracts the title of the page from a text/html response
class InformationExtractors::TitleExtractor < InformationExtractor

  def extract( response )
    title = Nokogiri.parse(response).css("title").first
    title.text if title
  end

end
{'fraction_non_alphanumeric': 0.07256637168141593, 'fraction_numerical': 0.0, 'mean_word_length': 5.21978021978022, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5997860', 'n_tokens_mistral': 156, 'n_tokens_neox': 153, 'n_words': 52}