Please enable JavaScript to use CodeHS

  • AP CSA Lab

Magpie

In this College Board project, students will use methods and basic class structure to create a chat bot that can respond to simple prompts.

Medium

4 Hours

High School

Project Description

Introduction

From Eliza in the 1960s to Siri and Watson today, the idea of talking to computers in natural language has fascinated people. More and more, computer programs allow people to interact with them by typing English sentences. The field of computer science that addresses how computers can understand human language is called Natural Language Processing (NLP).

NLP is a field that attempts to have computers understand natural (i.e., human) language. There are many exciting breakthroughs in the field. While NLP is a complicated field, it is fairly easy to create a simple program to respond to English sentences.

Your Task

For this lab, you will explore some of the basics of NLP. As you explore this, you will work with a variety of methods of the String class and practice using the if statement. You will trace a complicated method to find words in user input.

Each activity in this Lesson corresponds to the activities laid out in this Student Guide.