<commit_before>#!/bin/bash
set -e

if [ -z "$SOURCE_DIRECTORY" ]; then
    SOURCE_DIRECTORY="."
fi

# first create the FSA
./fsa_fsa_create_test_app

# simple tests
$SOURCE_DIRECTORY/lookup_test.sh
$SOURCE_DIRECTORY/fsa_test.sh
$SOURCE_DIRECTORY/detector_test.sh

# advanced tests
$SOURCE_DIRECTORY/ngram_test.sh
$SOURCE_DIRECTORY/segmenter_test.sh
$SOURCE_DIRECTORY/vectorizer_test.sh<commit_msg>Since LD_LIBRARY_PATH did not work we had use stronger lye by using LD_PRELOAD<commit_after>#!/bin/bash
set -e

if [ -z "$SOURCE_DIRECTORY" ]; then
    SOURCE_DIRECTORY="."
fi

export LD_PRELOAD=../vespa/fsa/libfsa.so:../vespa/fsamanagers/libfsamanagers.so

# first create the FSA
./fsa_fsa_create_test_app

# simple tests
$SOURCE_DIRECTORY/lookup_test.sh
$SOURCE_DIRECTORY/fsa_test.sh
$SOURCE_DIRECTORY/detector_test.sh

# advanced tests
$SOURCE_DIRECTORY/ngram_test.sh
$SOURCE_DIRECTORY/segmenter_test.sh
$SOURCE_DIRECTORY/vectorizer_test.sh
{'fraction_non_alphanumeric': 0.10425531914893617, 'fraction_numerical': 0.0, 'mean_word_length': 5.818840579710145, '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': '4409290', 'n_tokens_mistral': 365, 'n_tokens_neox': 354, 'n_words': 61}