<commit_before>#!/bin/sh

# Runs Starling and GRASShopper on an input file.
# Requires grasshopper.native be on path, or the path to qarmc specified as
# ${GRASSHOPPER}.

GRASSHOPPER=${GRASSHOPPER:-"grasshopper.native"}
GHARGS=${GHARGS:="-robust"}

if [ $# -lt 1 ];
then
	echo "usage: $0 FILE starling-args..."
	exit 1
fi

tempfile=grass.tmp.spl

rm $tempfile

echo "--- STARLING ---"

if ./starling.sh -sgrass -Btry-approx $* > $tempfile;
then
	echo "Starling succeeded:"
	cat $tempfile
else
	starling_exitc=$?
	echo "Starling FAILED."
	exit $starling_exitc
fi

echo "--- GRASSHOPPER ---"

if $GRASSHOPPER ${GHARGS} $tempfile;
then
	echo "GRASShopper succeeded."
else<commit_msg>remove alternative facts in gh shell script<commit_after>#!/bin/sh

# Runs Starling and GRASShopper on an input file.
# Requires grasshopper.native be on path, or the path to qarmc specified as
# ${GRASSHOPPER}.

GRASSHOPPER=${GRASSHOPPER:-"grasshopper.native"}
GHARGS=${GHARGS:="-robust"}

if [ $# -lt 1 ];
then
	echo "usage: $0 FILE starling-args..."
	exit 1
fi

tempfile=grass.tmp.spl

rm $tempfile

echo "--- STARLING ---"

if ./starling.sh -sgrass -Btry-approx $* > $tempfile;
then
	echo "Starling succeeded:"
	cat $tempfile
else
	starling_exitc=$?
	echo "Starling FAILED."
	exit $starling_exitc
fi

echo "--- GRASSHOPPER ---"

if $GRASSHOPPER ${GHARGS} $tempfile;
then
	echo "GRASShopper finished."
else
{'fraction_non_alphanumeric': 0.14398848092152627, 'fraction_numerical': 0.004319654427645789, 'mean_word_length': 4.054545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6046559', 'n_tokens_mistral': 556, 'n_tokens_neox': 536, 'n_words': 147}