-
Notifications
You must be signed in to change notification settings - Fork 2
/
getdata.sh
executable file
·42 lines (31 loc) · 1.21 KB
/
getdata.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
echo "=== Acquiring datasets ==="
mkdir -p save
mkdir -p data
cd data
echo "- Downloading Penn Treebank (PTB)"
#if on Mac OS use following
echo "Using curl for MacOS. If you are on Linux, please use wget command commented below." #OR if on Linux use following command
#wget --quiet --continue http://www.fit.vutbr.cz/~imikolov/rnnlm/simple-examples.tgz
curl --silent http://www.fit.vutbr.cz/~imikolov/rnnlm/simple-examples.tgz --output simple-examples.tgz
tar -xf simple-examples.tgz
mkdir -p penn
cd penn
mv ../simple-examples/data/ptb.train.txt train.txt
mv ../simple-examples/data/ptb.test.txt test.txt
mv ../simple-examples/data/ptb.valid.txt valid.txt
cd ..
rm -rf simple-examples , simple-examples.tgz
echo " For downloading WikiText-2 (WT2): Change 'if' condition below to 'true'. "
if false; then
#if on Linux use following command
#wget --quiet --continue https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-2-v1.zip
# OR if on Mac OS use following
curl https://s3.amazonaws.com/research.metamind.io/wikitext/wikitext-2-v1.zip
unzip -q wikitext-2-v1.zip
cd wikitext-2
mv wiki.train.tokens train.txt
mv wiki.valid.tokens valid.txt
mv wiki.test.tokens test.txt
fi
echo "---"
echo "Happy language modeling :)"