<commit_before>var path = require('path');
var mainPath = path.dirname(process.mainModule.filename);
var cfg = require(mainPath + '/config/settings.json');
var merge = require('merge-recursive');

var settings = cfg.default;
var ENV = process.env.NODE_ENV || 'development';

try {
  settings = merge.recursive(settings, cfg[ENV]);
} catch(e) {
  // No env detected. Issuing a warning.
  console.error('Environment specific settings not found: %s', ENV);
}

module.exports = settings;<commit_msg>fix abs path<commit_after>var currentFile = require.resolve('./');
// extract main dir
var arTmp = currentFile.split('/');
tmp = arTmp.slice(0, arTmp.indexOf('node_modules'));
var cfg = require(tmp.join('/') + '/config/settings.json');
var merge = require('merge-recursive');

var settings = cfg.default;
var ENV = process.env.NODE_ENV || 'development';

try {
  settings = merge.recursive(settings, cfg[ENV]);
} catch(e) {
  // No env detected. Issuing a warning.
  console.error('Environment specific settings not found: %s', ENV);
}

module.exports = settings;
{'fraction_non_alphanumeric': 0.16162570888468808, 'fraction_numerical': 0.000945179584120983, 'mean_word_length': 4.916201117318436, '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': '4051812', 'n_tokens_mistral': 334, 'n_tokens_neox': 326, 'n_words': 87}