<commit_before>module DonorsChooseApi
  class Project
    DEFAULT_KEY = "DONORSCHOOSE"
    ATTRIBUTES = [:proposal_url, :fund_url, :image_url, :title, :short_description, :fulfillment_trailer,
                  :percent_funded, :cost_to_complete, :total_price, :free_shipping, :teacher_name,
                  :grade_level, :poverty_level, :school_name, :city, :zip, :state, :latitude, :state_abbr,
                  :longitude, :state, :subject, :resource_type, :expiration_date, :funding_status, :donors_choose_id
                ]
    attr_accessor :proposal_url, :fund_url, :image_url, :title, :short_description, :fulfillment_trailer,
                  :percent_funded, :cost_to_complete, :total_price, :free_shipping, :teacher_name,
                  :grade_level, :poverty_level, :school_name, :city, :zip, :state, :latitude, :state_abbr,
                  :longitude, :state, :subject, :resource_type, :expiration_date, :funding_status, :donors_choose_id

    def initialize(attributes)
      self.donors_choose_id    = attributes['id']
      self.proposal_url        = attributes['proposalURL']
      self.fund_url            = attributes['fundURL']
      self.image_url           = attributes['imageURL']
      self.title               = attributes['title']
      self.short_description   = attributes['shortDescription']
      self.fulfillment_trailer = attributes['fulfillmentTrailer']
      self.percent_funded      = attributes['percentFunded']
      self.cost_to_complete    = attributes['costToComplete']
      self.total_price         = attributes['totalPrice']
      self.free_shipping       = attributes['freeShipping']
      self.teacher_name        = attributes['teacherName']
      self.grade_level         = attributes['gradeLevel']['name']
      self.poverty_level       = attributes['povertyLevel']
      self.school_name         = attributes['schoolName']
      self.city                = attributes['city']
      self.zip                 = attributes['zip']
      self.state_abbr          = attributes['state']
      self.latitude            = attributes['latitude']
      self.longitude           = attributes['longitude']
      self.state               = attributes['zone']['state']
      self.subject             = attributes['subject']['name']
      self.resource_type       = attributes['resource']['name']
      self.expiration_date     = attributes['expirationDate']
      self.funding_status      = attributes['fundingStatus']
    end

    def self.client
      DonorsChooseApi::Client.new
    end

    def self.parse(link_url)<commit_msg>updated state_abbr method<commit_after>module DonorsChooseApi
  class Project
    DEFAULT_KEY = "DONORSCHOOSE"
    ATTRIBUTES = [:proposal_url, :fund_url, :image_url, :title, :short_description, :fulfillment_trailer,
                  :percent_funded, :cost_to_complete, :total_price, :free_shipping, :teacher_name,
                  :grade_level, :poverty_level, :school_name, :city, :zip, :state, :latitude, :state_abbr,
                  :longitude, :state, :subject, :resource_type, :expiration_date, :funding_status, :donors_choose_id
                ]
    attr_accessor :proposal_url, :fund_url, :image_url, :title, :short_description, :fulfillment_trailer,
                  :percent_funded, :cost_to_complete, :total_price, :free_shipping, :teacher_name,
                  :grade_level, :poverty_level, :school_name, :city, :zip, :state, :latitude, :state_abbr,
                  :longitude, :state, :subject, :resource_type, :expiration_date, :funding_status, :donors_choose_id

    def initialize(attributes)
      self.donors_choose_id    = attributes['id']
      self.proposal_url        = attributes['proposalURL']
      self.fund_url            = attributes['fundURL']
      self.image_url           = attributes['imageURL']
      self.title               = attributes['title']
      self.short_description   = attributes['shortDescription']
      self.fulfillment_trailer = attributes['fulfillmentTrailer']
      self.percent_funded      = attributes['percentFunded']
      self.cost_to_complete    = attributes['costToComplete']
      self.total_price         = attributes['totalPrice']
      self.free_shipping       = attributes['freeShipping']
      self.teacher_name        = attributes['teacherName']
      self.grade_level         = attributes['gradeLevel']['name']
      self.poverty_level       = attributes['povertyLevel']
      self.school_name         = attributes['schoolName']
      self.city                = attributes['city']
      self.zip                 = attributes['zip']
      self.state_abbr          = attributes['state']
      self.latitude            = attributes['latitude']
      self.longitude           = attributes['longitude']
      self.state               = attributes['zone']['name']
      self.subject             = attributes['subject']['name']
      self.resource_type       = attributes['resource']['name']
      self.expiration_date     = attributes['expirationDate']
      self.funding_status      = attributes['fundingStatus']
    end

    def self.client
      DonorsChooseApi::Client.new
    end

    def self.parse(link_url)
{'fraction_non_alphanumeric': 0.11087420042643924, 'fraction_numerical': 0.0, 'mean_word_length': 2.7256317689530687, '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': '2733924', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1446, 'n_words': 239}