download info

This commit is contained in:
Mike J Innes 2018-04-15 20:09:08 +01:00
parent 642543808e
commit 683a73fed3
3 changed files with 9 additions and 6 deletions

View File

@ -10,13 +10,15 @@ const cache_prefix = "https://cache.julialang.org"
function load()
suffixes = ["", ".phones", ".symbols"]
if isdir(deps("cmudict"))
if all(isfile.(["cmudict$x" for x in suffixes]))
if all(isfile(deps("cmudict", "cmudict$x")) for x in suffixes)
return
end
end
info("Downloading CMUDict dataset")
mkpath(deps("cmudict"))
for x in suffixes
download("$cache_prefix/http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-$version$x", deps("cmudict", "cmudict$x"))
download("$cache_prefix/http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-$version$x",
deps("cmudict", "cmudict$x"))
end
end

View File

@ -14,6 +14,7 @@ function load()
"t10k-images-idx3-ubyte",
"t10k-labels-idx1-ubyte"]
isfile(file) && continue
info("Downloading MNIST dataset")
download("https://cache.julialang.org/http://yann.lecun.com/exdb/mnist/$file.gz", "$file.gz")
open(file, "w") do io
write(io, GZip.open(read, "$file.gz"))

View File

@ -4,10 +4,10 @@ using ZipFile
using ..Data: deps
function load()
isfile(deps("sentiment.zip")) ||
download("https://cache.julialang.org/https://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip",
deps("sentiment.zip"))
return
isfile(deps("sentiment.zip")) || return
info("Downloading sentiment treebank dataset")
download("https://cache.julialang.org/https://nlp.stanford.edu/sentiment/trainDevTestTrees_PTB.zip",
deps("sentiment.zip"))
end
getfile(r, name) = r.files[findfirst(x -> x.name == name, r.files)]