<commit_before>#!/usr/bin/env ruby

require 'yaml'

# The primary namespace for genregen.
module GenreGen
	# release version
	VERSION = "0.0.6".freeze

	# data hash
	DATA = YAML::load_file(File.join(File.dirname(__FILE__), 'data.yml'))

	# Generates a new genre.
	# @example
	#  GenreGen.generate # => "Soft smooth ethno-baroque"
	# @return [String] a new genre
	def self.generate
		template = DATA['templates'].sample
		fill_template(template).capitalize
	end

	private

	def self.fill_template(template)
		template % {
			adjective: adjective,
			genre: genre,
			prefix: prefix,
			suffix: suffix
		}
	end

	def self.adjective
		DATA['adjectives'].sample(rand(1..3)).join(' ')<commit_msg>genregen 0.0.7.<commit_after>#!/usr/bin/env ruby

require 'yaml'

# The primary namespace for genregen.
module GenreGen
	# release version
	VERSION = "0.0.7".freeze

	# data hash
	DATA = YAML::load_file(File.join(File.dirname(__FILE__), 'data.yml'))

	# Generates a new genre.
	# @example
	#  GenreGen.generate # => "Soft smooth ethno-baroque"
	# @return [String] a new genre
	def self.generate
		template = DATA['templates'].sample
		fill_template(template).capitalize
	end

	private

	def self.fill_template(template)
		template % {
			adjective: adjective,
			genre: genre,
			prefix: prefix,
			suffix: suffix
		}
	end

	def self.adjective
		DATA['adjectives'].sample(rand(1..3)).join(' ')
{'fraction_non_alphanumeric': 0.13367052023121387, 'fraction_numerical': 0.00939306358381503, 'mean_word_length': 3.96415770609319, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2077809', 'n_tokens_mistral': 541, 'n_tokens_neox': 481, 'n_words': 113}