<commit_before>module Vim
  module Flavor
    class FlavorFile
      # repo_name -> flavor
      def flavor_table
        @flavor_table ||= {}
      end

      def default_groups
        @default_groups ||= [:default]
      end

      def self.load(flavorfile_path)
        ff = new()
        ff.load(flavorfile_path)
        ff
      end

      def load(flavorfile_path)
        instance_eval(
          File.open(flavorfile_path, 'r').read(),
          flavorfile_path
        )
      end

      # :call-seq:
      #   flavor repo_name, version_constraint='>= 0', options={} -> a_flavor
      def flavor(repo_name, *args)
        a = args.shift()
        if a.kind_of?(String)
          version_constraint = a
          a = args.shift()
        else
          version_constraint = '>= 0'
        end<commit_msg>Define FlavorFile#default_group<commit_after>module Vim
  module Flavor
    class FlavorFile
      # repo_name -> flavor
      def flavor_table
        @flavor_table ||= {}
      end

      def default_groups
        @default_groups ||= [:default]
      end

      def default_group
        default_groups.last
      end

      def self.load(flavorfile_path)
        ff = new()
        ff.load(flavorfile_path)
        ff
      end

      def load(flavorfile_path)
        instance_eval(
          File.open(flavorfile_path, 'r').read(),
          flavorfile_path
        )
      end

      # :call-seq:
      #   flavor repo_name, version_constraint='>= 0', options={} -> a_flavor
      def flavor(repo_name, *args)
        a = args.shift()
        if a.kind_of?(String)
          version_constraint = a
          a = args.shift()
        else
          version_constraint = '>= 0'
        end
{'fraction_non_alphanumeric': 0.09607498535442296, 'fraction_numerical': 0.0023432923257176333, 'mean_word_length': 1.7284345047923322, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '3801840', 'n_tokens_mistral': 538, 'n_tokens_neox': 523, 'n_words': 110}