Skip to content

Commit 35fbc60

Browse files
author
guoyongzhi
committed
update doc
1 parent 9cd2067 commit 35fbc60

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/detector.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ function vocabulary_sizes()
2323
end
2424

2525
"""
26-
initialize(; languages=supported_languages(), ngram=4, cutoff=0.85, vocabulary=100000)
26+
initialize(; languages=supported_languages(), ngram=1:4, cutoff=0.85, vocabulary=1000:5000)
2727
2828
Initialize the language detector with the given parameters. Different parameters have different balances among accuracy, speed, and memory usage.
2929
3030
# Arguments
3131
- `languages::Vector{String}`: A list of languages to be used for language detection. If this argument is not provided, all the languages returned by the [`supported_languages`](@ref) function will be used.
32-
- `ngram::Union{Int, AbstractVector}`: Specifies the length of UTF-8 byte n-grams to be utilized for language detection. An integer value can be provided to use a single n-gram size, while a range can be provided to use multiple n-gram sizes. The default value is 1:4, and the maximum value allowed is 7.
33-
- `cutoff::Float64`: The cutoff value of the cumulative probability of the n-grams to use for language detection. The default value is 0.85, and it must be between 0 and 1.
34-
- `vocabulary::Union{Int, AbstractRange}`: The size range of the vocabulary of each language. The default value is 1000:5000.
32+
- `ngram::Union{Int, AbstractVector}`: Specifies the length of UTF-8 byte n-grams to be utilized for language detection. An integer value can be provided to use a single n-gram size, while a range can be provided to use multiple n-gram sizes. The default value is `1:4`, and the maximum value allowed is `7`.
33+
- `cutoff::Float64`: The cutoff value of the cumulative probability of the n-grams to use for language detection. The default value is `0.85`, and it must be between `0` and `1`.
34+
- `vocabulary::Union{Int, AbstractRange}`: The size range of the vocabulary of each language. The default value is `1000:5000`.
3535
"""
3636
function initialize(; languages=supported_languages(), ngram=1:4, cutoff=0.85, vocabulary=1000:5000, path=PROFILE_PATH)
3737
vocabulary = vocabulary isa AbstractRange ? vocabulary : vocabulary:vocabulary

0 commit comments

Comments
 (0)