Session Ready
Exercise

Create the vocabulary and the mappings

In the previous exercise, you have created the prefix and suffix sentences which can serve as the input and target sentences for training. In this exercise, you'll find out the vocabulary from the corpus. You'll also create the character to integer and the integer to character mapping. The vocabulary and these mappings will be very useful when creating the input and target tensors for training.

The emails are available in the variable named corpus.

Instructions 1/2
undefined XP
  • 1
  • 2
  • Iterate first over each email and then over each character in the email.
  • Add the character in the vocabulary if not already there.
  • Sort the vocabulary.