<commit_before>#! /bin/bash
## Build tests
image_name="40_ocr:test"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "Building test image"


## Clean up
docker rmi ${image_name}<commit_msg>add test tesseract<commit_after>#! /bin/bash
## Build tests
image_name="40_ocr:test"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

echo "Building test image"
docker build -t ${image_name} $DIR

echo "Test tesseract"
docker run --rm ${image_name} tesseract \
    /usr/local/additional_packages/tesseract/testing/eurotext.tif \
    stdout

## Clean up
docker rmi ${image_name}
{'fraction_non_alphanumeric': 0.17206132879045996, 'fraction_numerical': 0.010221465076660987, 'mean_word_length': 5.0, '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': '5673527', 'n_tokens_mistral': 232, 'n_tokens_neox': 212, 'n_words': 54}