Clojure Interop with Python NLP Libraries

In this edition of the blog series of Clojure/Python interop with libpython-clj, we’ll be taking a look at two popular Python NLP libraries: NLTK and SpaCy. NLTK - Natural Language Toolkit I was taking requests for doing examples of python-clojure interop libraries on twitter the other day, and by far NLTK was the most requested library. After looking into it, I can see why. It’s the most popular natural language processing library in Python and you will see it everywhere there is text someone is touching. ...

January 24, 2020 · 8 min · Carin Meier

Parens for Pyplot

libpython-clj has opened the door for Clojure to directly interop with Python libraries. That means we can take just about any Python library and directly use it in our Clojure REPL. But what about matplotlib? Matplotlib.pyplot is a standard fixture in most tutorials and python data science code. How do we interop with a python graphics library? How do you interop? It turns out that matplotlib has a headless mode where we can export the graphics and then display it using any method that we would normally use to display a .png file. In my case, I made a quick macro for it using the shell open. I’m sure that someone out that could improve upon it, (and maybe even make it a cool utility lib), but it suits what I’m doing so far: ...

January 18, 2020 · 5 min · Carin Meier