/nonsense-verse-pycon-2020

Materials for PyCon 2020 Workshop, "Nonsense verse... with Python and machine learning"

Primary LanguageJupyter Notebook

Nonsense verse (and other creative uses of spelling) with Python and machine learning

PyCon 2020 Workshop / Allison Parrish

Description

When Lewis Carroll wrote “Jabberwocky,” how did he know how to spell “Jabberwock”? Why are some words (like “cellar door”) considered to be pleasant, while others (“pulchritude,” “regurgitate”) ugly and harsh? In this tutorial, we’ll learn how to use Pincelate, a Python library and machine learning model, to analyze the sounds of words, and generate new words with particular phonetic characteristics.

Installation and notes

The Python libraries you'll need to install to follow along with this tutorial are listed in requirements.txt in this repository. Here's how I recommend setting up your system to follow along:

  • Clone this repository
  • Create a Python virtual environment, activate it, and install the requirements with pip (pip install -r requirements.txt)
  • Launch Jupyter Notebook at the command line with jupyter notebook.

This tutorial takes the form of a series of Jupyter Notebooks. If you're not familiar with Jupyter Notebook, consult the official documentation for a quickstart guide, and then my short tutorial notebook for basic commands and workflow tips.

Included notebooks