<commit_before>const fs = require('fs')
const path = require('path')

function requireEdition(file, edition) {
  const enterprisePath = edition === 'lite' ? '' : 'enterprise/'
  const extensionPath = path.resolve(__dirname, '../extensions', enterprisePath, edition, file)
  const exists = fs.existsSync(extensionPath)

  if (!exists && edition === 'lite') {
    throw new Error(`Lite Edition does not implement "${file}". Please report this as a bug to the Botpress team.`)
  } else if (!exists) {
    return null
  } else {
    return '/extensions/' + enterprisePath + edition
  }
}

function requireExtension(file, edition) {
  const editions = ['ultimate', 'pro', 'lite']
  edition = edition ? edition : process.env.BOTPRESS_EDITION || 'lite'

  const length = '/extensions/lite/'.length

  const start = file.indexOf('/extensions/lite/')
  file = file.substr(start + length)
<commit_msg>Removing edition from extensions request<commit_after>const fs = require('fs')
const path = require('path')

function requireEdition(file, edition) {
  const enterprisePath = edition === 'lite' ? '' : 'enterprise/'
  const extensionPath = path.resolve(__dirname, '../extensions', enterprisePath, edition, file)
  const exists = fs.existsSync(extensionPath)

  if (!exists && edition === 'lite') {
    throw new Error(`Lite Edition does not implement "${file}". Please report this as a bug to the Botpress team.`)
  } else if (!exists) {
    return null
  } else {
    return '/extensions/' + enterprisePath + edition
  }
}

function requireExtension(file, edition) {
  const editions = ['ultimate', 'pro', 'lite']
  edition = edition ? edition : process.env.BOTPRESS_EDITION || 'lite'

  const length = '/extensions/lite/'.length
  const start = file.indexOf('/extensions/lite/')
  
  file = file.substr(start + length)
  const upTo = file.indexOf('?') > 0 ? file.indexOf('?') : file.length
  file = file.substr(0, upTo)

{'fraction_non_alphanumeric': 0.14644351464435146, 'fraction_numerical': 0.0010460251046025104, 'mean_word_length': 4.15633423180593, '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': '5736609', 'n_tokens_mistral': 564, 'n_tokens_neox': 547, 'n_words': 169}