Jan 22, 23
Naive Bayes Classifier in Rust trained on Taylor Swift lyrics
I wrote a Naive Bayes Classifier in Rust and trained it on Taylor Swift Lyrics which allows us to feed our program a set of lyrics (ideally not from Taylor Swift) and classify those lyrics as more likely to be featured in a song by Country Taylor Swift (circa 1989 album) or more likely to be featured in a song by Pop Taylor Swift (post 1989 album). The classifier features ideas such as Laplace Smoothing, tokenization, reading from files and more. Let's talk through building it!
Something NLP-ish in Clojure
Clojure can leverage existing JVM libraries to build applications that handle a variety of features, including NLP. In this blog post, we'll use a Bayestian classifier to classify a small dataset of lyrics and then determine which artist would be most likely to write lyrics that we produce.