Skip to content

Commit 90e996c

Browse files
Merge pull request #189 from JuliaML/cl/fix
fix UD_English
2 parents ed9740e + 2e084cf commit 90e996c

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

src/datasets/text/udenglish.jl

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function __init__udenglish()
2222
detail on the Website.
2323
""",
2424
"https://raw.githubusercontent.com/UniversalDependencies/UD_English-EWT/master/" .* [TRAINFILE, DEVFILE, TESTFILE],
25-
"4f645242cc985ca59e744e3aebfb3d9e86507babd773ff3226c0bfeb3d0a52c3"
25+
"e26845c3c78140e15d82a425388bcc58016d511616e5c2669a2e580e8ae586c0"
2626
))
2727
end
2828

@@ -95,29 +95,3 @@ function UD_English(split::Symbol; dir=nothing)
9595
metadata = Dict{String,Any}("n_observations" => length(features))
9696
return UD_English(metadata, split, features)
9797
end
98-
99-
100-
# DEPRECATED INTERFACE, REMOVE IN v0.7 (or 0.6.x)
101-
function Base.getproperty(::Type{UD_English}, s::Symbol)
102-
if s === :traindata
103-
@warn "UD_English.traindata() is deprecated, use `UD_English(split=:train)[:]` instead."
104-
function traindata(; dir=nothing)
105-
UD_English(; split=:train, dir)[:]
106-
end
107-
return traindata
108-
elseif s === :testdata
109-
@warn "UD_English.testdata() is deprecated, use `UD_English(split=:test)[:]` instead."
110-
function testdata(; dir=nothing)
111-
UD_English(; split=:test, dir)[:]
112-
end
113-
return testdata
114-
elseif s === :devdata
115-
@warn "UD_English.devdata() is deprecated, use `UD_English(split=:dev)[:]` instead."
116-
function devdata(; dir=nothing)
117-
UD_English(; split=:dev, dir)[:]
118-
end
119-
return devdata
120-
else
121-
return getfield(UD_English, s)
122-
end
123-
end

test/datasets/text.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ end
1717
@testset "UD_English" begin
1818
n_features = ()
1919
Tx = Vector{Vector{String}}
20-
for (n_obs, split) in [(12543, :train), (2077, :test), (2001, :dev)]
20+
for (n_obs, split) in [(12544, :train), (2077, :test), (2001, :dev)]
2121
d = UD_English(split)
2222

2323
test_unsupervised_array_dataset(d;

0 commit comments

Comments
 (0)