Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndefVarError when prepare! called on Corpus #171

Closed
tanmaykm opened this issue Oct 4, 2019 · 1 comment · Fixed by #172
Closed

UndefVarError when prepare! called on Corpus #171

tanmaykm opened this issue Oct 4, 2019 · 1 comment · Fixed by #172

Comments

@tanmaykm
Copy link
Contributor

tanmaykm commented Oct 4, 2019

An UndefVarError is thrown when prepare! is called on a corpus with strip_whitespace option.

julia> prepare!(crps, strip_html_tags | strip_whitespace | strip_non_letters)
ERROR: UndefVarError: d not defined
Stacktrace:
 [1] #prepare!#12(::Set{AbstractString}, ::Set{AbstractString}, ::Function, ::Corpus{Union{FileDocument, NGramDocument, StringDocument, TokenDocument}}, ::UInt32) at /home/tan/.julia/dev/TextAnalysis/src/preprocessing.jl:469
 [2] prepare!(::Corpus{Union{FileDocument, NGramDocument, StringDocument, TokenDocument}}, ::UInt32) at /home/tan/.julia/dev/TextAnalysis/src/preprocessing.jl:458
 [3] top-level scope at none:0

Looks like a typo (copy-paste related?) here:

((flags & strip_whitespace) > 0) && remove_whitespace!(d)
introduced in #141

@aviks
Copy link
Member

aviks commented Oct 5, 2019

cc: @asbisen

Ayushk4 added a commit to Ayushk4/TextAnalysis.jl that referenced this issue Oct 6, 2019
@aviks aviks closed this as completed in #172 Oct 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants