In this module you will write a program that can determine the main topics of a newspaper article. This might seem like a very specific application, but the underlying problem (text classification) is one that you will encounter a lot in practice. Is a text positive or negative? Is it pro-democrat or pro-republican? Or, as in our case, is it about politics or about entertainment (or both)?
A secondary goal of this module is to focus a bit more on program design and style a bit more then usual. You will learn how to use some functional design principles. And you will learn how to make your code modular and how to document it properly.
Part 1: Functional Programming
Learn about functional programming: functional programming
Assignment Implement the functions
Part 2: Create a new Python package
Learn how to create new Python packages: packages
Assignment Make a new package called
functionalbased on the functions from Part 1: create functional package
Part 3: Natural language processing
Assignment Split a text into separate words: news
Assignment Classify a text based on single words: news
Assignment Classify a text based on word combinations: news