I am trying to use TextAnalysis.jl for some text classification using the Naive Bayes Classifier. However, I’ve been unable to begin as I’m getting an error before I can even load the classifier.
using TextAnalysis: NaiveBayesClassifier, fit!, predict
Produces this error
ERROR: UndefVarError: NaiveBayesClassifier not defined
I know TextAnalysis.jl is intalled and it loads on its own (using TextAnalysis
). How can I fix this?
Chris
1 Like
Ever figure this out? I’m getting this right now too.
1 Like
It looks like this was just fixed, but I don’t think a new version has been registered yet:
https://github.com/JuliaText/TextAnalysis.jl/pull/217
You can install it using ]add TextAnalysis#master
.
1 Like
Thank you @jkbest2. I just saw that too. I’m just getting into Julia so am learning as I go. After reading some more docs, I see that one can add a package from Github like this:
From the Julia command prompt, type ]
and that brings you to the Pkg command prompt.
From the Pkg command prompt:
pkg> add "https://github.com/JuliaText/TextAnalysis.jl"
After it installs hit BACKSPACE and Bob’s your uncle. I can confirm that the new fix works and is available via that modified install process.
1 Like
Several years ago I tried to get one of the NaiveBayes classifiers in the ecosystem to work, and after spending 2hrs grappling with it I decided to just write my own (it’s a very simple algorithm). Maybe things are better now(IE: after getting the install maybe it will work?), but that is another option depending on where you are with things and what you need and when. I can help with that and may already have some suitable building blocks laying around somewhere to kick start it…