<commit_before>module.exports = semanticEditionParse

var digit = '[1-9][0-9]*'

var EUCD = new RegExp(
  '^' +
  '(' + digit + ')e' +
  '(?:' +
    '(' + digit + ')u' +
    '(?:' +
      '(' + digit + ')c' + ')?' + ')?' +
  '(?:' +
    '(' + digit + ')d' + ')?' +
  '$')

var components = [ 'edition', 'update', 'correction', 'draft' ]

function semanticEditionParse(argument) {
  var parsed = EUCD.exec(argument)
  var returned = { }
  components.forEach(function(component, index) {
    var group = ( index + 1 )<commit_msg>Refactor regular expression digit pattern<commit_after>module.exports = semanticEditionParse

var captureDigit = '([1-9][0-9]*)'

var EUCD = new RegExp(
  '^' +
  captureDigit + 'e' +
  '(?:' +
    captureDigit + 'u' +
    '(?:' +
      captureDigit + 'c' + ')?' + ')?' +
  '(?:' +
    captureDigit + 'd' + ')?' +
  '$')

var components = [ 'edition', 'update', 'correction', 'draft' ]

function semanticEditionParse(argument) {
  var parsed = EUCD.exec(argument)
  var returned = { }
  components.forEach(function(component, index) {
    var group = ( index + 1 )
{'fraction_non_alphanumeric': 0.21814848762603117, 'fraction_numerical': 0.00916590284142988, 'mean_word_length': 3.2823529411764705, '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': '4563286', 'n_tokens_mistral': 404, 'n_tokens_neox': 395, 'n_words': 76}