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.
For detailed information on the library, visit the official website.
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.
GermaParlPy is available on PyPi:
pip install germaparlpy
Click here for the full API Reference.
Click here to learn more about the XML Structure of the underlying corpus GermaParlTEI1.
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.
Contributions and feedback are welcome! Feel free to write an issue or open a pull request.
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.
Developed by Marlon-Benedikt George.
The underlying data set, the GermaParl corpus, was compiled and released by Blätte & Leonhardt (2024)1. See also their R-Library PolMineR in the context of the PolMine-Project, which served as an inspiration for this library.