<commit_before>require "twitter"

class TweeterSearch

  def initialize
    @client = Twitter::REST::Client.new do |config|
      config.consumer_key    = "<KEY>"
      config.consumer_secret = "<KEY>"
    end
  end

  def search(domain)
    @client.search(domain, :result_type => "recent").to_a
  end

end<commit_msg>added a bit of documentation to tweeter_search<commit_after>require "twitter"

###
# Wrapper on top of the twitter gem, provides searching of terms.
###
class TweeterSearch

  def initialize
    @client = Twitter::REST::Client.new do |config|
      config.consumer_key    = "<KEY>"
      config.consumer_secret = "<KEY>"
    end
  end

  ###
  # returns an array of tweet results given a search term
  ###
  def search(domain)
    @client.search(domain, :result_type => "recent").to_a
  end

end
{'fraction_non_alphanumeric': 0.11562115621156212, 'fraction_numerical': 0.0, 'mean_word_length': 3.4972375690607733, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7033616', 'n_tokens_mistral': 265, 'n_tokens_neox': 250, 'n_words': 72}