-
Notifications
You must be signed in to change notification settings - Fork 0
/
evaluate.sh
executable file
·64 lines (46 loc) · 2.48 KB
/
evaluate.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
#!/bin/bash -ex
# ./dt-wordnet.py -t 0.1 -w super-senses-wordnet.tsv dt-59g-deps-wpf1k-fpw1k.csv -o dt-wordnet-0_1.txt
export LANG=en_US.UTF-8 LC_COLLATE=C
export JAVA_OPTS="$JAVA_OPTS -Xms64G -Xmx512G"
WATSET="$WORK/watset-java/target/watset.jar"
MCL="$WORK/mcl-14-137/bin/mcl"
NMPU="$WORK/watset-classes/supersenses_nmpu.groovy"
GOLD=super-senses-wordnet.tsv
# GOLD=wordnet-flat-cut-depth-4-clusters-2017-minclusize-2.tsv
# GOLD=wordnet-flat-cut-depth-5-clusters-5737-minclusize-2.tsv
# GOLD=wordnet-flat-cut-depth-6-clusters-11274-minclusize-2.tsv
mkdir -p eval
# for DT in dt-wordnet-0_1.txt dt-wordnet-0_01.txt dt-wordnet-0_001.txt ; do
# for DT in dt-wordnet-d4-0_1.txt dt-wordnet-d4-0_01.txt dt-wordnet-d4-0_001.txt ; do
# for DT in dt-wordnet-d5-0_1.txt dt-wordnet-d5-0_01.txt dt-wordnet-d5-0_001.txt ; do
# for DT in dt-wordnet-d6-0_1.txt dt-wordnet-d6-0_01.txt dt-wordnet-d6-0_001.txt ; do
for DT in dt-wordnet-0_001.txt ; do
DT_OUTPUT="eval/${DT%.txt}"
for CW in top log nolog ; do
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-cw-$CW.tsv" cw -m "$CW"
done
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-mcl.tsv" mcl-bin --bin "$MCL"
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-maxmax.tsv" maxmax
for CW_LOCAL in top log nolog ; do
for CW_GLOBAL in top ; do
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-watset-cw-$CW_LOCAL-cw-$CW_GLOBAL.tsv" watset -l cw -lp "mode=$CW_LOCAL" -g cw -gp "mode=$CW_GLOBAL"
done
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-watset-cw-$CW_LOCAL-mcl.tsv" watset -l cw -lp "mode=$CW_LOCAL" -g mcl-bin -gp "bin=$MCL"
done
if false ; then
for CW_GLOBAL in top log nolog ; do
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-watset-mcl-cw-$CW_GLOBAL.tsv" watset -l mcl -g cw -gp "mode=$CW_GLOBAL"
done
time nice java -jar "$WATSET" -i "$DT" -o "$DT_OUTPUT-watset-mcl-mcl.tsv" watset -l mcl -g mcl-bin -gp "bin=$MCL"
fi
DT_REPORT="${DT%.txt}-eval.txt"
echo -n > "$DT_REPORT"
RESULTS=$(find eval -maxdepth 1 -type f -wholename "$DT_OUTPUT-*.tsv")
for CLUSTERS in $RESULTS ; do
DT_SAMPLES="${CLUSTERS%.tsv}.ser"
echo "# $CLUSTERS" >> "$DT_REPORT"
time nice groovy -classpath "$WATSET" "$NMPU" -s "$DT_SAMPLES" -p "$CLUSTERS" "$GOLD" | tee -a "$DT_REPORT"
# time nice groovy -classpath "$WATSET" "$NMPU" -p "$CLUSTERS" "$GOLD" | tee -a "$DT_REPORT"
echo >> "$DT_REPORT"
done
done