<commit_before>(function() {
  
  // Generate a UI model based on a SciSpike generated state matrix.
  
  var fs = require('fs'),
      path = require('path'),
      ansi = require('ansi'),
      cursor = ansi(process.stdout),
      S = require('string'),
  
  parse = {};
  
  parse.fromStateMatrix = function(name, matrix) {
    
    // Create an object with the project name
    var model = {};
    model['name'] = name;
    model['states'] = {};
    
    for (var name in matrix) {
      var state = matrix[name];
      
      model.states[name] = {};
      
      // Each state contains an `ui` and `elements` tag.
      model.states[name]['ui'] = {
        tag: "div",
        title: new S(name).humanize().s
      };
      model.states[name]['elements'] = {};
      
      // Each state can transition to other states
      for (var key in state) {
        
        // Transition states are also described by a `ui` and `elements` key
        model.states[name].elements[key] = {
          ui: {
            tag: 'div',
            title: new S(key).humanize().s
          },
          elements: {
            
          }
        };
        
        console.log(key);
      }
    }
    
    return model;
  }
  
  module.exports = parse;
}());<commit_msg>add properties to elements tag<commit_after>(function() {
  
  // Generate a UI model based on a SciSpike generated state matrix.
  
  var fs = require('fs'),
      path = require('path'),
      ansi = require('ansi'),
      cursor = ansi(process.stdout),
      S = require('string'),
  
  parse = {};
  
  parse.fromStateMatrix = function(name, matrix) {
    
    // Create an object with the project name
    var model = {};
    model['name'] = name;
    model['states'] = {};
    
    for (var name in matrix) {
      var state = matrix[name];
      
      model.states[name] = {};
      
      // Each state contains an `ui` and `elements` tag.
      model.states[name]['ui'] = {
        tag: "div",
        title: new S(name).humanize().s
      };
      model.states[name]['elements'] = {};
      
      // Each state can transition to other states
      for (var key in state) {
        
        // Transition states are also described by a `ui` and `elements` key
        var obj = {
          ui: {
            tag: 'div',
            title: new S(key).humanize().s
          },
          elements: {}
        }
        model.states[name].elements[key] = obj;
        
        var type = state[key].type;
        if (type === undefined) {
          continue;
        }
        for (var prop in type.properties) {
          obj.elements[prop] = type.properties[prop];
        }
      }
    }
    
    return model;
  }
  
  module.exports = parse;
}());
{'fraction_non_alphanumeric': 0.13918472273228058, 'fraction_numerical': 0.0, 'mean_word_length': 1.6653620352250489, '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': '5723008', 'n_tokens_mistral': 802, 'n_tokens_neox': 797, 'n_words': 218}