Separate .trees and .treebank, and add a script for making the latter from the former

This commit is contained in:
John J. Camilleri
2021-02-02 21:46:38 +01:00
parent c94bffe435
commit d09838e97e
6 changed files with 44 additions and 41 deletions

10
testsuite/lpgf/mkTreebank.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
if [ $# -lt 1 ]; then
echo "Must specify trees file"
exit 1
fi
ABSNAME="${1%.*}"
echo "read_file -file=$1 -lines -tree | linearize -treebank | write_file -file=$ABSNAME.treebank" | gf --run $ABSNAME*.gf
echo "Wrote $ABSNAME.treebank"
echo "(you will have to add newlines separating the trees manually)"