-
Notifications
You must be signed in to change notification settings - Fork 4
/
prerequisites.sh
69 lines (60 loc) · 2.66 KB
/
prerequisites.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
#!/bin/sh
set -e
DLDIR="externalData"
if [ ! -d $DLDIR ]; then
mkdir $DLDIR
fi
cd $DLDIR
# GNormPlusJava.zip
if [ ! -f GNormPlusJava.zip ]; then
if [ ! -d GNormPlusJava ]; then
wget https://www.ncbi.nlm.nih.gov/CBBresearch/Lu/Demo/tmTools/download/GNormPlus/GNormPlusJava.zip
unzip GNormPlusJava.zip
rm GNormPlusJava.zip
fi
fi
# tmVarJava.zip
if [ ! -f tmVarJava.zip ]; then
if [ ! -d tmVarJava ]; then
wget ftp://ftp.ncbi.nlm.nih.gov/pub/lu/Suppl/tmVar2/tmVarJava.zip
unzip tmVarJava.zip
rm tmVarJava.zip
fi
fi
# CRF++-0.58.tar.gz
if [ ! -f CRF++-0.58.tar.gz ]; then
if [ ! -d CRF++-0.58 ]; then
wget -O CRF++-0.58.tar.gz --load-cookies cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://drive.google.com/uc?id=0B4y35FiV1wh7QVR6VXJ5dWExSTQ' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=0B4y35FiV1wh7QVR6VXJ5dWExSTQ"
rm -rf cookies.txt
tar -xvf CRF++-0.58.tar.gz
rm CRF++-0.58.tar.gz
fi
fi
# biobert_ner_models.zip
if [ ! -f biobert_ner_models.zip ]; then
if [ ! -d biobert_ner_models ]; then
wget -O biobert_ner_models.zip --load-cookies cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1sSVEqvMBVLj1RJmlQDhRKyt_oe-wc5LK' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1sSVEqvMBVLj1RJmlQDhRKyt_oe-wc5LK"
rm -rf cookies.txt
mkdir ./biobert_ner_models
unzip biobert_ner_models.zip -d ./biobert_ner_models
rm biobert_ner_models.zip
fi
fi
# data.zip
if [ ! -f data.zip ]; then
if [ ! -d data ]; then
wget -O data.zip --load-cookies cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1NqgG3zJzopG2IqG-0g1o6fH0xVpO4PPN' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1NqgG3zJzopG2IqG-0g1o6fH0xVpO4PPN"
rm -rf cookies.txt
unzip data.zip
rm data.zip
fi
fi
# resources.zip
if [ ! -f resources.zip ]; then
if [ ! -d resources ]; then
wget -O resources.zip --load-cookies cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1uU1U6UORqr3l_YYQ5TXeazpLrpeg_OcP' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1uU1U6UORqr3l_YYQ5TXeazpLrpeg_OcP"
rm -rf cookies.txt
unzip resources.zip
rm resources.zip
fi
fi