Skip to content

Commit f05d1d6

Browse files
committed
add spacy and nltk installation instructions
1 parent 0fd3cff commit f05d1d6

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ scikit-learn.
4242
## Setup
4343

4444
To run the code, you need the packages ``numpy``, ``scipy``, ``scikit-learn``, ``matplotlib``, ``pandas`` and ``pillow``.
45-
Some of the visualizations of decision trees and neural networks structures also require ``graphviz``.
45+
Some of the visualizations of decision trees and neural networks structures also require ``graphviz``. The chapter
46+
on text processing also requirs ``nltk`` and ``spacy``.
4647

4748
The easiest way to set up an environment is by installing [Anaconda](https://www.continuum.io/downloads).
4849

@@ -51,6 +52,10 @@ If you already have a Python environment set up, and you are using the ``conda``
5152

5253
conda install numpy scipy scikit-learn matplotlib pandas pillow graphviz python-graphviz
5354

55+
For the chapter on text processing you also need to install ``nltk`` and ``spacy``:
56+
57+
conda install nltk spacy
58+
5459

5560
### Installing packages with pip
5661
If you already have a Python environment and are using pip to install packages, you need to run
@@ -60,6 +65,14 @@ If you already have a Python environment and are using pip to install packages,
6065
You also need to install the graphiz C-library, which is easiest using a package manager.
6166
If you are using OS X and homebrew, you can ``brew install graphviz``. If you are on Ubuntu or debian, you can ``apt-get install graphviz``.
6267
Installing graphviz on Windows can be tricky and using conda / anaconda is recommended.
68+
For the chapter on text processing you also need to install ``nltk`` and ``spacy``:
69+
70+
pip install nltk spacy
71+
72+
### Downloading English language model
73+
For the text processing chapter, you need to download the English language model for spacy using
74+
75+
python -m spacy download en
6376

6477
## Submitting Errata
6578

0 commit comments

Comments
 (0)