<commit_before>class Morse < Linkbot::Plugin

  Linkbot::Plugin.register('morse', self, {
    :message => {:regex => /\A[\s\/\.-]+\z/i, :handler => :on_message}
  })

  def self.on_message(message, matches)
    morse_map = {
      '.-'   => 'A', '-...' => 'B', '-.-.' => 'C', '-..'  => 'D', '.'    => 'E',
      '..-.' => 'F', '--.'  => 'G', '....' => 'H', '..'   => 'I', '.---' => 'J',
      '-.-'  => 'K', '.-..' => 'L', '--'   => 'M', '-.'   => 'N', '---'  => 'O',
      '.--.' => 'P', '--.-' => 'Q', '.-.'  => 'R', '...'  => 'S', '-'    => 'T',
      '..-'  => 'U', '...-' => 'V', '.--'  => 'W', '-..-' => 'X', '-.--' => 'Y',
      '--..' => 'Z', '/'    => ' '
    }

    translation = message.body.split(' ').map {|code| morse_map[code]}.join
    "Translated: #{translation}"
  end

end

<commit_msg>How will you talk to that ho-o-o-o-orse?<commit_after>class Morse < Linkbot::Plugin

  Linkbot::Plugin.register('morse', self, {
    :message => {:regex => /\A[\s\/\.-]+\z/i, :handler => :on_message}
  })

  def self.on_message(message, matches)
    morse_map = {
      '.-'   => 'A', '-...' => 'B', '-.-.' => 'C', '-..'  => 'D', '.'    => 'E',
      '..-.' => 'F', '--.'  => 'G', '....' => 'H', '..'   => 'I', '.---' => 'J',
      '-.-'  => 'K', '.-..' => 'L', '--'   => 'M', '-.'   => 'N', '---'  => 'O',
      '.--.' => 'P', '--.-' => 'Q', '.-.'  => 'R', '...'  => 'S', '-'    => 'T',
      '..-'  => 'U', '...-' => 'V', '.--'  => 'W', '-..-' => 'X', '-.--' => 'Y',
      '--..' => 'Z', '/'    => ' '
    }

    translation = message.body.split(' ').map {|code| morse_map[code]}.join
    "Mo-o-o-o-orse: #{translation}"
  end

end


{'fraction_non_alphanumeric': 0.4225609756097561, 'fraction_numerical': 0.0, 'mean_word_length': 1.6006339144215531, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 63, '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': '1407372', 'n_tokens_mistral': 728, 'n_tokens_neox': 703, 'n_words': 104}