thanks, steward, but not enough. I would like to understand how to convert this from substrings to strings. the following is an example, not to get a solution, but to illustrate the difference. I want to just get a simple one-dimensional string array out of split.
julia> mystring="a ab ac ab ab ad ba"
"a ab ac ab ab ad ba"
julia> wordcounts= Dict{String,Int64}; \
for word in collect(split(mystring)); wordcounts[word]= get(wordcounts, word, 0) + 1; end
ERROR: MethodError: no method matching get(::Type{Dict{String,Int64}}, ::SubString{String}, ::Int64)
Closest candidates are:
get(::ObjectIdDict, ::ANY, ::ANY) at associative.jl:434
get(::Base.EnvHash, ::AbstractString, ::Any) at env.jl:79
get(::Dict{K,V}, ::Any, ::Any) where {K, V} at dict.jl:478
...
Stacktrace:
[1] macro expansion at ./REPL[10]:1 [inlined]
[2] anonymous at ./<missing>:?