CPSC 203, 2026 W1
November 26, 2026


Visualization at left by a former student of Cinda’s.
Alternatively, see Interactive Game of Thrones Map.
Common data flow steps
Subsequent data flow options
For example: Project Gutenberg Canada.
We’ll use a local copy of The Once and Future King by T. H. White.
Break the text into words (or phrases, sentences, paragraphs, …) for subsequent processing.
Visualized: The thirty most common tokens in the mystery text.

Actual data often contains cruft.
Removal of cruft often requires iterative manual experimentation.

(not our mystery text)
We will use the spaCy open source library.
Should “him” and “Him” be different tokens?
What about “Bob” and “bob”?

Should “father” and “father.” be different tokens?
What about “Dr.”, “$3.50” or “student(s)”?

Stop Words: Filter out common and largely unhelpful words.
List of stop words is compiled from a large corpus of representative texts.

Reduce word to dictionary form (its lemma).



nlp) processes the input text into a Doc object (doc).
Launch Class Activity: Visualizing Literature in PrairieLearn.
Contains a mystery text and code to demonstrate: