<commit_before>// shows the current phase metamodel in a separate window
const remote = require('electron').remote
const BrowserWindow = remote.BrowserWindow

// metomdels figures
const dgnMeta = 'metamodels/dgn-model.png'
const dgnStateMeta = 'metamodels/dgn-state-model.png'
const impMeta = 'metamodels/imp-model.png'
const impStateMeta = 'metamodels/imp-state-model.png'

module.exports = function showMetamodel (phase) {
  // create the path to the metamodels
  const metamodePath = __dirname.split('/')
  metamodePath.pop() // removes the core directory
  metamodePath.pop() // removes the src directory

  let url = ''
  // checks for the phase
  if (phase === 'design') {
    url = dgnMeta
  } else if (phase === 'design-state') {
    url = dgnStateMeta
  } else if (phase === 'implementation') {
    url = impMeta
  } else if (phase === 'implementation-state') {
    url = impStateMeta
  }
  // creates the window
  let win = new BrowserWindow({ width: 900, height: 700 })
  win.loadURL(`file://${metamodePath.join('/')}/${url}`)
}<commit_msg>:bug: fix the loading of the metamodels<commit_after>// shows the current phase metamodel in a separate window
const remote = require('electron').remote
const BrowserWindow = remote.BrowserWindow

// metomdels figures
const dgnMeta = 'metamodels/dgn-model.png'
const dgnStateMeta = 'metamodels/dgn-state-model.png'
const impMeta = 'metamodels/imp-model.png'
const impStateMeta = 'metamodels/imp-state-model.png'

module.exports = function showMetamodel (phase) {
  // create the path to the metamodels
  const metamodePath = __dirname.split('/')
  metamodePath.pop() // removes the core directory
  metamodePath.pop() // removes the src directory

  let url = ''
  // checks for the phase
  if (phase === 'design') {
    url = dgnMeta
  } else if (phase === 'design-state') {
    url = dgnStateMeta
  } else if (phase === 'implementation') {
    url = impMeta
  } else if (phase === 'implementation-state') {
    url = impStateMeta
  }
  // creates the window
  let win = new BrowserWindow({ width: 900, height: 700, show: false })
  win.loadURL(`file://${metamodePath.join('/')}/${url}`)
  win.on('ready-to-show', () => {
    win.show()
  })
}
{'fraction_non_alphanumeric': 0.14077448747152618, 'fraction_numerical': 0.005466970387243736, 'mean_word_length': 3.7225806451612904, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '5154176', 'n_tokens_mistral': 741, 'n_tokens_neox': 702, 'n_words': 198}