News

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

  1. Learn about functional programming

  2. Assignment Implement the functions map, filter, and reduce: map

Part 2: Create a your own Python package

  1. Learn how to create your own Python packages

  2. Assignment Make your own package called functional based on the functions from Part 1: create functional package

Part 3: File I/O and os

  1. Learn about reading and writing files

  2. Learn about the os library

Part 3: Natural language processing

  1. Assignment Split a text into separate words: news

  2. Assignment Classify a text based on single words: news

  3. Assignment Classify a text based on word combinations: news

Submitting

Submit your code.