<commit_before>class Sunlight::Influence::EntityTest < OpenStruct
  attr_accessor :result
  extend CallConstructor

  def self.search(name)
    foo = search_format(name)
    bar = uri_builder(foo)
    sunlight_call(bar)
  end

  def self.find_politician(name)
    type = "politician"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_individual(name)
    type = "individual"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_organization(name)
    type = "organization"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_industry(name)
    type = "industry"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

end<commit_msg>Add entity overview method to entity<commit_after>class Sunlight::Influence::EntityTest < OpenStruct
  extend CallConstructor

  def self.search(name)
    foo = search_format(name)
    bar = uri_builder(foo)
    sunlight_call(bar)
  end

  def self.find_politician(name)
    type = "politician"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_individual(name)
    type = "individual"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_organization(name)
    type = "organization"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.find_industry(name)
    type = "industry"
    foo = search_format(name)
    bar = uri_builder(foo, type)
    sunlight_call(bar)
  end

  def self.retrieve_overview(entity_id, cycle)
    uri = URI("#{Sunlight::Influence::BASE_URI}/entities/#{entity_id}.json?cycle=#{cycle}&apikey=#{Sunlight::Influence.api_key}")
    JSON.load(Net:HTTP.get(uri))["results"].collect{|json| new(json)}
  end

end
{'fraction_non_alphanumeric': 0.10944759938048529, 'fraction_numerical': 0.0, 'mean_word_length': 3.8208955223880596, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1773642', 'n_tokens_mistral': 684, 'n_tokens_neox': 666, 'n_words': 130}