Exploring NLP concepts using Apache OpenNLP inside a Java-enabled Jupyter notebook

Introduction

I have been exploring and playing around with the Apache OpenNLP library after a bit of convincing. For those who are not aware of it, it’s an Apache project, supporters of F/OSS Java projects for the last two decades or so. I found their command line interface pretty simple to use, and it is a great learning tool for beginning to work with Natural Language Processing (NLP).

To preface this article, make sure that you're familiar with Jupyter Notebooks. If you are not, have a look at this video these articles: [1] or [2]. For using the CLI, I’ll refer you to this post.

How to Do Deep Learning for Java

Deep in thought studying deep learning for Java.

Introduction

Some time ago, I came across this life-cycle management tool (or cloud service) called Valohai, and I was quite impressed by its user-interface and simplicity of design and layout. I had a good chat about the service at that time with one of the members of Valohai and was given a demo. Previous to that, I had written a simple pipeline using GNU Parallel, JavaScript, Python, and Bash — and another one purely using GNU Parallel and Bash.

I also thought about replacing the moving parts with ready-to-use task/workflow management tools like Jenkins X, Jenkins Pipeline, Concourse or Airflow, but due to various reasons, I did not proceed with the idea.

How to Build Graal-Enabled JDK8 on CircleCI

The GraalVM compiler is a replacement to HotSpot’s server-side JIT compiler, widely known as the C2 compiler. It is written in Java with the goal of better performance compared to the C2 compiler. New changes, starting with Java 9, mean that we can now plug in our own hand-written C2 compiler into the JVM thanks to JVMCI. The researchers and engineers at Oracle Labs have created a variant of JDK8 with JVMCI enabled, which can be used to build the GraalVM compiler. The GraalVM compiler is open source and is available on GitHub (along with the HotSpot JVMCI sources needed to build the GraalVM compiler). This gives us the ability to fork/clone it and build our own version of the GraalVM compiler.

In this post, we are going to build the GraalVM compiler with JDK8 on CircleCI. The resulting artifacts are going to be:

JVM Advent Calendar: Apache Zeppelin: Stairway to *Notes* Heaven!

Introduction

Continuing from the previous post, Two Years in the Life of AI, ML, DL, and Java, where I expressed my motivation, I mentioned our discussions, one of the discussions was that you can write in languages like Python, R, and Julia in JuPyteR notebooks. Most were not aware that you can also write Java and Scala in addition to Python, SQL, etc. with the help of Apache Zeppelin notebooks. And so, I wanted to share something to broaden everyone’s awareness of Apache Zeppelin and its features. The project itself is written in Java and is an open architecture, which means that Zeppelin can support anything as long as an interpreter for that thing has been provided.

First Things First

In case I have lost some of you, here’s what I meant by JuPyteR notebooks and writing notebooks in different languages. Also, have a look at the list of kernels supported by JuPyteR notebook. In this post, however, we are covering Apache Zeppelin, how to get it to work, and how to use a couple of notes in the Zeppelin environment.

JVM Advent Calendar: Two Years in the Life of AI, ML, DL, and Java [Links]

Now, back to what I was going to write about. If you ask me, I’ll already admit that I have NOT even scraped the surface of these topics. What I share here is a glimpse of what’s out there and each one of you might have discovered many more aspects of these topics as part of your daily professional and personal pursuits.

One of my motivations of putting this post and the links below together comes from the discussion we had during the LJC Unconference in November 2018, where Jeremie, Michael Bateman, and I, along with a number of LJC JUG members, gathered at a session discussing a similar topic. And, the questions raised by some were along the lines of "where does Java stand in the world of AI-ML-DL?," "how do I do any of these things in Java?, and "which libraries and frameworks should I use?"