<commit_before>CONVERTERS =
  percentage:
    decimal: (value) ->
      parseInt(value, 10) / 100
  date:
    epoch: (value) ->
      new Date(value).getTime()

exports.convert = (fromType, toType, value) ->
  throw "DataConverter can't convert null or undefined values" unless value?

  converter = CONVERTERS[fromType]?[toType]
  unless converter?
    throw "DataConverter doesn't know how to convert '#{fromType}' into '#{toType}'"

  return converter(value)<commit_msg>Make data converter parse floats, not ints<commit_after>CONVERTERS =
  percentage:
    decimal: (value) ->
      parseFloat(value, 10) / 100
  date:
    epoch: (value) ->
      new Date(value).getTime()

exports.convert = (fromType, toType, value) ->
  throw "DataConverter can't convert null or undefined values" unless value?

  converter = CONVERTERS[fromType]?[toType]
  unless converter?
    throw "DataConverter doesn't know how to convert '#{fromType}' into '#{toType}'"

  return converter(value)
{'fraction_non_alphanumeric': 0.1218014329580348, 'fraction_numerical': 0.01023541453428864, 'mean_word_length': 4.067357512953368, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2068018', 'n_tokens_mistral': 322, 'n_tokens_neox': 303, 'n_words': 89}