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

MODEL=$1

if [ -z "$MODEL" ]
then
    echo "Swap to which vehicle model program? "
    read MODEL
fi

ln -fs ../../cansignals/shared/handlers.cpp cantranslator/shared_handlers.cpp
ln -fs ../../cansignals/$MODEL/handlers.cpp cantranslator
ln -fs ../../cansignals/build/$MODEL/all.cpp cantranslator/signals.cpp

echo "Swapped to $MODEL."<commit_msg>Complain if the handlers or signals files cannot be found when swapping.<commit_after>#!/bin/bash

MODEL=$1

if [ -z "$MODEL" ]
then
    echo "Swap to which vehicle model program? "
    read MODEL
fi

HANDLERS=../../cansignals/$MODEL/handlers.cpp
SIGNALS=../../cansignals/build/$MODEL/all.cpp

pushd cantranslator
if [ ! -f $HANDLERS ]
then
    echo "Couldn't find the handlers file at $HANDLERS"
    echo "Did you run \"make\" in cansignals?"
    exit 1
fi

if [ ! -f $SIGNALS ]
then
    echo "Couldn't find the signals file at $SIGNALS"
    echo "Did you run \"make\" in cansignals?"
    exit 1
fi

ln -fs ../../cansignals/shared/handlers.cpp shared_handlers.cpp
ln -fs ../../cansignals/$MODEL/handlers.cpp
ln -fs ../../cansignals/build/$MODEL/all.cpp signals.cpp

echo "Swapped to $MODEL."
popd
{'fraction_non_alphanumeric': 0.14661016949152542, 'fraction_numerical': 0.003389830508474576, 'mean_word_length': 3.086505190311419, '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': '6994679', 'n_tokens_mistral': 448, 'n_tokens_neox': 423, 'n_words': 124}