Spam filter exercise from "Doing Data Science"