Skip to content

Commit

Permalink
in examples/wordcount.jl, split(x,y,k::Bool) is deprecated, use split…
Browse files Browse the repository at this point in the history
…(x,y; keep=k) instead.
  • Loading branch information
datamut committed May 16, 2015
1 parent f043f86 commit 0d7e5c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/wordcount.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Takes a string. Returns a Dict with the number of times each word
# appears in that string.
function wordcount(text)
words=split(text,[' ','\n','\t','-','.',',',':',';'],false)
words=split(text,[' ','\n','\t','-','.',',',':',';'];keep=false)
counts=Dict()
for w = words
counts[w]=get(counts,w,0)+1
Expand All @@ -45,7 +45,7 @@ end
# and @spawns wordcount() for each chunk to run in parallel. Then fetch()s
# results and performs wcreduce().
function parallel_wordcount(text)
lines=split(text,'\n',false)
lines=split(text,'\n';keep=false)
np=nprocs()
unitsize=ceil(length(lines)/np)
wcounts=[]
Expand Down

0 comments on commit 0d7e5c1

Please sign in to comment.