update
This commit is contained in:
17
src/util.jl
17
src/util.jl
@@ -887,23 +887,6 @@ function remove_french_accents(text::AbstractString)::AbstractString
|
||||
end
|
||||
|
||||
|
||||
function countGivenWords(text::String, words::Vector{String})::Vector{Int}
|
||||
count = []
|
||||
|
||||
# loop through each word in words
|
||||
for word in words
|
||||
# initialize a counter for the current word
|
||||
splittext = split(text, word)
|
||||
splittext_length = length(splittext)
|
||||
thisWordCount = splittext_length - 1
|
||||
push!(count, thisWordCount)
|
||||
end
|
||||
return count
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user