Closed ksteimel closed 6 years ago
Do you have a line of example code that shows the error ?
The line that says
my_ngrams = (UTF8String => Int)["To" => 1, "be" => 2, "or" => 1, "not" => 1, "to" => 1, "be..." => 1]
Should be
my_ngrams = Dict{String, Int}("To" => 1, "be" => 2, "or" => 1, "not" => 1, "to" => 1, "be..." => 1)
Due to the new syntax for dictionary definition. The old way throws an error like ERROR: MethodError: no method matching getindex(::Pair{DataType,DataType}, ::Pair{String,Int64}, ::Pair{String,Int64}, ::Pair{String,Int64}, ::Pair{String,Int64}, ::Pair{String,Int64}, ::Pair{String,Int64})
The ngram document constructor for the dictionary of n-grams does not work correctly in Julia 0.5. This appears to be due to the change in Dictionary creation syntax not anything wrong with the classes themselves.