<commit_before>responses = get_responses(@certificate)

json.certificate do |certificate|
  certificate.version 0.1
  certificate.license "http://opendatacommons.org/licenses/odbl/"
	certificate.title "Open Data Certificate for #{@certificate.response_set.title}"
	certificate.dataset do |dataset|
	  dataset.title @certificate.response_set.title
	  dataset.publisher @certificate.response_set.curator_determined_from_responses
	  dataset.uri dataset_url(@certificate.dataset)
	  responses.each do |k, response|
      if response.count == 1
        response = response[0]
        if response.question.pick == 'none'
          if response.answer.input_type == 'url'
            dataset.set! response.question.reference_identifier, response.statement_text
          else
            dataset.set! response.question.reference_identifier, response.statement_text
          end
        elsif response.question.pick == 'one'
          if response.answer.reference_identifier =~ /false|true/
            dataset.set! response.question.reference_identifier, !!(response.answer.reference_identifier == "true")
          else
            dataset.set! response.question.reference_identifier, "http://schema.theodi.org/certificate/question/#{response.question.reference_identifier}/answer/#{response.answer.reference_identifier}"<commit_msg>Move version and licence out of the certificate<commit_after>responses = get_responses(@certificate)

json.version 0.1
json.license "http://opendatacommons.org/licenses/odbl/"
json.certificate do |certificate|
	certificate.title "Open Data Certificate for #{@certificate.response_set.title}"
	certificate.dataset do |dataset|
	  dataset.title @certificate.response_set.title
	  dataset.publisher @certificate.response_set.curator_determined_from_responses
	  dataset.uri dataset_url(@certificate.dataset)
	  responses.each do |k, response|
      if response.count == 1
        response = response[0]
        if response.question.pick == 'none'
          if response.answer.input_type == 'url'
            dataset.set! response.question.reference_identifier, response.statement_text
          else
            dataset.set! response.question.reference_identifier, response.statement_text
          end
        elsif response.question.pick == 'one'
          if response.answer.reference_identifier =~ /false|true/
            dataset.set! response.question.reference_identifier, !!(response.answer.reference_identifier == "true")
          else
            dataset.set! response.question.reference_identifier, "http://schema.theodi.org/certificate/question/#{response.question.reference_identifier}/answer/#{response.answer.reference_identifier}"
{'fraction_non_alphanumeric': 0.10179640718562874, 'fraction_numerical': 0.0029940119760479044, 'mean_word_length': 3.773214285714286, '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': '4140202', 'n_tokens_mistral': 721, 'n_tokens_neox': 707, 'n_words': 128}