<commit_before>const scores = {
  A: 1, E: 1, I: 1, O: 1, U: 1, L: 1, N: 1, R: 1, S: 1, T: 1,
  D: 2, G: 2,
  B: 3, C: 3, M: 3, P: 3,
  F: 4, H: 4, V: 4, W: 4, Y: 4,
  K: 5,
  J: 8, X: 8,
  Q: 10, Z: 10
}

const score = (word) => {
  if(!word){
    return 0
  }

  return word
    .toUpperCase()
    .split('')
    .map(x => scores[x])
    .reduce((acc, x) => acc + x, 0)
}

export default score<commit_msg>Updating scrabble to be more readable<commit_after>const scores = {
  A: 1, E: 1, I: 1, O: 1, U: 1, L: 1, N: 1, R: 1, S: 1, T: 1,
  D: 2, G: 2,
  B: 3, C: 3, M: 3, P: 3,
  F: 4, H: 4, V: 4, W: 4, Y: 4,
  K: 5,
  J: 8, X: 8,
  Q: 10, Z: 10
}

const score = (word) => {
  if(!word){
    return 0
  }

  return word
    .toUpperCase()
    .split('')
    .map(letter => scores[letter])
    .reduce((total, letterScore) => total + letterScore, 0)
}

export default score
{'fraction_non_alphanumeric': 0.21559633027522937, 'fraction_numerical': 0.06880733944954129, 'mean_word_length': 2.2574626865671643, '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': '3221550', 'n_tokens_mistral': 484, 'n_tokens_neox': 420, 'n_words': 152}