<commit_before>#! /bin/bash

set -e
# set -x # DEBUG MODE

export WORKING_DIR=`pwd`

if [[ ! -f $WORKING_DIR/braindump.conf ]]; then
  echo "Configuration file braindump.conf not found!"
  echo "Running braindump-configure to set up a configuration file..."
  braindump-configure
  exit 0
fi<commit_msg>Support a input configuration file<commit_after>#! /bin/bash

set -e
# set -x # DEBUG MODE

export WORKING_DIR=`pwd`

BD_CONF_FILE=${1:-$WORKING_DIR/braindump.conf}
# . "$(dirname $0)/env.sh" $(dirname $BD_CONF_FILE)/$BD_CONF_FILE
export BD_CONF_FILE="$(cd "$(dirname "$BD_CONF_FILE")"; pwd)/$(basename "$BD_CONF_FILE")"

if [[ ! -f $BD_CONF_FILE ]]; then
  echo "Configuration file not found!"
  echo "Running braindump-configure to set up a configuration file..."
  braindump-configure
  exit 0
fi
{'fraction_non_alphanumeric': 0.14214463840399003, 'fraction_numerical': 0.004987531172069825, 'mean_word_length': 4.537931034482758, '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': '3770119', 'n_tokens_mistral': 292, 'n_tokens_neox': 284, 'n_words': 79}