<commit_before>require 'aws-sdk-resources'
require 'json'

class Listener
  ADVERBS=%w(happily neutrally angrily)
  VERBS=%w(spoke said emitted articulated related uttered voiced expressed communicated)

  def self.run(queue_url)
    poller = Aws::SQS::QueuePoller.new(queue_url)
    poller.poll do |msg|
      msg_hash = JSON.parse(msg.body)
      sent_ts = Time.strptime(msg_hash['ts'], '%FT%T%:z')
      delay = Time.now - sent_ts
      sent_by = msg_hash['sent_by']<commit_msg>Add adverbs and verbs<commit_after>require 'aws-sdk-resources'
require 'json'

class Listener
  ADVERBS=%w(happily neutrally angrily deviously sarcastically)
  VERBS=%w(spoke said emitted articulated related uttered voiced expressed communicated opined)

  def self.run(queue_url)
    poller = Aws::SQS::QueuePoller.new(queue_url)
    poller.poll do |msg|
      msg_hash = JSON.parse(msg.body)
      sent_ts = Time.strptime(msg_hash['ts'], '%FT%T%:z')
      delay = Time.now - sent_ts
      sent_by = msg_hash['sent_by']
{'fraction_non_alphanumeric': 0.11788211788211789, 'fraction_numerical': 0.0, 'mean_word_length': 4.358288770053476, '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': '7080966', 'n_tokens_mistral': 366, 'n_tokens_neox': 341, 'n_words': 75}