ML - Magpie Lab Overview

APCompSci_OverviewBanner.png

Magpie Lab Overview

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 easy to create a simple program to respond to English sentences.

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.

Key Terms

API – An abbreviation for Application Programming Interface. It is a specification intended to be used as an interface by software components to communicate with each other.

Chatbot – A program that conducts a conversation with a human user.

NLP – Natural Language Processing; the field that studies responding to, and processing, human language.

Module Lessons Preview

In this module, we will study the following topics:

Exploring Chatbots: Chatbots are programs that are designed to respond like humans to natural language input. Before you write code to create your own chatbot, you will explore some existing chatbots.

Introductions to Magpie Class:  In this lesson, you will work with Magpie, which is a simple implementation of a chatbot. You will see how it works with some keywords and add keywords of your own.

Better Keyword Detection:  In the previous lesson, you discovered that simply searching for collections of letters in a string does not always work as intended. For example, the word “cat” is in the string “Let’s play catch!”, but the string has nothing to do with the animal. In this lesson, you will trace a method that searches for a full word in the string. It will check the substring before and after the string to ensure that the keyword is found.

Responses That Transform Statements:  This lesson will have you work with Magpie responses that are transformations of the original statement. Transformative statements will make the chatbot seem more engaged in the conversation. 

APCompSci_OverviewBottom.png  IMAGES CREATED BY GAVS