fixes #146
This commit is contained in:
parent
daba42c595
commit
805cb9178f
@ -23,14 +23,14 @@ end
|
|||||||
|
|
||||||
function symbols()
|
function symbols()
|
||||||
load()
|
load()
|
||||||
Symbol.(split(readstring(deps("CMUDict", "cmudict.symbols")),
|
Symbol.(split(readstring(deps("cmudict", "cmudict.symbols")),
|
||||||
"\n", keep = false))
|
"\n", keep = false))
|
||||||
end
|
end
|
||||||
|
|
||||||
function rawdict()
|
function rawdict()
|
||||||
load()
|
load()
|
||||||
Dict(String(xs[1]) => Symbol.(xs[2:end]) for xs in
|
Dict(String(xs[1]) => Symbol.(xs[2:end]) for xs in
|
||||||
filter(!isempty, split.(split(readstring(deps("CMUDict", "cmudict")), "\n"))))
|
filter(!isempty, split.(split(readstring(deps("cmudict", "cmudict")), "\n"))))
|
||||||
end
|
end
|
||||||
|
|
||||||
validword(s) = ismatch(r"^[\w\-\.]+$", s)
|
validword(s) = ismatch(r"^[\w\-\.]+$", s)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
using Flux.Data
|
using Flux.Data
|
||||||
|
using Base.Test
|
||||||
|
|
||||||
@test cmudict()["CATASTROPHE"] == :[K,AH0,T,AE1,S,T,R,AH0,F,IY0].args
|
@test cmudict()["CATASTROPHE"] == :[K,AH0,T,AE1,S,T,R,AH0,F,IY0].args
|
||||||
|
|
||||||
|
@test length(CMUDict.phones()) == 39
|
||||||
|
|
||||||
|
@test length(CMUDict.symbols()) == 84
|
||||||
|
@ -7,5 +7,6 @@ include("tracker.jl")
|
|||||||
include("layers/normalisation.jl")
|
include("layers/normalisation.jl")
|
||||||
include("layers/stateless.jl")
|
include("layers/stateless.jl")
|
||||||
include("optimise.jl")
|
include("optimise.jl")
|
||||||
|
include("data.jl")
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user