<commit_before>is_root = false unless local_assigns.has_key?(:is_root)

parent_xml.tag! "model",
core_xlink(model).merge(is_root ? xml_root_attributes : {}),
                :resourceType => "Model" do
  
  render :partial=>"api/standard_elements",:locals=>{:parent_xml => parent_xml,:is_root=>is_root,:object=>model}
  if (is_root)
    associated_resources_xml parent_xml,model
  end
end<commit_msg>added model_type, model_format and environment for models<commit_after>is_root = false unless local_assigns.has_key?(:is_root)

parent_xml.tag! "model",
core_xlink(model).merge(is_root ? xml_root_attributes : {}),
                :resourceType => "Model" do
  
  render :partial=>"api/standard_elements",:locals=>{:parent_xml => parent_xml,:is_root=>is_root,:object=>model}
  if (is_root)
    parent_xml.tag! "model_type",model.model_type.title,core_xlink(model.model_type) unless model.model_type.nil?
    parent_xml.tag! "model_format",model.model_format.title,core_xlink(model.model_format) unless model.model_format.nil?
    parent_xml.tag! "environment",model.recommended_environment.title,core_xlink(model.recommended_environment) unless model.recommended_environment.nil?
    associated_resources_xml parent_xml,model     
  end
end
{'fraction_non_alphanumeric': 0.1234866828087167, 'fraction_numerical': 0.0, 'mean_word_length': 6.209302325581396, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 15}, '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': '2874593', 'n_tokens_mistral': 420, 'n_tokens_neox': 414, 'n_words': 57}