<commit_before>#!/bin/bash

echo 'Running assignee disambiguation'
for i in {a..z} ; do
    python lib/assignee_disambiguation.py $1 $i
done

if [ $1 = "grant" ]
    then
        echo 'Running lawyer disambiguation'
        for i in {a..z} ; do
            python lib/lawyer_disambiguation.py $i
        done
fi

echo 'Running geo disambiguation'
python lib/geoalchemy.py $1<commit_msg>integrate celery/redis into run_clean.sh<commit_after>#!/bin/bash

cd lib
celery -A tasks worker --loglevel=info --logfile=celery.log --concurrency=3 &
celeryPID=$!
redis-server &
redisPID=$!
cd ..
echo $celeryPID > celery.pid
echo $redisPID > redis.pid

python lib/assignee_disambiguation.py $1
#echo 'Running assignee disambiguation'
#for i in {a..z} ; do
#    python lib/assignee_disambiguation.py $1 $i
#    sleep 2
#done

kill $celeryPID  # kill celery
kill $redisPID # kill redis
rm lib/dump.rdb # remove redis dump
# remove pid files
rm celery.pid redis.pid

if [ $1 = "grant" ]
    then
        echo 'Running lawyer disambiguation'
        for i in {a..z} ; do
            python lib/lawyer_disambiguation.py $i
        done
fi

echo 'Running geo disambiguation'
python lib/geoalchemy.py $1
{'fraction_non_alphanumeric': 0.10641891891891891, 'fraction_numerical': 0.007601351351351352, 'mean_word_length': 3.086206896551724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3771511', 'n_tokens_mistral': 443, 'n_tokens_neox': 400, 'n_words': 125}