We all know that the Python programming language is being used to build some innovative projects and applications. We have learned from some of the previous PyCon 2020 videos that Python can be applied in almost any field from Agriculture to Physics. We even discovered a video of a mom sharing her experiences and how she helps her son build a science fair project using Raspberry PI with Python. If that doesn’t surprise you, well this video might! Who would have thought that you can use Python to write poetry?
In this video shared by Kathryn Lingel from the recently concluded PyCon 2020, we will discover the use of Pyambic Pentameter which allows computers to generate rhyming and metered poems. By combining Markov chain random text generation with a pronunciation dictionary in Python’s Natural Language ToolKit (NLTK), we can generate a poem that has both rhyme and meter. We may not be able to teach computers to write poems with soul and emotions but we can certainly program them to write poetry with style. To learn more about this amazing project and surprising use of Python, feel free to watch the video below.