Skip to content

geoffbacon/nlp-with-nltk-spacy

Repository files navigation

Natural language processing with NLTK and spaCy

Binder

Overview

This workshop is a practical introduction to two major Python libraries for NLP: NLTK and spaCy. NLTK is designed to help teach NLP, while spaCy is designed to do larger scale projects. We will cover the major features of both, and use real-world problems to practice.

What you'll learn

  • How NLTK and spaCy are structured.
  • How to perform basic NLP tasks like tokenization, sentence segmentation and POS-tagging.
  • How to perform more advanced NLP tasks like syntactic parsing and named entity recognition.
  • How to use these two Python libraries in your future projects.

Prerequisites

We will be getting our hands dirty with Python code, so you will need to be comfortable with Python before taking this workshop. Completion of D-Lab's Python FUN!damentals workshop series is sufficient.

Getting started & software prerequisites

There are three ways to get started with these materials, with each of them requiring different software installed on your computer.

JupyterHub

If you're taking this workshop at D-Lab, then your instructor will have set up JupyterHub for your workshop. The JupyterHub allows you to run code on a remote computer but see the results on yours. For this method, the only software you need is a modern web browser (we suggest Google Chrome). Your instructor will give you a URL on the day. This is our recommended method.

Anaconda

If you want to run the code on your computer, you have two options. Both involve installing (or making sure you have installed) Python 3 and some additional libraries. Anaconda is a free product that makes the installation process easy. It bundles together the Python language and a whole bunch of additional packages that we often rely on in our workshops. This way, you only have to download and install one thing. To use this method, visit this site and follow the instructions for your operating system to download the Python 3.x version (it might be 3.6, or 3.7, or higher). Please, please, please download the 3.x version, not the Python 2.x version. You may have a choice between using the graphical installer or the command line installer. Use whichever you're comfortable with, but the graphical one is easier.

For Pythonistas

If you've been using Python for a while, you might not want to use Anaconda. First, make sure you have a Python 3.x version. Second, install Jupyter by following these instructions. Third, install the packages listed in the requirements.txt file of this repo. The easiest way to do this is:

pip3 install -r requirements.txt

IOKN2K

It's OK Not To Know! That's our motto at D-Lab. D-Lab is open to researchers and professionals from all disciplines and levels of experience.

References

Contributing

If you spot a problem with these materials, please make an issue describing the problem.

Authors

  • Geoff Bacon

Acknowledgments

  • Chris Hench

D-Lab logo

About

D-Lab's introduction to NLP with NLTK and spaCy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published