This repository has been archived by the owner on Dec 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCommandLine.sh
executable file
·89 lines (63 loc) · 2.44 KB
/
CommandLine.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/bin/sh
WATSET=${WATSET-watset.jar}
INPUT=${INPUT-java.tsv}
set -eux
# Version
java -jar "$WATSET" -v
# Dummy Clustering
java -jar "$WATSET" -i "$INPUT" empty
java -jar "$WATSET" -i "$INPUT" singleton
java -jar "$WATSET" -i "$INPUT" together
java -jar "$WATSET" -i "$INPUT" components
# Girvan-Newman Clustering
java -jar "$WATSET" -i "$INPUT" gn -k 2
# k Spanning Tree Clustering
java -jar "$WATSET" -i "$INPUT" kst -k 2
# Spectral Embedding
java -jar "$WATSET" -i "$INPUT" embed -k 2
# Spectral Clustering
java -jar "$WATSET" -i "$INPUT" spectral -k 2
# Chinese Whispers
for mode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" cw -m $mode
done
# Markov Clustering
java -jar "$WATSET" -i "$INPUT" mcl
# Markov Clustering (Official)
[ -x "$PWD/mcl" ] && java -jar "$WATSET" -i "$INPUT" mcl-bin --bin "$PWD/mcl"
# MaxMax
java -jar "$WATSET" -i "$INPUT" maxmax
# Watset Sense Induction
java -jar "$WATSET" -i "$INPUT" senses -l mcl
for lmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" senses -l cw -lp mode=$lmode
done
# Watset Sense Graph
java -jar "$WATSET" -i "$INPUT" graph -l mcl
for lmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" graph -l cw -lp mode=$lmode
done
# Watset Sense Graph Embedding
java -jar "$WATSET" -i "$INPUT" embedsenses -l mcl -k 2
for lmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" embedsenses -l cw -lp mode=$lmode -k 2
done
# Watset Clustering
java -jar "$WATSET" -i "$INPUT" watset -l mcl -g mcl # Watset[MCL, MCL]
[ -x "$PWD/mcl" ] && java -jar "$WATSET" -i "$INPUT" watset -l mcl -g mcl-bin -gp bin="$PWD/mcl" # Watset[MCL, MCL]
for gmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" watset -l mcl -g cw -gp mode=$gmode # Watset[MCL, CW]
done
for lmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" watset -l cw -lp mode=$lmode -g mcl # Watset[CW, MCL]
[ -x "$PWD/mcl" ] && java -jar "$WATSET" -i "$INPUT" watset -l cw -lp mode=$lmode -g mcl-bin -gp bin="$PWD/mcl" # Watset[CW, MCL]
for gmode in top lin log ; do
java -jar "$WATSET" -i "$INPUT" watset -l cw -lp mode=$lmode -g cw -gp mode=$gmode # Watset[CW, CW]
done
done
# Evaluation
java -jar "$WATSET" -i "bank-soft.tsv" pairwise -g "bank-gold.tsv"
java -jar "$WATSET" -i "bank-soft.tsv" purity -g "bank-gold.tsv"
java -jar "$WATSET" -i "bank-soft.tsv" purity -g "bank-gold.tsv" -n
java -jar "$WATSET" -i "bank-soft.tsv" purity -g "bank-gold.tsv" -m
java -jar "$WATSET" -i "bank-soft.tsv" purity -g "bank-gold.tsv" -n -m