download.sh 903 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. #
  3. # This source code is licensed under the license found in the
  4. # LICENSE file in the root directory of this source tree.
  5. set -e
  6. # Configure download location
  7. DOWNLOAD_PATH="$BIOBERT_DATA"
  8. if [ "$BIOBERT_DATA" == "" ]; then
  9. echo "BIOBERT_DATA not set; downloading to default path ('data')."
  10. DOWNLOAD_PATH="./data"
  11. fi
  12. DOWNLOAD_PATH_TAR="$DOWNLOAD_PATH.tar.gz"
  13. # Download datasets
  14. wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1cGqvAm9IZ_86C4Mj7Zf-w9CFilYVDl8j' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1cGqvAm9IZ_86C4Mj7Zf-w9CFilYVDl8j" -O "$DOWNLOAD_PATH_TAR" && rm -rf /tmp/cookies.txt
  15. tar -xvzf "$DOWNLOAD_PATH_TAR"
  16. rm "$DOWNLOAD_PATH_TAR"
  17. echo "BioBERT dataset download done!"
Tip!

Press p or to see the previous file or, n or to see the next file