<commit_before>#!/bin/sh
chmod u+rx ./ConvertAN4ToWav.sh ./generateIndices.sh
wget http://www.speech.cs.cmu.edu/databases/an4/an4_raw.bigendian.tar.gz
tar -xzvf an4_raw.bigendian.tar.gz
rm -r an4_raw.bigendian.tar.gz
ln -s ../Mapper.lua .
AN4_PATH='an4'
echo "ROOT_FOLDER: $AN4_PATH"
find $AN4_PATH -name '*.wav' -delete
echo "Converting raw an4 dataset..."
./ConvertAN4ToWav.sh $AN4_PATH
echo "Generating Indices..."
./generateIndices.sh $AN4_PATH
echo "Generating LMDB..."
th generateLMDB.lua $AN4_PATH/wav/<commit_msg>Added check for an4 already downloaded<commit_after>#!/bin/sh
chmod u+rx ./ConvertAN4ToWav.sh ./generateIndices.sh
if [ ! -d an4 ]; then
    wget http://www.speech.cs.cmu.edu/databases/an4/an4_raw.bigendian.tar.gz
    tar -xzvf an4_raw.bigendian.tar.gz
fi
rm -r an4_raw.bigendian.tar.gz
ln -s ../Mapper.lua .
ln -s ../Lexicon.lua .
AN4_PATH='an4'
echo "ROOT_FOLDER: $AN4_PATH"
find $AN4_PATH -name '*.wav' -delete
echo "Converting raw an4 dataset..."
./ConvertAN4ToWav.sh $AN4_PATH
echo "Generating Indices..."
./generateIndices.sh $AN4_PATH
echo "Generating LMDB..."
th generateLMDB.lua $AN4_PATH/wav/
{'fraction_non_alphanumeric': 0.1558325912733749, 'fraction_numerical': 0.026714158504007122, 'mean_word_length': 3.908296943231441, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '774519', 'n_tokens_mistral': 480, 'n_tokens_neox': 472, 'n_words': 98}