<commit_before>#! /bin/bash -x
if [ `hostname` == "applejack" ]; then
    FROGPATH="/scratch2/www/lamachine"
    LOGFILE="/scratch2/www/webservices-lst/live/writable/tscan/frog.log"
    THREADS=8
elif [ `hostname` == "mlp01" ]; then
    FROGPATH="/var/www/lamachine"
    LOGFILE="/var/www/webservices-lst/live/writable/logs/tscan.frog.err"
    THREADS=8
else
    FROGPATH="/usr/local/"
    LOGFILE="/tmp/frog-tscan.log"
    THREADS=0 #all we can get
fi
PORT=7001
ID=tscan
CONFIG=${FROGPATH}/share/frog/nld/tscan-frog.cfg

mv $LOGFILE $LOGFILE.sav # poor mans solution

frog -X --id=${ID} -c ${CONFIG} --skip=mp -S${PORT} 2> $LOGFILE<commit_msg>making script LaMachine v2 aware (proycon/LaMachine#47)<commit_after>#! /bin/bash -x
if [ `hostname` == "mlp01" ]; then
    FROGPATH="/var/www/lamachine"
    LOGFILE="/var/www/webservices-lst/live/writable/logs/tscan.frog.err"
    THREADS=8
elif [ ! -z "$LM_PREFIX" ]; then
    #LaMachine v2
    FROGPATH="$LM_PREFIX"
    LOGFILE="/tmp/frog-tscan.log"
else
    FROGPATH="/usr/local/"
    LOGFILE="/tmp/frog-tscan.log"
    THREADS=0 #all we can get
fi
PORT=7001
ID=tscan
CONFIG=${FROGPATH}/share/frog/nld/tscan-frog.cfg

mv $LOGFILE $LOGFILE.sav # poor mans solution

frog -X --id=${ID} -c ${CONFIG} --skip=mp -S${PORT} 2> $LOGFILE
{'fraction_non_alphanumeric': 0.17896389324960754, 'fraction_numerical': 0.019623233908948195, 'mean_word_length': 3.6363636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, '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': '203838', 'n_tokens_mistral': 543, 'n_tokens_neox': 528, 'n_words': 93}