2.5. Quiz

Quiz 2: Dialogue Graph

Overview

You run a hair salon and recently adopted a dialogue system to take a call from a customer and book a service for the customer:

S: Hello, how can I help you?
U: Hi, I'd like to book a haircut.
S: Sure. What date and time are you looking for?
U: Tuesday at 2 PM.
S: Your appointment is set. See you!

Your salon provides three services: haircut, hair coloring, and perms. Your system should reject any other service request from the customer:

S: Hello, how can I help you?
U: Can I make an appointment for waxing?
S: Sorry, we do not provide that service.
U: OK then.
S: Goodbye.

Your system should understand the following dates: Monday ~ Saturday. The time is always followed by the date with the following format: <number><space><AM|PM>:

S: Hello, how can I help you?
U: Can I make an appointment for a perm?
S: Sure. What date and time are you looking for?
U: Saturday 10 AM.
S: Your appointment is set. See you!

Only the following times and dates are available for the specific services:

  • Haircut:

    • Monday 10 AM, 1 PM, 2 PM

    • Tuesday: 2 PM

  • Hair coloring:

    • Wednesday: 10 AM, 11 AM, 1 PM

    • Thursday: 10 AM, 11 AM

  • Perms

    • Friday: 10 AM, 11 AM, 1 PM, 2 PM

    • Saturday: 10 AM, 2 PM

Thus, your system should not schedule an appointment for any other slots:

S: Hello, how can I help you?
U: Hi, I'd like to book a haircut.
S: Sure. What date and time are you looking for?
U: Saturday 10 AM.
S: Sorry, that slot is not available for a haircut.
U: OK.
S: Goodbye.

Make sure your system does not throw an exception in any situation.

Task 1

  1. Create a python file quiz2.py under the quiz package and copy the code.

  2. Update the transitions to design a dialogue flow for the above dialogue system.

Task 2

  • Create a PDF file quiz2.pdf that describes the limitations of your system.

Submission

  1. Commit and push quiz2.py to your GitHub repository.

  2. Submit quiz2.pdf to Canvas.

Last updated

©2023 Emory University - All rights reserved