<commit_before>#!/usr/bin/env bash

total_score=0
total_lines=0
for file in $1/STS.gs.*
do
    topic=`basename $file | cut -d'.' -f3`
    echo $topic
    score=$(test_evaluation_task2a/correlation-noconfidence.pl $file $2/STS.input.$topic.txt.out 2> /dev/null| cut -d' ' -f2-)
    echo $score
    lines=$(wc -l < $file)
    total_score=`bc <<< "$total_score+($lines*$score)"`
    total_lines=$(($total_lines+$lines))

done

echo 'all'
python -c "print $total_score/$total_lines.0"
<commit_msg>fixing the bug that the semeval guys also had: empty (discarded) lines should not counted when weighing the sources in the mean pearson. We now produce the same overall scores as they do. 	modified:   scripts/par_eval.sh<commit_after>#!/usr/bin/env bash

total_score=0
total_lines=0
for file in $1/STS.gs.*
do
    topic=`basename $file | cut -d'.' -f3`
    echo $topic
    score=$(test_evaluation_task2a/correlation-noconfidence.pl $file $2/STS.input.$topic.txt.out 2> /dev/null| cut -d' ' -f2-)
    echo $score
    lines=$(cat $file | grep -v '^$' | wc -l)
    #lines=$(wc -l < $file)
    echo $lines
    total_score=`bc <<< "$total_score+($lines*$score)"`
    total_lines=$(($total_lines+$lines))

done

echo 'all'
python -c "print $total_score/$total_lines.0"

{'fraction_non_alphanumeric': 0.16321656050955413, 'fraction_numerical': 0.014331210191082803, 'mean_word_length': 3.779467680608365, 'pattern_counts': {'":': 0, '<': 11, '<?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': '2928691', 'n_tokens_mistral': 488, 'n_tokens_neox': 466, 'n_words': 120}