<commit_before>module GobiertoBudgets
  class SearchEngineConfiguration
    class Year
      def self.last; 2017 end
      def self.first; 2010 end
      def self.all
        @all ||= (first..last).to_a.reverse
      end
      def self.fallback_year?(year)
        year == self.last
      end
    end

    class BudgetCategories
      def self.index; 'tbi-collections' end
      def self.type
        if I18n.locale == :ca
          'c-categorias-presupuestos-municipales-cat'
        else
          'c-categorias-presupuestos-municipales'
        end
      end
    end

    class BudgetLine
      def self.index_forecast; 'budgets-forecast-v3' end
      def self.index_executed; 'budgets-execution-v3' end<commit_msg>Fix fallback year condition<commit_after>module GobiertoBudgets
  class SearchEngineConfiguration
    class Year
      def self.last; 2017 end
      def self.first; 2010 end
      def self.all
        @all ||= (first..last).to_a.reverse
      end
      def self.fallback_year?(year)
        self.last < Date.today.year ? year == self.last + 1 : year == self.last
      end
    end

    class BudgetCategories
      def self.index; 'tbi-collections' end
      def self.type
        if I18n.locale == :ca
          'c-categorias-presupuestos-municipales-cat'
        else
          'c-categorias-presupuestos-municipales'
        end
      end
    end

    class BudgetLine
      def self.index_forecast; 'budgets-forecast-v3' end
      def self.index_executed; 'budgets-execution-v3' end
{'fraction_non_alphanumeric': 0.08377659574468085, 'fraction_numerical': 0.016622340425531915, 'mean_word_length': 2.1485355648535567, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1369290', 'n_tokens_mistral': 505, 'n_tokens_neox': 478, 'n_words': 111}