Giter VIP home page Giter VIP logo

wzbsocialsciencecenter / tm_corona Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 52.7 MB

A small showcase for topic modeling with the tmtoolkit Python package. I use a corpus of articles from the German online news website Spiegel Online (SPON) to create a topic model for before and during the COVID-19 pandemic.

Home Page: https://wzbsocialsciencecenter.github.io/tm_corona/

License: Apache License 2.0

Python 4.70% Jupyter Notebook 95.30%
topic-modeling topicmodeling text-mining text-as-data python text-analysis corona covid-19 news scraping

tm_corona's Introduction

Spiegel Online news topics and COVID-19 โ€“ a topic modeling approach

Markus Konrad [email protected], November 2020

COVID-19 related topics in SPON corpus over time

This is a small project to showcase topic modeling with the tmtoolkit Python package via LDA, where I use a corpus of articles from the German online news website Spiegel Online (SPON) to create a topic model for before and during the COVID-19 pandemic. This topic model is then used to analyze the volume of media coverage regarding the pandemic and how it changed over time. Currently, a time span from Oct. 2019 to end of Aug. 2020 is covered but I plan to give an update for a time span until end of Nov. 2020.

For an introduction to topic modeling via LDA see Introduction to Probabilistic Topic Models (Blei 2012) or Topic modeling made just simple enough (Underwoord 2012).

Analysis notebook and scripts

The main analysis is done in the notebook tm_analysis.ipynb. Head over there for an application of topic models. However, data retrieval, preparation and topic modeling is just as important and is done in the following scripts:

  1. scraping news from SPON: fetch_news/spon.py
  2. text data preparation for topic modeling with tmtoolkit: prepare.py
  3. topic model evaluation with tmtoolkit: tm_evaluation.py
  4. generation of final candidate topic models with tmtoolkit: tm_final.py

Data

Most raw data files are too big for git. I provide the document-term matrix, corpus metadata and generated topic models as separate ZIP file for download. Simply unzip the file to the cloned repository folder. You may contact me for access to the raw text data.

License

Licensed under Apache License 2.0. See LICENSE file.

tm_corona's People

Contributors

internaut avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.