<commit_before>require 'bundler/setup'
require "adjective_animal/version"

module AdjectiveAnimal


  def self.new(options={})
    self::AdjAni.new(options)
  end

  def self.all
    out = Array.new
    ('a'..'z').to_a.each do |l|
      out.push(self.new(l.to_s))
    end
    out
  end


  class AdjAni


    FIELDS = [:adjective, :animal, :full, :starts_with, :the]
    attr_accessor(*FIELDS)

    def initialize(options={})
      if options.is_a?(String) || options.is_a?(Symbol)
        options.length == 1 ? self.starts_with = options.downcase.to_s : self.starts_with = nil
      end
      if options.is_a?(Hash)
        sym_opts = symbolize_hash(options) #.map { |k, v| [k.to_sym, v] }.to_h
        if sym_opts.has_key?(:starts_with)
          sym_opts[:starts_with].length == 1 ? self.starts_with = sym_opts[:starts_with].downcase.to_sym : self.starts_with = nil
        end
      end
      generate_aa
    end

    def generate_aa
      self.adjective = AdjectiveAnimal::AdjAni.humanize(AdjectiveAnimal::AdjAni.get_adjective(self.starts_with))
      self.animal = AdjectiveAnimal::AdjAni.humanize(AdjectiveAnimal::AdjAni.get_animal(self.starts_with))
      self
    end

    def adj
      self.adjective
    end

    alias first_name adj

    def ani
      self.animal
    end

    alias last_name ani

    def to_s
      "#{self.adjective} #{self.animal}"
    end

    private<commit_msg>cleanup<commit_after>require 'bundler/setup'
require "adjective_animal/version"

module AdjectiveAnimal


  def self.new(options={})
    self::AdjAni.new(options)
  end

  def self.all
    out = Array.new
    ('a'..'z').to_a.each do |l|
      out.push(self.new(l.to_s))
    end
    out
  end


  class AdjAni


    FIELDS = [:adjective, :animal, :full, :starts_with, :the]
    attr_accessor(*FIELDS)

    def initialize(options={})
      if options.is_a?(String) || options.is_a?(Symbol)
        options.length == 1 ? self.starts_with = options.downcase.to_s : self.starts_with = nil
      end
      if options.is_a?(Hash)
        sym_opts = symbolize_hash(options)
        if sym_opts.has_key?(:starts_with)
          sym_opts[:starts_with].length == 1 ? self.starts_with = sym_opts[:starts_with].downcase.to_sym : self.starts_with = nil
        end
      end
      generate_aa
    end

    def generate_aa
      self.adjective = AdjectiveAnimal::AdjAni.humanize(AdjectiveAnimal::AdjAni.get_adjective(self.starts_with))
      self.animal = AdjectiveAnimal::AdjAni.humanize(AdjectiveAnimal::AdjAni.get_animal(self.starts_with))
      self
    end

    def adj
      self.adjective
    end

    alias first_name adj

    def ani
      self.animal
    end

    alias last_name ani

    def to_s
      "#{self.adjective} #{self.animal}"
    end

    private
{'fraction_non_alphanumeric': 0.11345454545454546, 'fraction_numerical': 0.0014545454545454545, 'mean_word_length': 2.7633378932968538, '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': '81933', 'n_tokens_mistral': 1058, 'n_tokens_neox': 987, 'n_words': 177}