JuliaText / JuliaText/CorpusLoaders.jl

Error download sample

Open
#41 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
32
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Hi, I am trying to download [Twitter Sentiment dataset](https://github.com/JuliaText/CorpusLoaders.jl/blob/master/docs/src/Twitter.md)

I run the code as documentation

```
dataset_test_pos = load(Twitter("test_pos"))
```

But got this message

MethodError: Cannot `convert` an object of type Bool to an object of type String
Closest candidates are:
convert(::Type{String}, !Matched::Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R) at /home/user/.julia/packages/CategoricalArrays/dmrjI/src/value.jl:94
convert(::Type{String}, !Matched::WeakRefStrings.WeakRefString) at /home/user/.julia/packages/WeakRefStrings/lqf5B/src/WeakRefStrings.jl:79
convert(::Type{String}, !Matched::FilePathsBase.AbstractPath) at /home/user/.julia/packages/FilePathsBase/Oyg1p/src/path.jl:83
...

Stacktrace:
[1] push!(::Array{String,1}, ::Bool) at ./array.jl:855
[2] Parsers.Options(::Missing, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::Nothing, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at /home/user/.julia/packages/Parsers/DAskp/src/Parsers.jl:99
[3] Parsers.Options(::Missing, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::Nothing, ::Nothing, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at /home/user/.julia/packages/Parsers/DAskp/src/Parsers.jl:62
[4] file(::String, ::Int64, ::Bool, ::Int64, ::Nothing, ::Int64, ::Int64, ::Bool, ::Nothing, ::Bool, ::Bool, ::Array{String,1}, ::String, ::Nothing, ::Bool, ::Char, ::Nothing, ::Nothing, ::Char, ::Nothing, ::UInt8, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Dict{Int8,Int8}, ::Bool, ::Float64, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Nothing) at /home/user/.julia/packages/CSV/DOr2V/src/CSV.jl:382
[5] #File#15(::Int64, ::Bool, ::Int64, ::Nothing, ::Int64, ::Int64, ::Bool, ::Nothing, ::Bool, ::Bool, ::Array{String,1}, ::String, ::Nothing, ::Bool, ::Char, ::Nothing, ::Nothing, ::Char, ::Nothing, ::UInt8, ::Nothing, ::Nothing, ::Nothing, ::Nothing, ::Dict{Int8,Int8}, ::Bool, ::Float64, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Nothing, ::Type, ::String) at /home/user/.julia/packages/CSV/DOr2V/src/CSV.jl:258
[6] (::getfield(Core, Symbol("#kw#Type")))(::NamedTuple{(:header,),Tuple{Int64}}, ::Type{CSV.File}, ::String) at ./none:0
[7] #read#64(::Bool, ::Base.Iterators.Pairs{Symbol,Int64,Tuple{Symbol},NamedTuple{(:header,),Tuple{Int64}}}, ::Function, ::String) at /home/user/.julia/packages/CSV/DOr2V/src/CSV.jl:1086
[8] (::getfield(CSV, Symbol("#kw##read")))(::NamedTuple{(:header,),Tuple{Int64}}, ::typeof(CSV.read), ::String) at ./none:0
[9] Twitter(::String) at /home/user/.julia/packages/CorpusLoaders/w40jN/src/Twitter.jl:12
[10] top-level scope at In[8]:1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with docs/src/Twitter.md and the Twitter constructor shown at Twitter.jl:12, then reproduce load(Twitter("test_pos")) using the reported stack trace. Check how the loader calls CSV.read and determine what change is needed for the documented command to complete successfully; verify the dataset loads without the MethodError.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.