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

#save current dir
setup_dir=$(pwd)

if [ -z ${DIR+x} ]; then
	#running by itself
	source ../constants.sh
	script_dir=$(get_script_dir)
	running_folder='.'
else
	#running from dendro_full_setup_ubuntu_server_ubuntu_16.sh
	source ./constants.sh
	script_dir=$(get_script_dir)
	running_folder=$script_dir/SQLCommands
fi

info "Installing base ontologies in virtuoso in 5 seconds..."
for (( i = 0; i < 10; i++ )); do
	echo $[10-i]...
	sleep 1s
done

/usr/local/virtuoso-opensource/bin/isql < $running_folder/interactive_sql_commands.sql ||
die "Unable to load ontologies into Virtuoso."

success "Installed base ontologies in virtuoso."
<commit_msg>FIxing ontologies loading<commit_after>#!/usr/bin/env bash

#save current dir
setup_dir=$(pwd)

if [ -z ${DIR+x} ]; then
	#running by itself
	source ../constants.sh
	script_dir=$(get_script_dir)
	running_folder='.'
else
	#running from dendro_full_setup_ubuntu_server_ubuntu_16.sh
	source ./constants.sh
	script_dir=$(get_script_dir)
	running_folder=$script_dir/SQLCommands
fi

timeout=30
info "Waiting for virtuoso service to start. Installing base ontologies in virtuoso in $timeout seconds..."
for (( i = 0; i < $timeout; i++ )); do
	echo -ne $[$timeout-i]...
	sleep 1s
done
echo

/usr/local/virtuoso-opensource/bin/isql < $running_folder/interactive_sql_commands.sql ||
die "Unable to load ontologies into Virtuoso."

success "Installed base ontologies in virtuoso."

{'fraction_non_alphanumeric': 0.12413793103448276, 'fraction_numerical': 0.010344827586206896, 'mean_word_length': 4.8983739837398375, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4653515', 'n_tokens_mistral': 538, 'n_tokens_neox': 514, 'n_words': 135}