<commit_before>class YoutubeVideoTools
  DEFAULT_TAGS = 'reverse,funny'

  def self.add_tags_from_youtube_api_video_reponse(youtube_video, youtube_api_video_response)
    if (youtube_api_video_response.key('items') &&
        youtube_api_video_response['items'].kind_of?(Array) &&
        youtube_api_video_response['items'].count > 0 &&
        youtube_api_video_response['items'][0].key('snippet') &&
        youtube_api_video_response['items'][0]['snippet'].key('tags')
    youtube_api_video_response['items'][0]['snippet']['tags'].kind_of?(Array) &&
        youtube_api_video_response['items'][0]['snippet']['tags'].count > 0)
      youtube_video.tags = youtube_api_video_response['items'][0]['snippet']['tags'].join(",") + self::DEFAULT_TAGS
    else
      youtube_video.tags = self::DEFAULT_TAGS
    end
  end
end<commit_msg>Add comma to tags when youtube video has several tags<commit_after>class YoutubeVideoTools
  DEFAULT_TAGS = 'reverse,funny'

  def self.add_tags_from_youtube_api_video_reponse(youtube_video, youtube_api_video_response)
    if (youtube_api_video_response.key('items') &&
        youtube_api_video_response['items'].kind_of?(Array) &&
        youtube_api_video_response['items'].count > 0 &&
        youtube_api_video_response['items'][0].key('snippet') &&
        youtube_api_video_response['items'][0]['snippet'].key('tags')
        youtube_api_video_response['items'][0]['snippet']['tags'].kind_of?(Array) &&
        youtube_api_video_response['items'][0]['snippet']['tags'].count > 0)
      youtube_video.tags = youtube_api_video_response['items'][0]['snippet']['tags'].join(",") + ', ' + self::DEFAULT_TAGS
    else
      youtube_video.tags = self::DEFAULT_TAGS
    end
  end
end
{'fraction_non_alphanumeric': 0.15528312901342672, 'fraction_numerical': 0.008172796263864565, 'mean_word_length': 5.567049808429119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '3365247', 'n_tokens_mistral': 584, 'n_tokens_neox': 546, 'n_words': 60}