<commit_before>#!/bin/sh

set -e

for d in sparse dense
do
    for m in none global cols rows
    do
        outdir="out_${d}_${m}"
        rm -rf $outdir
        mkdir $outdir
        cd $outdir
        ../../center.py --mode=$m ../input/train_${d}.mtx ../input/test.mtx
        diff -ur . ../ref/$outdir
        cd ..
    done

done
<commit_msg>centering test script: added --clean<commit_after>#!/bin/sh

set -e

for d in sparse dense
do
    for m in none global cols rows
    do
        outdir="out_${d}_${m}"
        rm -rf $outdir
        test $1 = '--clean' && continue
        mkdir $outdir
        cd $outdir
        ../../center.py --mode=$m ../input/train_${d}.mtx ../input/test.mtx
        diff -ur . ../ref/$outdir
        cd ..
    done

done

{'fraction_non_alphanumeric': 0.1571994715984148, 'fraction_numerical': 0.001321003963011889, 'mean_word_length': 1.5182724252491695, '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': '3937195', 'n_tokens_mistral': 275, 'n_tokens_neox': 263, 'n_words': 78}