From d8e1cbb94ade7ef46d861fadc0126ab7b3456b0a Mon Sep 17 00:00:00 2001 From: narawat lamaiin Date: Mon, 6 Jan 2025 06:19:28 +0700 Subject: [PATCH] correct countGivenWords() docstring --- src/util.jl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/util.jl b/src/util.jl index fd66f32..624f873 100644 --- a/src/util.jl +++ b/src/util.jl @@ -798,19 +798,19 @@ Count the occurrences of each word in the given list within the provided text. - `words::Vector{String}`: A vector of words whose occurrences need to be counted. # Returns -- `Dict{String, Int}`: A dictionary where keys are the words from the `words` list and values are their respective counts in the `text`. +- `Vector{Int64}`: Their respective counts in the `text`. # Examples ```julia - julia> countGivenWords("hello world hello", ["hello", "world"]) - Dict{String,Int64} with 2 entries: - "hello" => 2 - "world" => 1 + julia> GeneralUtils.countGivenWords("hello world hello", ["hello", "world"]) + 2-element Vector{Int64}: + 2 + 1 - julia> countGivenWords("foo bar baz foo", ["foo", "qux"]) - Dict{String,Int64} with 2 entries: - "foo" => 2 - "qux" => 0 + julia> GeneralUtils.countGivenWords("foo bar baz foo", ["foo", "qux"]) + 2-element Vector{Int64}: + 2 + 0 ``` # Signature