5 Heroic Tools for Natural Language Processing

Vladimir Fedak
4 min readJan 29, 2018

--

Big Data analysis is an essential tool for Business Intelligence, and Natural Language Processing (NLP) tools help process a flow of unstructured data from disparate sources.

Due to the fact that Python programming language is one of the best suited for Big Data processing, many tools and libraries are written for it. Solutions like Jupyter and other Big Data visualization tools are written in Python, and many other software instruments provide native Python functionality or support through APIs or various wrappers. This is the reason there are quite a lot of NLP libraries out there, and many more come into service regularly.

Due to this, a question of “what Python NLP library to choose” might rise quite often. As at IT Svit we have a decent experience with building NLP applications, we had a chance to research many available options and chose 5 heroic NLP tools that can be of use for anyone. Here they are, in no particular order:

  1. CoreNLP from Stanford group
  2. NLTK, the most widely-mentioned NLP library for Python
  3. TextBlob, a user-friendly and intuitive NLTK interface
  4. Gensim, a library for document similarity analysis
  5. SpaCy, an industrial-strength NLP library built for performance

By no means, these 5 Python NLP libraries represent the full range of the tools available. However, we consider them to be the backbone of NLP domain, as after mastering these 5 tools, you will know all the basics (and some advanced tricks) of NLP processing, and will be able to formulate your project requirements, choose the most appropriate NLP tool for it, and master it quickly, should the need arise.

CoreNLP, the Java library well-known for its speed

CoreNLP is the production-ready solution built and maintained by Stanford group. This library is optimized for speed and has functions like Part-of-Speech (PoS) tagging, pattern learning parsing, titled entity recognition, and much, much more. As it was originally written in Java, it is highly appraised for its high speed and can support multiple languages (including Python) due to using specialized wrappers. CoreNLP is widely used in production environments nowadays, as it is polished, fast, and provides precise results.

NLTK, the most widely-mentioned NLP library

NLTK stands for Natural Language ToolKit and it is the best solution for learning the ropes of NLP domain. Its modular structure helps comprehend the dependencies between components and get the firsthand experience with composing appropriate models for solving certain tasks. Since its release, NLTK has helped solve multiple problems in various aspects of Natural Language Processing.

There are multiple guides (the most useful being this book and this tutorial) that will help anybody master the NLTK. Truth be told, doing it otherwise is not advised, as this is quite a complicated solution with a harsh learning curve and a maze of internal limitations. However, once mastered, NLTK can become the excellent playground of the text analysis researcher.

TextBlob, the best way NLTK should be used

TextBlob is an interface for NLTK that turns text processing into a simple and quite enjoyable process, as it has rich functionality and smooth learning curve due to a detailed and understandable documentation. Resting upon the shoulders of a giant, TextBlob allows simple addition of various components like sentiment analyzers and other convenient tools. It can be used for rapid prototyping of various NLP models and can easily grow into full-scale projects.

Gensim, a library for document similarity analysis

While Gensim can be not as ubiquitous and all-around capable as the previous components, there definitely is an area where it shines. This area is the topic modeling and document similarity comparison, and highly-specialized Gensim library has no equals there. Offering the tools like LDA (or Latent Dirichlet Allocation), scalable and robust, Gensim is a production-ready tool you can trust with several crucial components of your NLP projects, not to mention topic modeling being one of the most engaging and promising fields of the modern NLP science.

SpaCy, an industrial-strength library boasting high performance

Written in Cython, SpaCy cannot present over 50 variants of solution for any task, like NLTK does. As a matter of fact, SpaCy provides only one (and, frankly, the best one) solution for the task, thus removing the problem of choosing the optimal route yourself, and ensuring the models built are lean, mean and efficient. In addition, the tool’s functionality is already robust, and new features are added regularly.

As it is quite a recent addition to the field, SpaCy is currently treated as a new kid in town — with an interest, yet without proper affection. The fact this solution can currently work with English texts only is also kind of an anchor. However, due to C-like blazing fast performance, SpaCy provides a compelling approach to NLP, superior to the rest of the competition. Try it once, never go for another option again, some specialists say, and who knows — maybe the new sheriff is in town, and NLTK will have to step from the throne one day…

Conclusions

After you get a tight grip on these 5 heroic tools for Natural Language Processing, you will be able to learn any other library in quite a short time. We are sure, however, there will be no need for that, as NLTK with TextBlob, SpaCy, Gensim, and CoreNLP can cover almost all needs of any NLP project. Do you think otherwise?

The article was originally published here.

--

--