diff --git a/src/RunTenFoldCrossValidation.sh b/src/RunTenFoldCrossValidation.sh index 9ba54a7..48dbba0 100755 --- a/src/RunTenFoldCrossValidation.sh +++ b/src/RunTenFoldCrossValidation.sh @@ -1,11 +1,20 @@ #!/bin/bash # Author: Leonel Figueiredo de Alencar -# Last update: September 10, 2024 +# Last update: September 11, 2024 -echo "Split $1 treebank file in ten folds." > log.txt +# Check for correct number of arguments (expecting 1 argument) +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +echo "Creating 'log.txt' file." +touch log.txt +echo "File 'log.txt' written to disk." +echo "Split $1 treebank file in ten folds, each fold consisting of a test and a train set." >> log.txt TestSuite.py $1 -echo "Create 10 different models. This may take up several hours." >> log.txt +echo "Create 10 different models, one for each fold. This may take up several hours." >> log.txt CreateModels.sh echo "Parse and test 10 times using each time a different model and test file." >> log.txt @@ -13,4 +22,5 @@ TenFoldCrossVal.sh echo "Process the results of parsing with gold tokenization and gold tags." >> log.txt ParseGoldTokResults.py > results.txt +echo "File 'results.txt' written to disk."