<commit_before>module MListingChange
  include PgArrayParser

  def self.included(base)
    base.class_eval do
      belongs_to :designation
      belongs_to :taxon_concept, :class_name => 'MTaxonConcept'
      belongs_to :listing_change, :foreign_key => :id
      belongs_to :event
      translates :short_note, :full_note, :hash_full_note,
        :inherited_short_note, :inherited_full_note, :auto_note
    end
  end

  def effective_at_formatted
    effective_at.strftime("%d/%m/%Y")
  end

  def full_hash_ann_symbol
    "#{hash_ann_parent_symbol}#{hash_ann_symbol}"
  end

  def countries_ids
    if respond_to?(:countries_ids_ary) && countries_ids_ary?
      parse_pg_array(countries_ids_ary || '').compact
    elsif respond_to? :lc_countries_ids_ary
      parse_pg_array(lc_countries_ids_ary || '').compact
    else
      []
    end
  end

  def countries_iso_codes
    CountryDictionary.instance.get_iso_codes_by_ids(countries_ids).compact
  end

  def countries_full_names
    CountryDictionary.instance.get_names_by_ids(countries_ids).compact
  end<commit_msg>disable fallback to EN locale for short & full note<commit_after>module MListingChange
  include PgArrayParser

  def self.included(base)
    base.class_eval do
      belongs_to :designation
      belongs_to :taxon_concept, :class_name => 'MTaxonConcept'
      belongs_to :listing_change, :foreign_key => :id
      belongs_to :event
      translates :short_note, fallback: false
      translates :full_note, fallback: false
      translates :hash_full_note, :inherited_short_note, :inherited_full_note,
        :auto_note
    end
  end

  def effective_at_formatted
    effective_at.strftime("%d/%m/%Y")
  end

  def full_hash_ann_symbol
    "#{hash_ann_parent_symbol}#{hash_ann_symbol}"
  end

  def countries_ids
    if respond_to?(:countries_ids_ary) && countries_ids_ary?
      parse_pg_array(countries_ids_ary || '').compact
    elsif respond_to? :lc_countries_ids_ary
      parse_pg_array(lc_countries_ids_ary || '').compact
    else
      []
    end
  end

  def countries_iso_codes
    CountryDictionary.instance.get_iso_codes_by_ids(countries_ids).compact
  end

  def countries_full_names
    CountryDictionary.instance.get_names_by_ids(countries_ids).compact
  end
{'fraction_non_alphanumeric': 0.07791629563668745, 'fraction_numerical': 0.0, 'mean_word_length': 4.1068181818181815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2243383', 'n_tokens_mistral': 779, 'n_tokens_neox': 758, 'n_words': 133}