-
Notifications
You must be signed in to change notification settings - Fork 3
/
prepare.sh
45 lines (40 loc) · 1.28 KB
/
prepare.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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
#This script should be run only once, before starting the experiments, to build the datastreams
cd data
wget http://cistern.cis.lmu.de/figment2/embeddings/skip,200dim.txt
wget http://cistern.cis.lmu.de/figment2/embeddings/sskip,200dim.txt
wget http://cistern.cis.lmu.de/figment2/embeddings/fasttext,200dim.txt
echo "building fuel datasets for skip..."
mkdir skip
cd skip
cp ../datasets/* .
mv ../skip,200dim.txt .
python ../../src/emb2numpy.py skip,200dim.txt
wait
cp ../config .
echo "ent_vectors=skip,200dim.txt.npy" >> config
echo "dsdir="$DIR/data/skip/ >> config
python ../../src/make_dataset.py config &
wait
rm Etrain.names Edev.names Etest.names types
mv skip,200dim.txt ../.
echo "building fuel datasets for sskip and fasttext..."
cd ..
mkdir sskip
cd sskip
cp ../datasets/* .
mv ../sskip,200dim.txt .
mv ../fasttext,200dim.txt .
python ../../src/emb2numpy.py sskip,200dim.txt
wait
python ../../src/emb2numpy.py fasttext,200dim.txt
wait
cp ../config .
echo "ent_vectors=sskip,200dim.txt.npy" >> config
echo "fasttext_vecfile=fasttext,200dim.txt.npy" >> config
echo "dsdir="$DIR/data/sskip/ >> config
python ../../src/make_dataset.py config
wait
rm Etrain.names Edev.names Etest.names types
mv sskip,200dim.txt ../.
mv fasttext,200dim.txt ../.