<commit_before>class TalentsController < ApplicationController
	include Utils
	protect_from_forgery with: :exception

	def talents_by_class
		@title = "Talents"
		@description = "WoW PvP leaderboard talent choices"

		@heading = "Select a Class"
		@classes = Classes.list
		@class_slug = slugify params[:class]
		if @class_slug
			if !@classes.key?(@class_slug)
				redirect_to "/talents"
				return nil
			end
			@clazz = @classes[@class_slug]["name"]
			@title = "#{@clazz} Talents"
			@heading = "Select a Specialization"
		end

		@specs = Specs.list
		@spec_slug = slugify params[:spec]
		if @spec_slug
			spec_slugs = Specs.slugs
			full_slug = "#{@class_slug}_#{@spec_slug}"
			if !spec_slugs.key?(full_slug)
				redirect_to "/talents/#{@class_slug}"
				return nil
			end
			@spec = spec_slugs[full_slug]["name"]
			@title = "#{@spec} #{@clazz} Talents"
			@heading = @title

			class_id = @classes[@class_slug]["id"]
			spec_id = spec_slugs[full_slug]["id"]
			@counts = talent_counts(class_id, spec_id)
			@total = total_count(class_id, spec_id)
			@class_talents = Talents.get_talents class_id
		end
	end

	private
<commit_msg>include class/spec in description<commit_after>class TalentsController < ApplicationController
	include Utils
	protect_from_forgery with: :exception

	def talents_by_class
		@title = "Talents"
		@description = "WoW PvP leaderboard talent choices"

		@heading = "Select a Class"
		@classes = Classes.list
		@class_slug = slugify params[:class]
		if @class_slug
			if !@classes.key?(@class_slug)
				redirect_to "/talents"
				return nil
			end
			@clazz = @classes[@class_slug]["name"]
			@title = "#{@clazz} Talents"
			@description = @title
			@heading = "Select a Specialization"
		end

		@specs = Specs.list
		@spec_slug = slugify params[:spec]
		if @spec_slug
			spec_slugs = Specs.slugs
			full_slug = "#{@class_slug}_#{@spec_slug}"
			if !spec_slugs.key?(full_slug)
				redirect_to "/talents/#{@class_slug}"
				return nil
			end
			@spec = spec_slugs[full_slug]["name"]
			@title = "#{@spec} #{@clazz} Talents"
			@description = @title
			@heading = @title

			class_id = @classes[@class_slug]["id"]
			spec_id = spec_slugs[full_slug]["id"]
			@counts = talent_counts(class_id, spec_id)
			@total = total_count(class_id, spec_id)
			@class_talents = Talents.get_talents class_id
		end
	end

	private

{'fraction_non_alphanumeric': 0.12755972696245735, 'fraction_numerical': 0.0, 'mean_word_length': 4.199556541019955, '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': '1065510', 'n_tokens_mistral': 990, 'n_tokens_neox': 883, 'n_words': 183}