4 Things To Do Before You Start Studying NLP | by Ugo Loobuyck | Towards Data Science

Getting started in a new field isn’t always easy when you don’t have the right resources or are missing crucial information, even when this field is as fun as Natural Language Processing!
I have been an NLP student for the past two years and there are a few things I wish I knew before I started my master’s degree. In this post, I will tell you about the top 4 things that would have saved me a ton of time when I started studying NLP.
print("Hello world!")
Python is currently the most popular programming language for machine learning, AI and NLP. It essentially has access to a great number of useful libraries and is user-friendly, as explained in this article.
You should train your basic text processing skills and practice Python functions like split(), lower(), etc. Knowing data structures (lists, dictionaries, sets) and ways to handle them is also essential (list slices, looping through dictionaries, the zip() and enumerate() functions).
There are a handful of important Python libraries you should get acquainted with:
NLTK proposes a ton of useful tools for language processing, including tokenizers, parsers, classifiers, but also text corpora that you can use in your projects.
NumPy uses very efficient array objects and ways to work with them. It is used in most machine learning libraries, so you should definitely get used to it.
Pandas is super useful to hold your data in easy-to-interpret DataFrame objects.
Matplotlib will come in handy to plot graphs in order to visualize your data and observe your results.
Numpy, Pandas and Matplotlib are very popular on the machine learning side of NLP, and you will often encounter the following lines at the beginning of scripts:
import numpy as npimport pandas as pdimport matplotlib.pyplot as plt
If you happen to already know the basics of Python programming as well as some of these libraries, you can start getting familiar with machine learning frameworks described in the following article.
towardsdatascience.com
Mathematics are a core component of NLP and will accompany you on your journey to mastering this discipline. Even though you probably won’t have to ever pull off insane calculations by hand to make your project work, understanding what’s happening in the machine is a fundamental asset to develop your skills.
As a beginner, here are the things you should get familiar with when delving into NLP:
Probabilities are important in language modeling and understanding the concept of n-grams. This Medium post is excellent at explaining probabilities for NLP, go check it out!
Linear algebra is used to compute loss functions when you train a computational model, and regularization functions to make your models more robust. Knowing about vector/matrix operations will also help you.
Functions, called activation functions in machine learning, are used to perform linear and non-linear transformations within neural networks. This post lists the most popular activation functions and explains how they work.
Basic calculus concepts are pretty important to understand core machine learning processes such as gradient descent and backpropagation. Machine learning frameworks like TensorFlow or PyTorch implement these for you, but you should understand their purpose anyway.
Evaluation metrics are the key to measure your NLP system performance, so if you’re not yet familiar with precision, recall and accuracy, now is the time to get it done. Then, you can learn about more complex metrics such as perplexity, BLEU, cross-entropy, RSME, etc. Each NLP task requires specific metrics, so knowing them will give you a significant advantage.
The more you know about basic maths, the easier it will be for you to grasp core NLP concepts. But enough about maths!
As a future NLP master, it will happen quite often that you need to create a new, clean programming environment for a new project. But as a beginner, setting up your very first project can be made much simpler by using the following tools:
virtalenv or venv, useful to create isolated environment on your computer and convenient to install/export a set of required Python packages, for example. Check the official doc for more information.
$ virtualenv nlp_directory
pip is essential to manage Python packages, knowing how to use it and deal with dependencies can save you a lot of time. The NLP community is remarkably active in developing new libraries, so keep an eye on it!
Jupyter uses iPython to allow interactive all-in-one setups, which are great for data visualization, step-by-step scripting and report creation. Both Jupyter notebook and Jupyter lab are user friendly and often used for demonstrations.
$ jupyter notebook
Git is an amazing versioning tool you should use to keep track of the advancements of your projects and to collaborate with others! Your code and files are hosted on GitHub, which is basically a goldmine for programmers and NLP engineers.
Finding your way around UNIX systems (Linux, MacOS, etc.) is vital in NLP: you will often need to read and write files, change directory, get/set environment variables, and so on. Get familiar with command line functions such as ls, grep, wget, sed/awk, head/tail, cp and mv.
Perhaps this piece of advice is more adapted for intermediate learners who already have some experience or knowledge of the field.
This was for me the most overwhelming aspect of NLP, since I had never read a single scientific paper before and was unaware of the valuable takeaways contained in each of them. At the end of the day, I wish I had started reading papers, and here is why:
Get used to the important keywords: research articles will look and sound like nonsense at first, but after a while you will start noticing keywords that also appear in tutorials or classes. Knowing these keywords will eventually enhance your general understanding of the field.
You learn from the best! Papers often carry a good amount of knowledge, and are reviewed by research peers before publication, which ensures the information’s validity.
Don’t wait for the tutorial! Keeping an eye on the newest advances in NLP on Google Scholar, ACL and other online research resources will help you to faster reach an excellent understanding of state-of-the-art methods.
I honestly wish I had these tips in hand when I started learning NLP and machine learning.
Learning Python and maths basics will help you climb that learning curve, setting a good working environment will save you a ton of time on file and package management, and reading research papers will inform you on what’s new.
Thank you for reading, I sincerely hope that these tips will save you some time and trouble when learning NLP. Don’t hesitate to leave feedback and tell me about what you wish you knew when you started learning NLP and machine learning!