A Code-First Introduction to Natural Language Processing 2019

(Joseph Catanzarite) #1

@rachel @jeremy I just listened to the first lesson in the new Fastai course “A Code-First Introduction to Natural Language Processing”. I’m both grateful and excited to use this course to learn about NLP! Thanks so much for creating the course and making it available online!

Is there a “Category” in the Fastai Forum for this course? If not, could you please create one, or let me know the appropriate category for posts relating to the new course? Again, thank you so much!

edit from Jeremy: let’s use this thread for discussion, and if it’s popular, we’ll create separate category


(Lee Geyer) #2

I second that suggestion.
I tried executing the first few jupyter notebooks and there are a few bugs. In the past, with machine learning and deep learning courses there was a specific forum to report and discuss resolution of those bugs.


(Joseph Catanzarite) #3

Until we have a Category for the new course, we’ll use this thread for related posts.

Here is the announcement for the new course.

The course videos are on youtube.

The course notebooks are on github.


(Joseph Catanzarite) #4

Preparing to run the course notebooks

I’ll assume that you have a working installation of fastai V1.0 under the latest anaconda (version 2019.03 with build channel py37_0), and that you have activated the environment you created for fastai.

Follow these steps to prepare your environment to run the first course notebook:

(1) Install the course materials from github
git clone https://github.com/fastai/course-nlp.git

(2) Install scikit-learn, a Python machine learning library
conda install scikit-learn

(3) Install nltk, the Natural Language Toolkit, a library for Natural Language Processing that is widely used for teaching and research.
conda install -c anaconda nltk

(4) Install spaCy, a library for “Industrial-Strength Natural Language Processing”
conda install -c conda-forge spacy

(5) Download an English language model for spaCy
python -m spacy download en_core_web_sm

(6) Install fbpca, a library for “Fast computations of PCA/SVD/eigendecompositions via randomized methods”
pip install fbpca

After this, you should be able to run the first notebook with code, which is 2-svd-nmf-topic-modeling.ipynb

I will continue to update this post in case the infrastructure needs to be extended in order to run subsequent notebooks in the course.


(Joseph Catanzarite) #5

Clouderizer template for fastai NLP:


(AnthonyC) #6

I am wondering whether anyone have expertise/steps on how to deploy a NLP model to production(like a web site or mobile APP)? Thanks first!


(Zachary Mueller) #7

I’ve used Render with good experiences. Here’s a workshop I did for my class/study group this week on deployment. Nlp is in there too. Deployment on Render UWF


(AnthonyC) #8

Hi, Zachary Thank you very much for sharing, which are very valuable to me. I am just wondering try to follow your example for “Cats vs Dogs”, when I try to run learn.export(pets.pkl) and get a pkl file, my question is where can I find that “pets.pkl” file? I am running this notebook at google Colab’s. Thanks again!


(Zachary Mueller) #9

Hey Anthony, the notebook is just there as a general guide to show where to modify the serve.py file. (Or server.py). I had my students run lesson 1 in the background. Use it as a reference, not plug and run in the notebook :slight_smile: however you should see where I change learner’s path. I believe you may have skipped that.

Though in the future I’d direct questions like this to a separate thread as to not lead away from the threads original direction.