forked from larsjuhljensen/tagger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_script.sh
More file actions
32 lines (26 loc) · 1.24 KB
/
test_script.sh
File metadata and controls
32 lines (26 loc) · 1.24 KB
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
#!/bin/bash
# the first para is the name of output
printf "Define the outputs name: [prefix name]\n"
printf "default: (without name) >>> "
read -r try_num
#try_num=$1
# the second para is whether to use Wc or not (yes or no)
printf "Decide whether to use the Wc or not: [yes|no]\n"
printf "default:no >>> "
read -r use_Wc
#use_Wc=$2
input="$(pwd)/data"
output="$(pwd)/out"
if [ -d $output ]; then
echo "dict out exsists"
else
mkdir out
echo "dict out is created"
fi
if [ $use_Wc == 'y' ] || [ $use_Wc == 'Y' ] || [ $use_Wc == 'yes' ] || [ $use_Wc == 'Yes' ]; then
### with corpus weights
$(pwd)/tagcorpus --types=$input/test_types.tsv --entities=$input/test_entities.tsv --names=$input/test_names.tsv --documents=$input/test_documents.tsv --out-matches=$output/${try_num}_test_matches.tsv --out-pairs=$output/${try_num}_test_pairs.tsv --out-segments=$output/${try_num}_test_segments.tsv --corpus-weights=$input/test_Wc.tsv
else
### without corpus weights
$(pwd)/tagcorpus --types=$input/test_types.tsv --entities=$input/test_entities.tsv --names=$input/test_names.tsv --documents=$input/test_documents.tsv --out-matches=$output/${try_num}_test_matches.tsv --out-pairs=$output/${try_num}_test_pairs.tsv --out-segments=$output/${try_num}_test_segments.tsv
fi