Skip to content

Commit 31b7910

Browse files
committed
minor change to method types for building corpus and bump up min Julia version to 1.5
1 parent c76a032 commit 31b7910

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ MLJModelInterface = "1.3"
1515
ScientificTypesBase = "2.2.0"
1616
ScientificTypes = "2.2.2"
1717
TextAnalysis = "0.7.3"
18-
julia = "1.3"
18+
julia = "1.5"
1919

2020
[extras]
2121
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"

src/MLJText.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ function limit_features(doc_term_matrix::DocumentTermMatrix,
7878
return (doc_term_matrix.dtm[mask, :], new_terms)
7979
end
8080

81-
_convert_bag_of_words(X::Dict{NGram, Int}) =
81+
_convert_bag_of_words(X::Dict{<:NGram, <:Integer}) =
8282
Dict(join(k, " ") => v for (k, v) in X)
8383

84-
build_corpus(X::Vector{Dict{NGram, Int}}) =
84+
build_corpus(X::Vector{<:Dict{<:NGram, <:Integer}}) =
8585
build_corpus(_convert_bag_of_words.(X))
86-
build_corpus(X::Vector{Dict{S, Int}}) where {S <: AbstractString} =
86+
build_corpus(X::Vector{<:Dict{S, <:Integer}}) where {S <: AbstractString} =
8787
Corpus(NGramDocument.(X))
8888
build_corpus(X) = Corpus(TokenDocument.(X))
8989

0 commit comments

Comments
 (0)