Please enable JavaScript to use CodeHS

Who Said It

In this project, students will make a program that lets the user type some text and determine which author is most likely to have written it.

Medium

3 Hours

Project Description

In this project, you will make a program that lets the user type some text that was written by either Jane Austen or William Shakespeare. Your program will then guess who said it!

Of course, your program isn’t going to guess randomly. It’s going to train itself by reading Hamlet by Shakespeare and Pride and Prejudice by Jane Austen. It will then estimate how similar the user’s input is to each text! The methods your program will use to train itself are similar to methods used in a branch of artificial intelligence called natural language processing, or NLP.

Here’s a demo of the final program you will create in this project. Try giving it sentences from Jane Austen’s Sense and Sensibility (found here) or Shakespeare’s A Midsummer Night’s Dream (found here) and see what happens!

Project Demo

Explore this program before assigning it!