<commit_before>require 'rubygems'
require "httparty"

class Hunchy

  include HTTParty
  base_uri 'http://api.hunch.com/api'
  default_params :output => 'json'
  format :json
  
  # This will return information pertaining to a Hunch question.
  def self.getQuestion(id)
    get('/getQuestion', :query => {:questionId => id})
  end

  # This will return information pertaining to a response to a question.
  def self.getResponse(id)
    get('/getResponse', :query => {:responseId => id})
  end

  def self.searchForQuestion(query)
    get('/searchForQuestion', :query => {:query => query})
  end

end<commit_msg>remaining available API calls as of this morning<commit_after>require 'rubygems'
require "httparty"

class Hunchy

  include HTTParty
  base_uri 'http://api.hunch.com/api'
  default_params :output => 'json'
  format :json
  
  # This will return information pertaining to a Hunch question.
  def self.getQuestion(id)
    get('/getQuestion', :query => {:questionId => id})
  end

  # This will return information pertaining to a response to a question.
  def self.getResponse(id)
    get('/getResponse', :query => {:responseId => id})
  end

  # This will return question search results for the query you give it.
  def self.searchForQuestion(query)
    get('/searchForQuestion', :query => {:query => query})
  end
  
  # This will return statistical information pertaining to a given THAY Hunch response.
  def self.responseStats(id)
    get('/responseStats', :query => {:responseId => id})
  end
  
  # This will return statistical information pertaining to the relationship between two THAY Hunch response.
  def self.responsePairStats(id1, id2)
    get('/responsePairStats', :query => {:response1Id => id1, :response2Id => id2})
  end

  # This will return the THAY responses most strongly positively correlated to a given THAY response.
  def self.responsePositiveCorrelations(id, n)
    get('/responsePositiveCorrelations', :query => {:responseId => id, :n => n})
  end

  # This will return the THAY responses most strongly negatively correlated to a given THAY response.
  def self.responseNegativeCorrelations(id, n)
    get('/responseNegativeCorrelations', :query => {:responseId => id, :n => n})
  end
  
end
{'fraction_non_alphanumeric': 0.10991475998205473, 'fraction_numerical': 0.0026917900403768506, 'mean_word_length': 4.091324200913242, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 28, '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': '1621581', 'n_tokens_mistral': 674, 'n_tokens_neox': 637, 'n_words': 225}