Worksheet 27: Text generation

Worksheet 27: Text generation#

Your name:

Your student ID number:

  1. Next word prediction is a regression/classification problem. What should we use?

    • Do you think linear regression is a good idea? Why or why not?

    • Do you think nearest neighbors is a good idea? Why or why not?

    • Do you have any other ideas?

  2. Practice training a Markov Text Generator on the example text:

    “I came, I saw, I conquered”

    Fill out this table with the probabilities that word \(b\) comes after word \(a\):

    The row corresponds to \(a\), the column corresponds to \(b\).

    I

    came

    saw

    conquered

    I

    came

    saw

    conquered

  3. Do you see a downside to making the context size bigger?