<commit_before>require 'pathname'

module JSON
  class Schema

    attr_accessor :schema, :uri, :validator

    def initialize(schema,uri,parent_validator=nil)
      @schema = schema
      @uri = uri

      # If there is an ID on this schema, use it to generate the URI
      if @schema['id'] && @schema['id'].kind_of?(String)
        temp_uri = Addressable::URI.parse(@schema['id'])
        if temp_uri.relative?
          uri += Addressable::URI.parse(@schema['id'])
          temp_uri = uri
        end
        @uri = temp_uri<commit_msg>Not sure why we're parsing uris twice here<commit_after>require 'pathname'

module JSON
  class Schema

    attr_accessor :schema, :uri, :validator

    def initialize(schema,uri,parent_validator=nil)
      @schema = schema
      @uri = uri

      # If there is an ID on this schema, use it to generate the URI
      if @schema['id'] && @schema['id'].kind_of?(String)
        temp_uri = Addressable::URI.parse(@schema['id'])
        if temp_uri.relative?
          temp_uri = uri + temp_uri
        end
        @uri = temp_uri
{'fraction_non_alphanumeric': 0.11246485473289597, 'fraction_numerical': 0.0, 'mean_word_length': 2.734265734265734, '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': '5686675', 'n_tokens_mistral': 325, 'n_tokens_neox': 322, 'n_words': 93}