<commit_before>package fr.lium
package util

package object conversion {
  def parseIntOption(str: String): Option[Int] = try {
    Some(java.lang.Integer.parseInt(str))
  }

  def parseFloatOption(str: String): Option[Float] = try {
    Some(java.lang.Float.parseFloat(str))
  }
}<commit_msg>Use scala Try to catch exceptions in Conversions<commit_after>package fr.lium
package util

import scala.util.Try

package object conversion {
  def parseIntOption(str: String): Option[Int] =
    Try(java.lang.Integer.parseInt(str)).toOption

  def parseFloatOption(str: String): Option[Float] =
    Try(java.lang.Float.parseFloat(str)).toOption
}
{'fraction_non_alphanumeric': 0.11875, 'fraction_numerical': 0.0, 'mean_word_length': 4.990654205607477, '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': '6508373', 'n_tokens_mistral': 203, 'n_tokens_neox': 201, 'n_words': 45}