<commit_before>require 'earth'

module Earth
  module EIA
    extend self
    
    def convert_value(value, args = {})
      case value
      when '*'
        0
      when 'Q', 'W'
        nil
      else
        value.to_f.send(args[:from]).to(args[:to])
      end
    end
  end
end<commit_msg>Offer to only convert EIA codes without unit conv.<commit_after>require 'earth'

module Earth
  module EIA
    extend self
    
    def convert_value(value, args = {})
      case value
      when '*'
        0
      when 'Q', 'W'
        nil
      else
        if args[:to]
          value.to_f.send(args[:from]).to(args[:to])
        else
          value.to_f
        end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.0994236311239193, 'fraction_numerical': 0.002881844380403458, 'mean_word_length': 1.6325757575757576, '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': '5956402', 'n_tokens_mistral': 229, 'n_tokens_neox': 226, 'n_words': 62}