Exercises

Use the following exercises to expand your learning and get more confident with the material in this chapter:

  1. Go back to the first exercise and load another set of translations. Train the bot on those and see what responses are generated after training. There are plenty of other language files available for training.
  2. Set up your own conversational training file using the English/French translation one as an example. Remember, the matching responses can be anything and not just translated text.
  3. Add additional pattern-matching skills to the DeepPavlov bot. Either the simple test one and/or the chatbot server.
  4. The DeepPavlov chatbot uses a highest-value selection criteria for selecting a response. DeepPavlov does have a random selector as well. Change the response selector on the chatbot to use random.
  5. Change the exchange type in the example to use Fanout and create a log queue to log messages.
  6. Change the exchange type to Topic and see how you can group messages. Warning: this will likely break the example; see whether you can fix it.
  7. Write a RabbitMQ publisher in Python that publishes to one or more different types of queues.
  8. Create an entire set of conversation skills using the pattern-matching skill. Then, see how well your bot converses with you.
  9. Add additional skills of other types to the chatbot server. This may require some additional homework on your part.
  10. Write or run two chatbots over RabbitMQ and watch them converse with each other.

Work through at least two or three of these exercises.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset