GermaParlPy
  • API Reference
  • XML Structure
  • Tutorials

Introduction

The GermaParlPy Python package provides functionality to deserialize, serialize, manage, and query the GermaParlTEI1 corpus and derived corpora.

The GermaParlTEI corpus comprises the plenary protocols of the German Bundestag (parliament), encoded in XML according to the TEI standard. The current version covers the first 19 legislative periods, encompassing transcribed speeches from the Bundestag’s constituent session on 7 September 1949 to the final sitting of the Angela Merkel era in 2021. This makes it a valuable resource for research in various scientific disciplines.

This website describes the installation, API reference, usage and further information about the GermaParlPy software library.

Use Cases

Potential use cases range from the examination of research questions in political science, history or linguistics to the compilation of training data sets for AI.

In addition, this library makes it possible to access the GermaParl corpus in Python and apply powerful NLP libraries such as spacy or gensim to it. Previously, the corpus could only be accessed using the PolMineR package in the R programming language.

Installation

GermaParlPy is available in PyPi:

pip install germaparlpy

Or install from source:

git clone git@github.com:Nolram567/GermaParlPy.git
cd germaparlpy
pip install .

API Reference

Click here for the full API Reference.

XML Structure

Click here to learn more about the XML Structure of the underlying corpus GermaParlTEI2.

Tutorials

I have prepared three example scripts that showcase the utilisation and potential use cases of GermaParlPy. You can find the scripts in the /example directory or here.

Contributing

Contributions and feedback are welcome! Feel free to write an issue or open a pull request.

License

The code is licensed under the MIT License.

The GermaParl corpus, which is not part of this repository, is licensed under a CLARIN PUB+BY+NC+SA license.

Credits

Developed by Marlon-Benedikt George.

The underlying data set, the GermaParl corpus, was compiled and released by Blätte & Leonhardt (2024)3. See also their R-Library PolMineR in the context of the PolMine-Project, which served as an inspiration for this library.

Footnotes

  1. Blaette, A.and C. Leonhardt. Germaparl corpus of plenary protocols. v2.2.0-rc1, Zenodo, 22 July 2024, doi:10.5281/zenodo.12795193↩︎

  2. Blaette, A.and C. Leonhardt. Germaparl corpus of plenary protocols. v2.2.0-rc1, Zenodo, 22 July 2024, doi:10.5281/zenodo.12795193↩︎

  3. Blaette, A.and C. Leonhardt. Germaparl corpus of plenary protocols. v2.2.0-rc1, Zenodo, 22 July 2024, doi:10.5281/zenodo.12795193↩︎