forked from czcorpus/xmlanntools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathveld_xml2vrt.sh
executable file
·68 lines (49 loc) · 1.25 KB
/
veld_xml2vrt.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
# This script is a wrapper for the underlying xmlanntools script. It handles input and output files,
# respective to the VELD design, and also constructs a command from the VELD compose file, which is
# then executed.
set -e
command="./xml2vrt /veld/input/data/${in_ann_xml_file}"
if [ -n "$in_ann2standoff_ini_file" ]; then
command+=" -c /veld/input/config/${in_ann2standoff_ini_file}"
fi
if [ -n "$profile_name" ]; then
command+=" -p ${profile_name}"
fi
if [ -n "$attributes" ]; then
command+=" -a ${attributes}"
fi
if [ -n "$token_element" ]; then
command+=" -te ${token_element}"
fi
if [ -n "$include_elements" ]; then
command+=" -i ${include_elements}"
fi
if [ -n "$exclude_elements" ]; then
command+=" -e ${exclude_elements}"
fi
if [ "$keep_token_tags" = "true" ]; then
command+=" -kt"
fi
if [ "$keep_empty" = "true" ]; then
command+=" -ke"
fi
if [ "$discard_freetext" = "true" ]; then
command+=" -df"
fi
if [ "$no_glue" = "true" ]; then
command+=" -ng"
fi
if [ -n "$glue" ]; then
command+=" -g ${glue}"
fi
if [ "$fragment" = "true" ]; then
command+=" -F"
fi
if [ "$no_flattening" = "true" ]; then
command+=" -nf"
fi
command+=" > /veld/output/${out_conlluish_xml_file}"
echo "executing:"
echo "$command"
eval "$command"