<commit_before>'use strict'

// dynamically edit nodes

// remove the created form element
const removeNode = () => {
  const parentEl = document.getElementById('info-nodes-id')
  const formEl = document.getElementById('form-id')
  if (formEl !== null) {
    parentEl.removeChild(formEl)
  }
}

// create the form element
const formNode = (selectedNode) => {
  const htmlElement = document.getElementById('info-nodes-id')
  const form = document.createElement('form')
  form.className = 'bubble'
  form.id = 'form-id'

  let label = ''
  let input = ''
  let inputIds = []

  const nodeData = selectedNode.data().info
  Object.keys(nodeData).map((key) => {
    label = document.createElement('label')
    input = document.createElement('input')
    input.className = 'input-form'
    // create an key-based id
    input.id = key
    input.type = 'text'
    input.name = 'nodeValue'
    input.value = nodeData[key]

    label.setAttribute('for', key)
    label.textContent = `${key}: `
    form.appendChild(label)
    form.appendChild(input)
    // store the keys to later render them dynamically
    inputIds.push(key)
  })

  // create a submit button
  const submit = document.createElement('input')
  submit.className = 'submit-form'
  submit.type = 'submit'<commit_msg>:hammer: remove the concept option from the form<commit_after>'use strict'

// dynamically edit nodes

// remove the created form element
const removeNode = () => {
  const parentEl = document.getElementById('info-nodes-id')
  const formEl = document.getElementById('form-id')
  if (formEl !== null) {
    parentEl.removeChild(formEl)
  }
}

// create the form element
const formNode = (selectedNode) => {
  const htmlElement = document.getElementById('info-nodes-id')
  const form = document.createElement('form')
  form.className = 'bubble'
  form.id = 'form-id'

  let label = ''
  let input = ''
  let inputIds = []

  const nodeData = selectedNode.data().info
  Object.keys(nodeData).map((key) => {
    if (key !== 'concept') {
      label = document.createElement('label')
      input = document.createElement('input')
      input.className = 'input-form'
      // create an key-based id
      input.id = key
      input.type = 'text'
      input.name = 'nodeValue'
      input.value = nodeData[key]

      label.setAttribute('for', key)
      label.textContent = `${key}: `
      form.appendChild(label)
      form.appendChild(input)
      // store the keys to later render them dynamically
      inputIds.push(key)
    }
  })

  // create a submit button
  const submit = document.createElement('input')
  submit.className = 'submit-form'
  submit.type = 'submit'
{'fraction_non_alphanumeric': 0.13577912254160363, 'fraction_numerical': 0.0, 'mean_word_length': 3.238782051282051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4069612', 'n_tokens_mistral': 788, 'n_tokens_neox': 777, 'n_words': 195}