<commit_before>require 'uri'
require 'uri_template'

module Raml
  class Root
    attr_accessor :children
    attr_accessor :title, :version, :base_uri, :base_uri_parameters,
      :protocols, :media_type, :schemas, :uri_parameters, :documentation, :resources

    def initialize(root_data)
      @children = []

      root_data.each do |key, value|
        if key.start_with?('/')
          @children << Resource.new(key, value)
        elsif key == 'documentation'
          value.each do |document|
            @children << Documentation.new(document["title"], document["content"])
          end
        else
          self.send("#{Raml.underscore(key)}=", value)
        end
      end

      validate
    end

    def document(verbose = false)
      result = ""<commit_msg>The root property is baseUriParameters not uriParameters.<commit_after>require 'uri'
require 'uri_template'

module Raml
  class Root
    attr_accessor :children
    attr_accessor :title, :version, :base_uri, :base_uri_parameters,
      :protocols, :media_type, :schemas, :base_uri_parameters, :documentation, :resources

    def initialize(root_data)
      @children = []

      root_data.each do |key, value|
        if key.start_with?('/')
          @children << Resource.new(key, value)
        elsif key == 'documentation'
          value.each do |document|
            @children << Documentation.new(document["title"], document["content"])
          end
        else
          self.send("#{Raml.underscore(key)}=", value)
        end
      end

      validate
    end

    def document(verbose = false)
      result = ""
{'fraction_non_alphanumeric': 0.11540860885839052, 'fraction_numerical': 0.0, 'mean_word_length': 2.6454545454545455, 'pattern_counts': {'":': 0, '<': 11, '<?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': '7082510', 'n_tokens_mistral': 474, 'n_tokens_neox': 457, 'n_words': 114}