Skip to content

Commit 987c689

Browse files
committed
added script to download after testing
Signed-off-by: eraly <[email protected]>
1 parent 7eb12de commit 987c689

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# usage:
4+
# ./word2vec-download300model.sh output-file
5+
6+
set -o errexit
7+
set -o pipefail
8+
9+
CODE=$( wget --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=0B7XkCwpI5KDYNlNUTTlSS21pQmM' -O- | perl -0p -e 's/.*confirm=(\S+)\;id=.*/$1\n/s' )
10+
11+
mkdir -p $1
12+
OUT_F=$1/'GoogleNews-vectors-negative300.bin.gz'
13+
14+
wget --load-cookies cookies.txt 'https://docs.google.com/uc?export=download&confirm='$CODE'&id=0B7XkCwpI5KDYNlNUTTlSS21pQmM' -O $OUT_F

0 commit comments

Comments
 (0)